-
15. Re: How to features:addUrl from maven repository ?
simplex-software May 24, 2012 1:15 PM (in response to simplex-software)Hi,
I'm sorry to have spokeb too early. Now that the features file gets correctly deployed into the maven repository, I try to features:addUrl but I get "URL could not be resolved". If I'm using file: it works but not with mvn:. What could be the problem here. I've read that mvn: doesn't work with maven 3. Could it be true ?
Kind regards,
Nicolas
-
16. Re: How to features:addUrl from maven repository ?
iocanel May 24, 2012 1:31 PM (in response to simplex-software)Hi Nicolas,
Since the features file is now inside your maven repository, it should work as long as you provide the correct syntax.
Can you please provide the exact command that you used (features:addUrl ...). Also can you please paste the full path of the file that did worked for you?
-
17. Re: How to features:addUrl from maven repository ?
simplex-software May 25, 2012 6:26 AM (in response to iocanel)Hi,
Many thanks for your suport and your patience.
The following command works:
features:addUrl file:C:/Users/nicolas/.m2/repository/com/unic/delimij/integration/test.features/0.0.1-SNAPSHOT/test.features-0.0.1-SNAPSHOT-features.xml
The following doesn't:
features:addUrl mvn:com.unic.delimij.integration/test.features/0.0.1-SNAPSHOT/test.features-0.0.1-SNAPSHOT-features.xml
and displays the following message:
Could not add Feature Repository:
java.lang.RuntimeException: URL mvn:com.unic.delimij.integration/test.features/0.0.1-SNAPSHOT/test.features-0.0.1-SNAPSHOT-features.xml could not be resolved
Many thanks in advance for your help.
Nicolas
-
18. Re: How to features:addUrl from maven repository ?
iocanel May 25, 2012 10:25 AM (in response to simplex-software)The mvn url that you are using is wrong. The correct one should be:
features:addUrl mvn:com.unic.delimij.integration/test.features/0.0.1-SNAPSHOT/test.features-0.0.1-SNAPSHOT/xml/features
When using the mvn url protocol handler you don't specify the artifact file name itself. You just specify the artifact properties separated by /. As I posted in my original response the format should be:
features:addUrl mvn:<groupId>/<artifactId>/<version>/<type>/<classifier>
-
19. Re: How to features:addUrl from maven repository ?
simplex-software May 25, 2012 10:43 AM (in response to iocanel)Hi,
Thanks for this update. Yes, I didn't understand that. However, typing the following command:
karaf@root> features:addUrl mvn:com.unic.delimij.integration/test.features/0.0.1-SNAPSHOT/test.features-0.0.1-SNAPSHOT/xml/features
Could not add Feature Repository:
java.lang.RuntimeException: URL mvn:com.unic.delimij.integration/test.features/0.0.1-SNAPSHOT/test.features-0.0.1-SNAPSHOT/xml/features could not be resolved.
karaf@root>
Please notice that I don't have any xml subdirectory in the repository. But this is probably normal since, as you explained, xml is not the name of a directory but of the classifier.
I really don't understand what happens.
Kind regards,
Nicolas
-
20. Re: How to features:addUrl from maven repository ?
iocanel May 25, 2012 10:58 AM (in response to simplex-software)I think that I didn't followed my own advice about the syntax.
This should work:
features:addUrl mvn:com.unic.delimij.integration/test.features/0.0.1-SNAPSHOT/xml/features
Edited by: iocanel on May 25, 2012 5:56 PM
-
21. Re: How to features:addUrl from maven repository ?
simplex-software May 25, 2012 11:02 AM (in response to iocanel)Yes, this one has worked. Sorry for not having read carrefully enough, I was pretty sure one has to specify a path into the maven repository. And thanks again for your patience. However, I find all this stuff pretty complex, maybe too complex and very relying on syntax things.
This time is really workinbg and I hope I understood it.
Kind regards,
Nicolas
-
22. Re: How to features:addUrl from maven repository ?
iocanel May 25, 2012 11:08 AM (in response to simplex-software)Yay!
As long as you go with the format:
features:addUrl mvn:<groupId>/<artifactId>/<version>/<type>/<classifier>
it won't cause you any future problems.
Besides that, its all about being careful and avoid typos