You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@servicemix.apache.org by Sana <sa...@gmail.com> on 2014/06/20 03:45:44 UTC

feature installer does not work with mvn

Hi,

I am trying to add a feature repository using mvn handler. My features.xml
file is right inside src/main/resources. 

I have used build-helper-maven-plugin to attach features.xml while
installing the pom.xml. In my
.m2/repository/{group-id}/{artifact-id}/{version}/, I can see a
{artifact-id}-{version}-features.xml file created alongside the jar file.

When I try, features:addurl mvn
{group-id}/{artifact-id}/{version}/xml/features, I get the below error,

[Fatal Error] :6:3: The element type "hr" must be terminated by the matching
end-tag "</hr>".
Could not add Feature Repository:
org.xml.sax.SAXParseException: The element type "hr" must be terminated by
the matching end-tag "</hr>".
Please verify that the feature repository URL is correct and that your
network connection works fine.

Can someone please explain how does mvn handler works for features
repository?

Thanks!



--
View this message in context: http://servicemix.396122.n5.nabble.com/feature-installer-does-not-work-with-mvn-tp5721001.html
Sent from the ServiceMix - Dev mailing list archive at Nabble.com.

Re: feature installer does not work with mvn

Posted by Sana <sa...@gmail.com>.
Thanks Gert!

I had the classifier name incorrect. Now it works.





--
View this message in context: http://servicemix.396122.n5.nabble.com/feature-installer-does-not-work-with-mvn-tp5721001p5721053.html
Sent from the ServiceMix - Dev mailing list archive at Nabble.com.

Re: feature installer does not work with mvn

Posted by Gert Vanthienen <ge...@gmail.com>.
L.S.,

That URL does look correct at first glance: the syntax is
mvn:<groupId>/<artifactId>/<version>/<type>/<classifier>.  Could you
post the full path of the features.xml file in your local repository
as well as the exact URL you're trying to use to fetch that file?

Thanks,

Gert


On Tue, Jun 24, 2014 at 9:47 PM, Sana <sa...@gmail.com> wrote:
> Hi,
>
> I have removed http://oss.sonatype.org/content/repositories/releases/, from
> org.ops4j.pax.url.mvn.cfg file.
>
> And I tried the maven coordinate features:addurl
> mvn:groupId/artifactID/version/xml/features but it still fails to add.
>
> Getting error: Could not add Feature Repository:
> java.lang.RuntimeException: URL
> [mvn:groupId/artifactID/version/xml/features] could not be resolved.
> Please verify that the feature repository URL is correct and that your
> network connection works fine.
>
>
> When I do cat, I got the below error
>
> cat mvn:groupId/artifactID/version/xml/features
> Error executing command: URL [mvn:groupId/artifactID/version/xml/features]
> could not be resolved.
>
> I am just wondering how the above maven coordinate will work, when the xml
> file is not embedded in a jar..
>
> What should be the right maven coordinate for a file which is not embedded
> in a jar.
>
>
>
> --
> View this message in context: http://servicemix.396122.n5.nabble.com/feature-installer-does-not-work-with-mvn-tp5721001p5721046.html
> Sent from the ServiceMix - Dev mailing list archive at Nabble.com.

Re: feature installer does not work with mvn

Posted by Sana <sa...@gmail.com>.
Hi,

I have removed http://oss.sonatype.org/content/repositories/releases/, from
org.ops4j.pax.url.mvn.cfg file.

And I tried the maven coordinate features:addurl
mvn:groupId/artifactID/version/xml/features but it still fails to add.

Getting error: Could not add Feature Repository:
java.lang.RuntimeException: URL
[mvn:groupId/artifactID/version/xml/features] could not be resolved.
Please verify that the feature repository URL is correct and that your
network connection works fine.


When I do cat, I got the below error

cat mvn:groupId/artifactID/version/xml/features
Error executing command: URL [mvn:groupId/artifactID/version/xml/features]
could not be resolved.

I am just wondering how the above maven coordinate will work, when the xml
file is not embedded in a jar..

What should be the right maven coordinate for a file which is not embedded
in a jar.



--
View this message in context: http://servicemix.396122.n5.nabble.com/feature-installer-does-not-work-with-mvn-tp5721001p5721046.html
Sent from the ServiceMix - Dev mailing list archive at Nabble.com.

Re: feature installer does not work with mvn

Posted by Achim Nierbeck <bc...@googlemail.com>.
Hi,

it is possible, but the maven coordinate is not correct,
the coordinate you gave is the default for a jar, that why it worked with
an embedded feature.xml.
You'll need to add a "fully qualified" maven coordinate for the feature
file.
mvn:groupID/artifactID/version/xml/features

regards, Achim


2014-06-21 3:42 GMT+02:00 Sana <sa...@gmail.com>:

> Thanks! It worked if the feature.xml file is inside the jar.
>
> However, I am still not able to add a feature.xml file which is located
> outside a jar with mvn handler.
>
> For instance, features:addurl
> mvn:{group-id}/{artifact-id}/{version}/{artifact-Id}-{version}-features.xml
>
>  or
>
> features:addurl mvn:{group-id}/{artifact-id}/{version}/
>
> does not work. There is no jar available at this location as the pom has
> packaging type as "pom".
>
> file protocol works perfectly fine. I want to use mvn to do it. Please let
> me know if it is possible.
>
> Thanks!
>
>
>
>
>
>
> --
> View this message in context:
> http://servicemix.396122.n5.nabble.com/feature-installer-does-not-work-with-mvn-tp5721001p5721025.html
> Sent from the ServiceMix - Dev mailing list archive at Nabble.com.
>



-- 

Apache Member
Apache Karaf <http://karaf.apache.org/> Committer & PMC
OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer &
Project Lead
blog <http://notizblog.nierbeck.de/>

Software Architect / Project Manager / Scrum Master

Re: feature installer does not work with mvn

Posted by Sana <sa...@gmail.com>.
Thanks! It worked if the feature.xml file is inside the jar. 

However, I am still not able to add a feature.xml file which is located
outside a jar with mvn handler. 

For instance, features:addurl
mvn:{group-id}/{artifact-id}/{version}/{artifact-Id}-{version}-features.xml

 or 

features:addurl mvn:{group-id}/{artifact-id}/{version}/

does not work. There is no jar available at this location as the pom has
packaging type as "pom".

file protocol works perfectly fine. I want to use mvn to do it. Please let
me know if it is possible.

Thanks!






--
View this message in context: http://servicemix.396122.n5.nabble.com/feature-installer-does-not-work-with-mvn-tp5721001p5721025.html
Sent from the ServiceMix - Dev mailing list archive at Nabble.com.

Re: feature installer does not work with mvn

Posted by Krzysztof Sobkowiak <kr...@gmail.com>.
Hi

Have checked whether the feature file is a valid xml file?

Best regards
Krzysztof

On 20.06.2014 03:45, Sana wrote:
> Hi,
>
> I am trying to add a feature repository using mvn handler. My features.xml
> file is right inside src/main/resources. 
>
> I have used build-helper-maven-plugin to attach features.xml while
> installing the pom.xml. In my
> .m2/repository/{group-id}/{artifact-id}/{version}/, I can see a
> {artifact-id}-{version}-features.xml file created alongside the jar file.
>
> When I try, features:addurl mvn
> {group-id}/{artifact-id}/{version}/xml/features, I get the below error,
>
> [Fatal Error] :6:3: The element type "hr" must be terminated by the matching
> end-tag "</hr>".
> Could not add Feature Repository:
> org.xml.sax.SAXParseException: The element type "hr" must be terminated by
> the matching end-tag "</hr>".
> Please verify that the feature repository URL is correct and that your
> network connection works fine.
>
> Can someone please explain how does mvn handler works for features
> repository?
>
> Thanks!
>
>
>
> --
> View this message in context: http://servicemix.396122.n5.nabble.com/feature-installer-does-not-work-with-mvn-tp5721001.html
> Sent from the ServiceMix - Dev mailing list archive at Nabble.com.


-- 
Krzysztof Sobkowiak

JEE & OSS Architect | Technical Architect @ Capgemini
Capgemini <http://www.pl.capgemini.com/> | Software Solutions Center
<http://www.pl.capgemini-sdm.com/> | Wroclaw
e-mail: krzys.sobkowiak@gmail.com <ma...@gmail.com> |
Twitter: @KSobkowiak
Calendar: goo.gl/yvsebC

Re: feature installer does not work with mvn

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi,

I identified an issue with the Sonatype OPS4J Maven repository (it seems 
related to an update of Nexus there).
When a feature is not found on the repository, instead of returning 404, 
it returns a HTML page saying 404.

If you remove the ops4j repository from etc/org.ops4j.pax.url.mvn.cfg, 
it should work.

Regards
JB

On 06/20/2014 03:45 AM, Sana wrote:
> Hi,
>
> I am trying to add a feature repository using mvn handler. My features.xml
> file is right inside src/main/resources.
>
> I have used build-helper-maven-plugin to attach features.xml while
> installing the pom.xml. In my
> .m2/repository/{group-id}/{artifact-id}/{version}/, I can see a
> {artifact-id}-{version}-features.xml file created alongside the jar file.
>
> When I try, features:addurl mvn
> {group-id}/{artifact-id}/{version}/xml/features, I get the below error,
>
> [Fatal Error] :6:3: The element type "hr" must be terminated by the matching
> end-tag "</hr>".
> Could not add Feature Repository:
> org.xml.sax.SAXParseException: The element type "hr" must be terminated by
> the matching end-tag "</hr>".
> Please verify that the feature repository URL is correct and that your
> network connection works fine.
>
> Can someone please explain how does mvn handler works for features
> repository?
>
> Thanks!
>
>
>
> --
> View this message in context: http://servicemix.396122.n5.nabble.com/feature-installer-does-not-work-with-mvn-tp5721001.html
> Sent from the ServiceMix - Dev mailing list archive at Nabble.com.
>

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