[ 
http://jira.codehaus.org/browse/MNG-2553?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=225871#action_225871
 ] 

Brian Fox commented on MNG-2553:
--------------------------------

This is simply not how it was designed to work, and there is a perfectly valid 
use case for this already, that's why it's marked won't fix. If you want to see 
an example, take a look at the Maven and Apache parent poms: 
http://svn.apache.org/repos/asf/maven/pom/trunk/

{code}
  <distributionManagement>
    <!-- Site omitted - each project must provide their own -->
    <repository>
      <id>apache.releases.https</id>
      <name>Apache Release Distribution Repository</name>
      
<url>https://repository.apache.org/service/local/staging/deploy/maven2</url>
    </repository>
    <snapshotRepository>
      <id>apache.snapshots.https</id>
      <name>${distMgmtSnapshotsName}</name>
      <url>${distMgmtSnapshotsUrl}</url>
    </snapshotRepository>
  </distributionManagement>
  <properties>
    <distMgmtSnapshotsName>Apache Development Snapshot 
Repository</distMgmtSnapshotsName>
    
<distMgmtSnapshotsUrl>https://repository.apache.org/content/repositories/snapshots</distMgmtSnapshotsUrl>
  </properties>
{code}

Here we use a property in the distributionManagement section, and define a 
default value for the property in the same pom so that it's always complete. 
However for CI systems, we define a new value for the property in the settings 
that that overrides the pom. We have done this intentionally only for snapshots 
in our case as we don't want people to accidentally release somewhere else.

This is what you want to do and it can already be done in the current design.

> Maven Local Settings Model should allow configuration of distributions 
> (distributionManagement)
> -----------------------------------------------------------------------------------------------
>
>                 Key: MNG-2553
>                 URL: http://jira.codehaus.org/browse/MNG-2553
>             Project: Maven 2 & 3
>          Issue Type: Improvement
>          Components: Settings
>    Affects Versions: 2.0.4
>            Reporter: Jimisola Laursen
>
> There is a good use case where this would be very useful.
> E.g. I develop a plugin in mojo-sandbox and want to test it in an environment 
> other than the one that I developed it on (e.g. a computer at work). I check 
> out the plugin to this, build and then want to deploy to another repository 
> (e..g a company's internal repository). I don't want to fiddle with the 
> pom.xml of the plugin, just refer to a profile in settings.xml.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to