Hi Eric,

> Should I put this in a parent POM

Here is how my projects do it:
http://search.maven.org/remotecontent?filepath=org/scijava/pom-scijava/1.150/pom-scijava-1.150.pom

Note in particular the profiles at the bottom.

We use this pom-scijava as parent for all our stuff. To deploy to OSS
Sonatype (which gets mirrored to Central), we use the
"sonatype-oss-release" profile which is structured according to the guide
at:
https://docs.sonatype.org/display/Repository/Sonatype+OSS+Maven+Repository+Usage+Guide

For artifacts which are still incubating and not yet ready for Central, we
deploy to our own Maven repository (http://maven.imagej.net/) using a
"deploy-to-imagej" profile.

So yes, with this solution, the pom-scijava on Central does contain a
reference to our Maven repository, but only in a profile so as not to
infect anyone else's builds with it by default.

> or inside a <profile> of my settings.xml file?

My rule of thumb is: you should not have to touch a settings.xml just to
build the code. Any solution requiring that, IMHO, makes things too
difficult. It's fine if you have to touch settings.xml to *deploy*
artifacts, or to configure a proxy for performance, but not just for
building.

Regards,
Curtis


On Wed, Mar 19, 2014 at 3:23 PM, Eric Kolotyluk <[email protected]>wrote:

> Does anyone know of any good documentation on 'Open Source Best Practices
> with Maven'
>
> For example, in my POM, I want to set up
>
>   <distributionManagement>
> <downloadUrl>http://localhost:8081/nexus/content/groups/public
> </downloadUrl>
>     <repository>
>       <uniqueVersion>false</uniqueVersion>
>       <id>nexus-kolotyluk</id>
>       <name>Local Release Repository</name>
> <url>http://localhost:8081/nexus/content/repositories/releases</url>
>       <layout>default</layout>
>     </repository>
>     <snapshotRepository>
>       <id>nexus-kolotyluk</id>
>       <name>Local Snapshot Repository</name>
> <url>http://localhost:8081/nexus/content/repositories/snapshots</url>
>       <layout>default</layout>
>     </snapshotRepository>
>   </distributionManagement>
>
> But that is my local repository on my development computer.
>
> If I want to push my project to Maven Central some day, I don't think I
> want this in my POM.
>
> Should I put this in a parent POM, or inside a <profile> of my
> settings.xml file?
>
> If I put it in a parent POM, then I need to push that to Maven Central
> too, so that does not sound like a good idea.
>
> Cheer, Eric
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

Reply via email to