karaf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jean-Baptiste Onofré ...@nanthrax.net>
Subject Re: Command-feature-error: "Unable to resolve ... : missing requirement"
Date Sun, 19 May 2019 15:34:01 GMT
By the way, I'm suggesting to take a look on the karaf-commadn-example
(which is a complete working example).

Regards
JB

On 19/05/2019 17:32, Jean-Baptiste Onofré wrote:
> 1.1 if you use wildcard it's normal it doesn't match
> 1.2 if you are excluding it from import, it can still be there.
> 
> Basically, your maven-bundle-plugin configuration should look like:
> 
> <Export-Package>
>   !org.apache.util.tracker,
>   *
> </Export-Package>
> <Import-Package>
>   !org.apache.util.tracker,
>   *
> </Import-Package>
> <Private-Package>
>   org.apache.util.tracker
> </Private-Package>
> 
> 2. Your commit is actually wrong and explains the downloading error
> (maven resolution).
> 
> A mvn URL has the following syntax:
> 
> mvn:groupId/artifacId/version[/type]
> 
> So, the mvn URL is actually:
> 
> mvn:org.rogatio.circlead.sunray/circlead-core-command/xxxx
> 
> By the way, I recommend to add target, etc from git (using .gitignore
> for instance).
> Secondly you should use SNAPSHOT to override the artifacts.
> 
> I can fix your project if you want.
> 
> Regards
> JB
> 
> On 19/05/2019 17:25, matthiaw wrote:
>> FIRST:
>> <Private-Package>org.apache.util.tracker*/Private-Package> has no effect
in
>> circlead-core-provider and not put the karaf-classes into the jar. I missed
>> again the need classes in the jar. Did i something wrong with your hint?
>>
>> SECOND:
>> This is not the reason for the error. I find out that i set the
>> configuration wrong, see
>> https://github.com/matthiaw/karaf-command-trial/commit/648b9260d6881af527d82f120c86da1ba8e8e48c#diff-19fa206e288f16bcf4616c9157f67511.
>> So now the error is gone.
>>
>> THIRD:
>> Now i get another error in feature:install because of missing
>> maven-metadata.xml. Any idea how i can avoid that ?
>>
>>
>>  feature:install circlead-core-provider
>> org.apache.karaf.features.internal.util.MultiException: Error:
>> 	Error downloading
>> mvn:org.rogatio.circlead.sunray/circlead-core-provider-0.0.1
>> 	at
>> org.apache.karaf.features.internal.download.impl.MavenDownloadManager$MavenDownloader.<init>(MavenDownloadManager.java:91)
>> 	at
>> org.apache.karaf.features.internal.download.impl.MavenDownloadManager.createDownloader(MavenDownloadManager.java:72)
>> 	at
>> org.apache.karaf.features.internal.region.Subsystem.downloadBundles(Subsystem.java:457)
>> 	at
>> org.apache.karaf.features.internal.region.Subsystem.downloadBundles(Subsystem.java:452)
>> 	at
>> org.apache.karaf.features.internal.region.SubsystemResolver.resolve(SubsystemResolver.java:224)
>> 	at
>> org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:388)
>> 	at
>> org.apache.karaf.features.internal.service.FeaturesServiceImpl.doProvision(FeaturesServiceImpl.java:1058)
>> 	at
>> org.apache.karaf.features.internal.service.FeaturesServiceImpl.lambda$doProvisionInThread$13(FeaturesServiceImpl.java:994)
>> 	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
>> 	at
>> java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
>> 	at
>> java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
>> 	at java.base/java.lang.Thread.run(Thread.java:834)
>> 	Suppressed: java.io.IOException: Error downloading
>> mvn:org.rogatio.circlead.sunray/circlead-core-provider-0.0.1
>> 		at
>> org.apache.karaf.features.internal.download.impl.AbstractRetryableDownloadTask.run(AbstractRetryableDownloadTask.java:77)
>> 		at
>> java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
>> 		at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
>> 		at
>> java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
>> 		... 3 more
>> 	Caused by: java.io.IOException: Error resolving artifact
>> org.rogatio.circlead.sunray:circlead-core-provider-0.0.1:jar:[0.0,): [Could
>> not find metadata
>> org.rogatio.circlead.sunray:circlead-core-provider-0.0.1/maven-metadata.xml
>> in local (/home/matthias/.m2/repository), Could not find metadata
>> org.rogatio.circlead.sunray:circlead-core-provider-0.0.1/maven-metadata.xml
>> in central (http://repo1.maven.org/maven2/), Could not find metadata
>> org.rogatio.circlead.sunray:circlead-core-provider-0.0.1/maven-metadata.xml
>> in apache (http://repository.apache.org/content/groups/snapshots-group/),
>> Could not find metadata
>> org.rogatio.circlead.sunray:circlead-core-provider-0.0.1/maven-metadata.xml
>> in ops4j.sonatype.snapshots.deploy
>> (https://oss.sonatype.org/content/repositories/ops4j-snapshots/)]
>> 		at
>> org.ops4j.pax.url.mvn.internal.AetherBasedResolver.configureIOException(AetherBasedResolver.java:803)
>> 		at
>> org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:780)
>> 		at
>> org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:657)
>> 		at
>> org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:598)
>> 		at
>> org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:565)
>> 		at
>> org.apache.karaf.features.internal.download.impl.MavenDownloadTask.download(MavenDownloadTask.java:52)
>> 		at
>> org.apache.karaf.features.internal.download.impl.AbstractRetryableDownloadTask.run(AbstractRetryableDownloadTask.java:60)
>> 		... 6 more
>> 		Suppressed: shaded.org.eclipse.aether.transfer.MetadataNotFoundException:
>> Could not find metadata
>> org.rogatio.circlead.sunray:circlead-core-provider-0.0.1/maven-metadata.xml
>> in local (/home/matthias/.m2/repository)
>> 			at
>> shaded.org.eclipse.aether.internal.impl.DefaultMetadataResolver.resolve(DefaultMetadataResolver.java:220)
>> 			at
>> shaded.org.eclipse.aether.internal.impl.DefaultMetadataResolver.resolveMetadata(DefaultMetadataResolver.java:178)
>> 			at
>> shaded.org.apache.maven.repository.internal.DefaultVersionRangeResolver.getVersions(DefaultVersionRangeResolver.java:198)
>> 			at
>> shaded.org.apache.maven.repository.internal.DefaultVersionRangeResolver.resolveVersionRange(DefaultVersionRangeResolver.java:148)
>> 			at
>> shaded.org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveVersionRange(DefaultRepositorySystem.java:232)
>> 			at
>> org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolveLatestVersionRange(AetherBasedResolver.java:1060)
>> 			at
>> org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:765)
>> 			... 11 more
>> 		Suppressed: shaded.org.eclipse.aether.transfer.MetadataNotFoundException:
>> Could not find metadata
>> org.rogatio.circlead.sunray:circlead-core-provider-0.0.1/maven-metadata.xml
>> in central (http://repo1.maven.org/maven2/)
>> 			at
>> shaded.org.eclipse.aether.connector.basic.MetadataTransportListener.transferFailed(MetadataTransportListener.java:48)
>> 			at
>> shaded.org.eclipse.aether.connector.basic.BasicRepositoryConnector$TaskRunner.run(BasicRepositoryConnector.java:368)
>> 			at
>> shaded.org.eclipse.aether.util.concurrency.RunnableErrorForwarder$1.run(RunnableErrorForwarder.java:75)
>> 			at
>> shaded.org.eclipse.aether.connector.basic.BasicRepositoryConnector$DirectExecutor.execute(BasicRepositoryConnector.java:642)
>> 			at
>> shaded.org.eclipse.aether.connector.basic.BasicRepositoryConnector.get(BasicRepositoryConnector.java:235)
>> 			at
>> shaded.org.eclipse.aether.internal.impl.DefaultMetadataResolver$ResolveTask.run(DefaultMetadataResolver.java:580)
>> 			at
>> shaded.org.eclipse.aether.util.concurrency.RunnableErrorForwarder$1.run(RunnableErrorForwarder.java:75)
>> 			... 3 more
>> 		Suppressed: shaded.org.eclipse.aether.transfer.MetadataNotFoundException:
>> Could not find metadata
>> org.rogatio.circlead.sunray:circlead-core-provider-0.0.1/maven-metadata.xml
>> in apache (http://repository.apache.org/content/groups/snapshots-group/)
>> 			at
>> shaded.org.eclipse.aether.connector.basic.MetadataTransportListener.transferFailed(MetadataTransportListener.java:48)
>> 			at
>> shaded.org.eclipse.aether.connector.basic.BasicRepositoryConnector$TaskRunner.run(BasicRepositoryConnector.java:368)
>> 			at
>> shaded.org.eclipse.aether.util.concurrency.RunnableErrorForwarder$1.run(RunnableErrorForwarder.java:75)
>> 			at
>> shaded.org.eclipse.aether.connector.basic.BasicRepositoryConnector$DirectExecutor.execute(BasicRepositoryConnector.java:642)
>> 			at
>> shaded.org.eclipse.aether.connector.basic.BasicRepositoryConnector.get(BasicRepositoryConnector.java:235)
>> 			at
>> shaded.org.eclipse.aether.internal.impl.DefaultMetadataResolver$ResolveTask.run(DefaultMetadataResolver.java:580)
>> 			at
>> shaded.org.eclipse.aether.util.concurrency.RunnableErrorForwarder$1.run(RunnableErrorForwarder.java:75)
>> 			... 3 more
>> 		Suppressed: shaded.org.eclipse.aether.transfer.MetadataNotFoundException:
>> Could not find metadata
>> org.rogatio.circlead.sunray:circlead-core-provider-0.0.1/maven-metadata.xml
>> in ops4j.sonatype.snapshots.deploy
>> (https://oss.sonatype.org/content/repositories/ops4j-snapshots/)
>> 			at
>> shaded.org.eclipse.aether.connector.basic.MetadataTransportListener.transferFailed(MetadataTransportListener.java:48)
>> 			at
>> shaded.org.eclipse.aether.connector.basic.BasicRepositoryConnector$TaskRunner.run(BasicRepositoryConnector.java:368)
>> 			at
>> shaded.org.eclipse.aether.util.concurrency.RunnableErrorForwarder$1.run(RunnableErrorForwarder.java:75)
>> 			at
>> shaded.org.eclipse.aether.connector.basic.BasicRepositoryConnector$DirectExecutor.execute(BasicRepositoryConnector.java:642)
>> 			at
>> shaded.org.eclipse.aether.connector.basic.BasicRepositoryConnector.get(BasicRepositoryConnector.java:235)
>> 			at
>> shaded.org.eclipse.aether.internal.impl.DefaultMetadataResolver$ResolveTask.run(DefaultMetadataResolver.java:580)
>> 			at
>> shaded.org.eclipse.aether.util.concurrency.RunnableErrorForwarder$1.run(RunnableErrorForwarder.java:75)
>> 			... 3 more
>> 	Caused by:
>> shaded.org.eclipse.aether.resolution.VersionRangeResolutionException: Error
>> resolving artifact
>> org.rogatio.circlead.sunray:circlead-core-provider-0.0.1:jar:[0.0,)
>> 		at
>> org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolveLatestVersionRange(AetherBasedResolver.java:1068)
>> 		at
>> org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:765)
>> 		... 11 more
>>
>>
>>
>>
>> --
>> Sent from: http://karaf.922171.n3.nabble.com/Karaf-Dev-f930721.html
>>
> 

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com

Mime
View raw message