One possibility is to use properties in the distributionMgmt section
and then override the property values from command line. Have a look
at how this is done in the Apache parent pom (for snapshotRepository
distribution):
http://repo.maven.apache.org/maven2/org/apache/apache/10/apache-10.pom

/Anders

On Wed, Mar 28, 2012 at 09:45, Stephen Connolly
<[email protected]> wrote:
> Take a step back and try and explain exactly what the problem is that you
> think you are trying to solve.
>
> I have a sneaky feeling you are trying to get functionality similar to
> staging/promotion available from the good repository managers (iirc nexus
> free does not, but nexus pro and artifactory certainly have the capability,
> I would need to check archivia, but I suspect it might)
>
> On Tuesday, 27 March 2012,  <[email protected]> wrote:
>> Hello Maven users,
>>
>> I have a project master pom.xml with a distribution management section
> defined like this:
>>
>>  <distributionManagement>
>>    <repository>
>>      <id>one</id>
>>      <name>Blah Managed Releases Repository</name>
>>      <url>http://XXXX:8080/archiva/repository/one/</url>
>>      <layout>default</layout>
>>    </repository>
>>    <snapshotRepository>
>>      <id>snapshots</id>
>>      <name>Blah Managed Snapshots Repository</name>
>>      <url>http://XXXX:8080/archiva/repository/snapshots/</url>
>>      <uniqueVersion>true</uniqueVersion>
>>      <layout>default</layout>
>>    </snapshotRepository>
>>  </distributionManagement>
>>
>> I want to be able to override this values on a test and production setup,
> having the production setting enabled by default; After reading the Maven
> site it seems than the only way to do this is by using profiles but after
> some reading on this list it seems than the are not a good choice (many
> caveats).
>>
>> There is a cleaner way to achieve this?
>> Can someone point me to some examples? I'm not sure what to put where
>>
>> Thanks in advance,
>>
>> --Jose
>>
>> Barclays is one of the world's leading banks, and we believe that by
> continuing to integrate the organisation we can better deliver the full
> power of Barclays to customers, clients and the communities in which we
> work. As a visible sign of that integration we are moving to a single
> Barclays brand for the majority of our divisions, including those formerly
> known as Barclays Capital, Barclays Wealth and Barclays Corporate.
>>
>> _______________________________________________
>>
>> This e-mail may contain information that is confidential, privileged or
> otherwise protected from
>> disclosure. If you are not an intended recipient of this e-mail, do not
> duplicate or redistribute
>> it by any means. Please delete it and any attachments and notify the
> sender that you have received
>> it in error. Unless specifically indicated, this e-mail is not an offer
> to buy or sell or a
>> solicitation to buy or sell any securities, investment products or other
> financial product or
>> service, an official confirmation of any transaction, or an official
> statement of Barclays. Any
>> views or opinions presented are solely those of the author and do not
> necessarily represent those
>> of Barclays. This e-mail is subject to terms available at the following
> link: www.barcap.com/emaildisclaimer.
>> By messaging with Barclays you consent to the foregoing.  Barclays offers
> premier investment banking
>> products and services to its clients through Barclays Bank PLC, a company
> registered in England
>> (number 1026167) with its registered office at 1 Churchill Place, London,
> E14 5HP.  This email may
>> relate to or be sent from other members of the Barclays Group.
>>
>> _______________________________________________
>>

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to