maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eric Kolotyluk <eric.koloty...@gmail.com>
Subject Re: Updated documentation for Central Repository
Date Wed, 26 Mar 2014 04:29:02 GMT

On 3/25/2014 4:42 PM, Manfred Moser wrote:
> Hello everyone!
>
> We have updated the documentation for publishing artifacts to the Central Repository
via the free Sonatype Open Source Repository Hosting (OSSRH) and added more documents about
status, getting help and more and put it all together on a brand new website.
>
> Please look at the announcement blog post at
>
> http://blog.sonatype.com/2014/03/a-home-for-the-central-repository/
>
> and the actual new website at http://central.sonatype.org/
>
> Specifically the instructions for Apache Maven are at
>
> http://central.sonatype.org/pages/apache-maven.html
>
> but I would like to encourage you all to have a look at the rest of the site as well.
>
> The Maven docs details usage of things like the Nexus Staging Maven Plugin for command
line based release (no more logging into the UI) and a whole lot of other things.
>
> We are hoping you find this all useful and get some great feedback and recommendations
for improvements from you.
>
> Looking forward to continue to improve the site going forward.
>
> Jason, Joel, Manfred and others
> Sonatype Ops Team - @sonatype_ops
>
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
In the Maven section, I was hoping to see some discussion like...

*Local Repository Manager vs Sonatype OSS*

You may be in a situation that you have a local or corporate Repository 
Manager that you use as part of your daily software development process, 
and you only want to use the Sonatype OSS Repository Manager on 
occasion. You can can configure this in your settings.xml like this:

   <profile>
     <id>local-repository</id>
     <properties>
<altReleaseDeploymentRepository>local-nexus::default::http://localhost:8081/nexus/content/repositories/releases/</altReleaseDeploymentRepository>
<altSnapshotDeploymentRepository>local-nexus::default::http://localhost:8081/nexus/content/repositories/snapshots/</altSnapshotDeploymentRepository>
     </properties>
</profile>

   <activeProfiles>
<activeProfile>local-repository</activeProfile>
   </activeProfiles>

   <servers>
     <server>
       <id>local-nexus</id>
       <username>deployment</username>
       <password>/secret/</password>
     </server>
     <server>
       <id>sonatype-nexus-snapshots</id>
       <username>/username/</username>
       <password>/secret/</password>
     </server>
     <server>
       <id>sonatype-nexus-staging</id>
       <username>/username/</username>
       <password>/secret/</password>
     </server>
   </servers>

Normally when you run deploy, your artifacts will go to 'local-nexus' 
(or whatever you configure), but when you want to use the Sonatype OSS 
repository, you can just use

   mvn deploy -P!local-repository

and Maven will deploy according to the <distributionManagement> defined in

   <parent>
     <groupId>org.sonatype.oss</groupId>
     <artifactId>oss-parent</artifactId>
     <version>7</version>
   </parent>

The benefit of this method is that you do not have to put any local or 
unnecessary corporate information in the pom.xml you are distributing 
with your project.

Warning: some older versions of the maven-deploy-plugin do not support 
this properly, so use the latest version, for example, in your pom.xml:

   <build>
     <pluginManagement>
       <plugins>
         <plugin>
           <!--
             Bugs in older versions prevent altReleaseDeploymentRepository
             and altSnapshotDeploymentRepository from working correctly
https://maven.apache.org/plugins/maven-deploy-plugin/deploy-mojo.html
            -->
<artifactId>maven-deploy-plugin</artifactId>
           <version>2.8.1</version>
         </plugin>
     </pluginManagement>
     . . .
   </build>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message