This issue is because Maven doesn't handle redirects correctly (see
MNG-4428).
I'm guessing that you are using JBoss's old Maven repo and that the artifact
you're trying to get has been migrated to their new Nexus-based repo. In
that process they've put a redirect on the old repo, which Maven cannot
handle correctly. Thus the malformed/incorrect pom you have.

I suggest that you contact JBoss/Red Hat and inform them of this issue. We
had the same problem at Codehaus Cargo when we migrated to Codehaus' Nexus
instance. The solution we put in place what that the user agent is checked
so that for Maven a 404 is returned, while all other agents gets the
redirect.

For you to fix your build, you need to start using JBoss' new Maven repo.
There's info about this at the JBoss wiki.

/Anders

On Tue, Aug 31, 2010 at 10:28, mnenchev <[email protected]> wrote:

>
> Hi,
>
> I am having strange problem with my maven build since yesterday. Here is
> what error i got when i try to build my project.
> Note: Every thing was working just fine last week and i didn't change
> anything.
>
> Project ID: org.codehaus.mojo:jboss-packaging-maven-plugin
>
> Reason: Error getting POM for
> 'org.codehaus.mojo:jboss-packaging-maven-plugin' from the repository:
> Unable
> to read local copy of metadata: Cannot read metadata from
>
> '/home/mnenchev/.m2/repository/org/codehaus/mojo/jboss-packaging-maven-plugin/maven-metadata-codehaus.xml':
> end tag name </body> must match start tag name <hr> from line 7 (position:
> TEXT seen ...</address>\n</body>... @9:8)
>  org.codehaus.mojo:jboss-packaging-maven-plugin:pom:LATEST
>
>  for project org.codehaus.mojo:jboss-packaging-maven-plugin
>
> Here is the content of the maven-metadata-codehause.xml:
> <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
> <html><head>
> <title>301 Moved Permanently</title>
> </head><body>
> <h1>Moved Permanently</h1>
> <p>The document has moved
>
> https://nexus.codehaus.org/content/repositories/releases/org/codehaus/mojo/jboss-packaging-maven-plugin/maven-metadata.xml
> here .</p>
> <hr>
> <address>Apache/2.0.52 (Red Hat) Server at repository.codehaus.org Port
> 80</address>
> </body></html>
>
> What is this error? How to fix it? When i remove this "<hr>" tag it is
> working.
>
> Regards.
> --
> View this message in context:
> http://maven.40175.n5.nabble.com/Strange-hr-tag-in-maven-metadata-codehaus-xml-does-not-allow-me-to-build-successfully-tp2797753p2797753.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

Reply via email to