Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tycho-user] Publishing artifacts to Nexus

Nexus does not support hosted p2 repositories.

You can deploy artifacts to maven hosted repository, but you can't deploy to a group repository. Please check nexus documentation or nexus users mailing list for more details.

--
Regards,
Igor


On 11-10-04 2:41 PM, Dan Dromereschi wrote:
Hi all,

We have setup a Maven + Tycho build for one of our OSGi based
applications. We managed to make it build the required contents of a P2
repository that we can later add to a target platform definition in Eclipse.

However, we would also like to get the artifacts published to a Nexus
repository. I am using a local version of Nexus 1.9.2.2 for testing.

Having the following mirror definition in .m2/settings.xml, I get some
stuff published to the http://localhost:8081/nexus/content/groups/public
repository, but not our application's bundles. For instance, I can see
there org.eclipse.tycho, commons-cli, commons-collections and many others.

<mirrors>
<mirror>
<!--This sends everything else to /public -->
<id>nexus</id>
<mirrorOf>*</mirrorOf>
<url>http://localhost:8081/nexus/content/groups/public</url>
</mirror>
</mirrors>
<profiles>
<profile>
<id>nexus</id>
<!--Enable snapshots for the built in central repo to direct -->
<!--all requests to nexus via the mirror -->
<repositories>
<repository>
<id>central</id>
<url>http://localhost:8081/nexus/content/groups/public</url>
<releases><enabled>true</enabled></releases>
<snapshots><enabled>true</enabled></snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>central</id>
<url>http://localhost:8081/nexus/content/groups/public</url>
<releases><enabled>true</enabled></releases>
<snapshots><enabled>true</enabled></snapshots>
</pluginRepository>
</pluginRepositories>
<distributionManagement>
<repository>
<id>central</id>
<layout>default</layout>
<name>Nexus</name>
<url>http://localhost:8081/nexus/content/groups/public</url>
</repository>
</distributionManagement>
</profile>
</profiles>
<activeProfiles>
<!--make the profile active all the time -->
<activeProfile>nexus</activeProfile>
</activeProfiles>


Also, for every bundle that is built, I see the following log message:
[DEBUG] Ignoring Maven repository nexus
(http://localhost:8081/nexus/content/groups/public)

Adding  the following to the parent bundle/pom.xml will copy the
artifacts to the specified directory on my machine:
<distributionManagement>
<repository>
<id>central</id>
<layout>default</layout>
<name>Nexus</name>
<url>file://d:/test00</url>
</repository>
</distributionManagement>

However, after modifying (
<url>http://localhost:8081/nexus/content/groups/public</url> ) it to
publish to the Nexus repository I get the exception below:
....................................................................................
Caused by: org.sonatype.aether.transfer.ArtifactTransferException: Could
not transfer artifact ....parent:pom:1.0.0-20111004.183056-1 from/to
central (http://localhost:8081/nexus/content/groups/public): Failed to
transfer
http://localhost:8081/nexus/content/groups/public/com/spectraseis/riocad/com.spectraseis.riocad.parent/1.0.0-SNAPSHOT/com.spectraseis.riocad.parent-1.0.0-20111004.183056-1.pom.
Error code 400, Bad Request
     at
org.sonatype.aether.connector.async.AsyncRepositoryConnector$3.wrap(AsyncRepositoryConnector.java:1426)
     at
org.sonatype.aether.connector.async.AsyncRepositoryConnector$3.wrap(AsyncRepositoryConnector.java:1417)
     at
org.sonatype.aether.connector.async.AsyncRepositoryConnector$PutTask.flush(AsyncRepositoryConnector.java:1065)
     at
org.sonatype.aether.connector.async.AsyncRepositoryConnector.put(AsyncRepositoryConnector.java:337)
     at
org.sonatype.aether.impl.internal.DefaultDeployer.deploy(DefaultDeployer.java:278)
     ... 25 more


Any help is much appreciated.

Regards,

Dan



_______________________________________________
tycho-user mailing list
tycho-user@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/tycho-user


Back to the top