OK, this was great advice. :-)
This works nicely because I do not have to have separate profiles in my
pom.xml for my local Nexus or Sonatype's remote one. This keeps the
pom.xml smaller.
This would be a nice narrative to add to
https://docs.sonatype.org/display/Repository/Sonatype+OSS+Maven+Repository+Usage+Guide
Getting arbitrarily closer to pushing my first artifact ever to Maven
Central...
Cheers, Eric
On 3/19/2014 2:15 PM, Mirko Friedenhagen wrote:
> Hello Eric,
>
> as outlined in https://maven.apache.org/plugins/maven-deploy-plugin/deploy-mojo.html
> in your settings.xml you might define properties
> altReleaseDeploymentRepository and altSnapshotDeploymentRepository in
> a profile internal-repository which is activated by default while you
> do not define any repository at all in your pom.
> Now while developing you just invoke mvn deploy and everything should
> go to your local Nexus.
> When invoking mvn -P!internal-repository everything should go to central.
> Regards Mirko
> --
> http://illegalstateexception.blogspot.com/
> https://github.com/mfriedenhagen/ (http://osrc.dfm.io/mfriedenhagen)
> https://bitbucket.org/mfriedenhagen/
>
>
> On Wed, Mar 19, 2014 at 9:39 PM, Stevo Slavić <sslavic@gmail.com> wrote:
>> Hello Eric,
>>
>> I'd consider using Sonatype OSS with Sonatype OSS parent pom and everything
>> that goes along (see more details at
>> https://docs.sonatype.org/display/Repository/Sonatype+OSS+Maven+Repository+Usage+Guide)
>> For OSS development maybe use private (and not local) Nexus as proxy only,
>> with mirrors defined in local settings.xml, but publish both snapshots and
>> releases to Sonatype OSS repositories which get synced to Maven Central.
>> Why run Nexus on local machine? To control dependencies and their metada
>> for yourself only? Still looks as overkill to me, if you're the sole user
>> and plan on developing OSS. You already have local repository, and you
>> should have same experience as your OSS users (so no custom local metadata
>> of dependencies, depend only on stuff available on Maven Central, with
>> metadata as it is published on Maven Central).
>>
>> Kind regards,
>> Stevo Slavic
>>
>>
>> On Wed, Mar 19, 2014 at 9:23 PM, Eric Kolotyluk <eric.kolotyluk@gmail.com>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: users-unsubscribe@maven.apache.org
>>> For additional commands, e-mail: users-help@maven.apache.org
>>>
>>>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
|