I really don't think the validator should respect that.
No matter how much those classes are wrapped, I think possibly a workaround 
would be okay but since the validator 
would fail on wrapped imported classes that require more imports I think that 
sucks.

A big banner that says "This is how you shade / this is how you get your bundle 
into a smx repo" would be better.

just my 0.2

/je
On Sep 19, 2010, at 7:22 PM, Willem Jiang wrote:

> Hi Christian,
> 
> That is because current karaf feature validate doesn't support to check maven 
> artifact URL which starts with "wrap".
> I will look at this issue later today.
> 
> Willem
> 
> On 9/20/10 4:26 AM, Christian Mueller wrote:
>> 
>> Hello,
>> 
>> at present mvn clean install -Pvalidate in platform/karaf fail with the
>> following exception:
>> 
>> christian-muellers-macbook-pro:karaf muellerc$ mvn clean install -Pvalidate
>> ...
>> Downloading:
>> http://svn.apache.org/repos/asf/servicemix/m2-repo/wrap:mvn:com/ibm/icu/icu4j/4.0.1/icu4j-4.0.1.jar
>> [INFO] Unable to find resource 'wrap:mvn:com.ibm.icu:icu4j:jar:4.0.1' in
>> repository servicemix (http://svn.apache.org/repos/asf/servicemix/m2-repo)
>> Downloading:
>> http://repository.ops4j.org/maven2/wrap:mvn:com/ibm/icu/icu4j/4.0.1/icu4j-4.0.1.jar
>> [INFO] Unable to find resource 'wrap:mvn:com.ibm.icu:icu4j:jar:4.0.1' in
>> repository ops4j (http://repository.ops4j.org/maven2)
>> Downloading:
>> http://repository.jboss.org/nexus/content/groups/public//wrap:mvn:com/ibm/icu/icu4j/4.0.1/icu4j-4.0.1.jar
>> [INFO] Unable to find resource 'wrap:mvn:com.ibm.icu:icu4j:jar:4.0.1' in
>> repository jboss (http://repository.jboss.org/nexus/content/groups/public/)
>> Downloading:
>> http://s3.amazonaws.com/maven.springframework.org/milestone/wrap:mvn:com/ibm/icu/icu4j/4.0.1/icu4j-4.0.1.jar
>> [INFO] Unable to find resource 'wrap:mvn:com.ibm.icu:icu4j:jar:4.0.1' in
>> repository spring-milestone
>> (http://s3.amazonaws.com/maven.springframework.org/milestone)
>> Downloading:
>> http://download.java.net/maven/2//wrap:mvn:com/ibm/icu/icu4j/4.0.1/icu4j-4.0.1.jar
>> [INFO] Unable to find resource 'wrap:mvn:com.ibm.icu:icu4j:jar:4.0.1' in
>> repository java.net.m2 (http://download.java.net/maven/2/)
>> Downloading:
>> http://repo1.maven.org/maven2/wrap:mvn:com/ibm/icu/icu4j/4.0.1/icu4j-4.0.1.jar
>> [INFO] Unable to find resource 'wrap:mvn:com.ibm.icu:icu4j:jar:4.0.1' in
>> repository central (http://repo1.maven.org/maven2)
>> org.apache.maven.artifact.resolver.ArtifactNotFoundException: Unable to
>> download the artifact from any repository
>> 
>> Try downloading the file manually from the project website.
>> 
>> Then, install it using the command:
>>     mvn install:install-file -DgroupId=wrap:mvn:com.ibm.icu
>> -DartifactId=icu4j -Dversion=4.0.1 -Dpackaging=jar -Dfile=/path/to/file
>> 
>> Alternatively, if you host your own repository you can deploy the file
>> there:
>>     mvn deploy:deploy-file -DgroupId=wrap:mvn:com.ibm.icu -DartifactId=icu4j
>> -Dversion=4.0.1 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url]
>> -DrepositoryId=[id]
>> 
>> 
>>   wrap:mvn:com.ibm.icu:icu4j:jar:4.0.1
>> 
>> from the specified remote repositories:
>>   apache.snapshots (http://repository.apache.org/snapshots),
>>   ops4j (http://repository.ops4j.org/maven2),
>>   central (http://repo1.maven.org/maven2),
>>   java.net.m2 (http://download.java.net/maven/2/),
>>   servicemix (http://svn.apache.org/repos/asf/servicemix/m2-repo),
>>   spring-milestone
>> (http://s3.amazonaws.com/maven.springframework.org/milestone),
>>   servicemix.snapshot
>> (http://repository.apache.org/content/groups/snapshots-group),
>>   jboss (http://repository.jboss.org/nexus/content/groups/public/)
>> 
>> 
>>         at
>> org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:228)
>>         at
>> org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:90)
>>         at
>> org.apache.karaf.tooling.features.ValidateFeaturesMojo.resolve(ValidateFeaturesMojo.java:439)
>>         at
>> org.apache.karaf.tooling.features.ValidateFeaturesMojo.validateBundlesAvailable(ValidateFeaturesMojo.java:287)
>>         at
>> org.apache.karaf.tooling.features.ValidateFeaturesMojo.validate(ValidateFeaturesMojo.java:193)
>>         at
>> org.apache.karaf.tooling.features.ValidateFeaturesMojo.execute(ValidateFeaturesMojo.java:135)
>>         at
>> org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
>>         at
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
>>         at
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556)
>>         at
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535)
>>         at
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
>>         at
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
>>         at
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
>>         at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
>>         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
>>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
>>         at
>> org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
>>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>         at
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>>         at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>>         at java.lang.reflect.Method.invoke(Method.java:597)
>>         at
>> org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
>>         at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
>>         at
>> org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
>>         at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
>> Caused by: org.apache.maven.wagon.ResourceDoesNotExistException: Unable to
>> download the artifact from any repository
>>         at
>> org.apache.maven.artifact.manager.DefaultWagonManager.getArtifact(DefaultWagonManager.java:404)
>>         at
>> org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:216)
>>         ... 24 more
>> [INFO]
>> ------------------------------------------------------------------------
>> [ERROR] BUILD ERROR
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] Unable to validate
>> /Users/muellerc/workspaceApache/camel/platforms/karaf/features/target/classes/features.xml:
>> Unable to download the artifact from any repository
>> 
>> Try downloading the file manually from the project website.
>> 
>> Then, install it using the command:
>>     mvn install:install-file -DgroupId=wrap:mvn:com.ibm.icu
>> -DartifactId=icu4j -Dversion=4.0.1 -Dpackaging=jar -Dfile=/path/to/file
>> 
>> Alternatively, if you host your own repository you can deploy the file
>> there:
>>     mvn deploy:deploy-file -DgroupId=wrap:mvn:com.ibm.icu -DartifactId=icu4j
>> -Dversion=4.0.1 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url]
>> -DrepositoryId=[id]
>> 
>> 
>>   wrap:mvn:com.ibm.icu:icu4j:jar:4.0.1
>> 
>> from the specified remote repositories:
>>   apache.snapshots (http://repository.apache.org/snapshots),
>>   ops4j (http://repository.ops4j.org/maven2),
>>   central (http://repo1.maven.org/maven2),
>>   java.net.m2 (http://download.java.net/maven/2/),
>>   servicemix (http://svn.apache.org/repos/asf/servicemix/m2-repo),
>>   spring-milestone
>> (http://s3.amazonaws.com/maven.springframework.org/milestone),
>>   servicemix.snapshot
>> (http://repository.apache.org/content/groups/snapshots-group),
>>   jboss (http://repository.jboss.org/nexus/content/groups/public/)
>> 
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] For more information, run Maven with the -e switch
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] Total time: 2 minutes 18 seconds
>> [INFO] Finished at: Sun Sep 19 21:58:30 CEST 2010
>> [INFO] Final Memory: 51M/104M
>> [INFO]
>> ------------------------------------------------------------------------
>> 
>> Any idea?
>> 
>> Christian
> 

Johan Edstrom

j...@opennms.org

They that can give up essential liberty to purchase a little temporary safety, 
deserve neither liberty nor safety.

Benjamin Franklin, Historical Review of Pennsylvania, 1759





Reply via email to