On 05/23/2012 07:52 AM, Thomas Diesler wrote:
> Hi Paul,
>
> while trying to reproduce
https://issues.jboss.org/browse/ARQ-520 I
> notice that I cannot run my testsuite because of
>
> [INFO] Building JBossOSGi Repository: Integration Tests
> 1.3.0.Beta5-SNAPSHOT
> [INFO]
> ------------------------------------------------------------------------
> Downloading:
>
http://repo1.maven.org/maven2/org/jboss/osgi/jboss-osgi-parent/1.0.18/jbo...
>
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Reactor Summary:
> [INFO]
> [INFO] JBossOSGi Repository .............................. SUCCESS [0.680s]
> [INFO] JBossOSGi Repository: API ......................... SUCCESS [6.656s]
> [INFO] JBossOSGi Repository: Core ........................ SUCCESS [3.275s]
> [INFO] JBossOSGi Repository: Bundle ...................... SUCCESS [3.194s]
> [INFO] JBossOSGi Repository: Integration Tests ........... FAILURE [0.501s]
> [INFO]
> ------------------------------------------------------------------------
> [INFO] BUILD FAILURE
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Total time: 15.927s
> [INFO] Finished at: Wed May 23 14:41:52 CEST 2012
> [INFO] Final Memory: 26M/196M
> [INFO]
> ------------------------------------------------------------------------
> [ERROR] Failed to execute goal on project jbosgi-repository-itests:
> Could not resolve dependencies for project
> org.jboss.osgi.repository:jbosgi-repository-itests:jar:1.3.0.Beta5-SNAPSHOT:
> Failed to collect dependencies for
> [org.jboss.osgi.repository:jbosgi-repository-api:jar:1.3.0.Beta5-SNAPSHOT
(provided),
> org.jboss.osgi.repository:jbosgi-repository:jar:1.3.0.Beta5-SNAPSHOT
> (provided),
> org.jboss.arquillian.container:arquillian-container-osgi-embedded:jar:1.0.3-SNAPSHOT
> (test),
> org.jboss.arquillian.junit:arquillian-junit-container:jar:1.0.0.Final
> (test), org.jboss.osgi.testing:jbosgi-testing:jar:1.0.4 (test),
> org.jboss.logmanager:jboss-logmanager:jar:1.2.2.GA (test),
> org.jboss.osgi.framework:jbosgi-framework-core:jar:1.4.0.CR1
> (provided)]: Failed to read artifact descriptor for
> org.jboss.osgi.testing:jbosgi-testing:jar:1.0.4: Could not transfer
> artifact org.jboss.osgi:jboss-osgi-parent:pom:1.0.18 from/to central
> (
http://repo1.maven.org/maven2): Error transferring file:
>
repo1.maven.org: Unknown host
repo1.maven.org -> [Help 1]
>
> The artefact in question is however available locally. When I define the
> jboss nexus repositories either in settings.xml or in the project it
> works fine (also without network connection). Do you know what's going on?
>
The "Unknown host repo1.maven.org" seems strange, are you able to ping
the server and browse artifacts?
Maven keeps some metadata that records which repositories each artifact
comes from. So if the metadata says that jboss-osgi-parent came from
the jboss Nexus repository, then it won't use the local artifact
automatically unless it's also available in one of the currently active
repositories.
> I also don't quite understand the reasoning about not defining the repos
> in the project. How can my project repos leak into other projects if my
> project's pom is not the parent?
>
Maven will (unfortunately) add repositories to the build if it finds any
repositories in dependency poms. So a build that depends on an osgi jar
will add the
jboss.org repo to it's own build if the the osgi pom has
the
jboss.org defined.
--
xxxxxxxxxxxxxxxxxxxxxxxxxxxx
Thomas Diesler
JBoss OSGi Lead
JBoss, a division of Red Hat
xxxxxxxxxxxxxxxxxxxxxxxxxxxx