[ 
https://jira.codehaus.org/browse/MCHANGES-274?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Swapnil Sapar closed MCHANGES-274.
----------------------------------

       Resolution: Not A Bug
    Fix Version/s: 2.7

nervermind. 

This can easily be achieved using settings.xml profiles and properties.

File: pom.xml
{code}
        ...
        <properties>
                <jira-user>${env.USER}</jira-user>
                <jira-password>your-jira-password</jira-password>
        </properties>
        ...  
        <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-changes-plugin</artifactId>
        <version>2.6</version>
        <configuration>
          <jiraUser>${jira-user}</jiraUser>
          <jiraPassword>${jira-password}</jiraPassword>
        </configuration>          
     <plugin>     
        ...     
{code}



File: settings.xml
{code}
<settings>
        ...
        <profiles>
          <profile>
                  <id>jira-access</id>
                  <activation>
                        <activeByDefault>false</activeByDefault>
                        <property>
                <name>doRelease</name>
                </property>
                  </activation>     
                  <properties>
                    <jira-user>jiraadmin</jira-user>
                    <jira-password>adminpassword</jira-password>
                  </properties>
                </profile>
        </profiles>
        ...
</settings>     
{code}  
        
                
> Private Jira instances needs secure place to store Jira credentials 
> (settings.xml) as oppose to pom.xml
> -------------------------------------------------------------------------------------------------------
>
>                 Key: MCHANGES-274
>                 URL: https://jira.codehaus.org/browse/MCHANGES-274
>             Project: Maven 2.x Changes Plugin
>          Issue Type: Improvement
>          Components: jira
>    Affects Versions: 2.6
>         Environment: all
>            Reporter: Swapnil Sapar
>             Fix For: 2.7
>
>
> As per the changes plugin documentation, Jira Credentials can be configured 
> in the plugin as jiraPassword and jiraUser. This credentials are expected to 
> be stored in the plain text inside the pom.xml.
> I wish if these credentials are stored securely in the settings.xml similar 
> to maven repository credentials or sonar server credentials.
> References:
> Plugin Documentation: 
> http://maven.apache.org/plugins/maven-changes-plugin/jira-report-mojo.html#jiraPassword
> Sample code:
> {code}
>       <plugin>
>         <groupId>org.apache.maven.plugins</groupId>
>         <artifactId>maven-changes-plugin</artifactId>
>         <version>2.6</version>
>         <configuration>
>           <jiraUser>jiraadmin</jiraUser>
>           <jiraPassword>adminpwd</jiraPassword>
>           <smtpHost>localhost</smtpHost>
>           <smtpPort implementation="java.lang.Integer">25</smtpPort>
>           <toAddresses>
>             <toAddress 
> implementation="java.lang.String">${dev-email}</toAddress>
>           </toAddresses>
>         </configuration>
>         <reportSets>
>           <reportSet>
>             <reports>
>               <report>jira-report</report>
>               <report>changes-report</report>
>             </reports>
>           </reportSet>
>         </reportSets>
>       </plugin>
> {code}
> Maven Repository Credentials stored securely in settings.xml: 
> http://maven.apache.org/settings.html#Servers
> Sonar plugin using credentials stored securely in settings.xml 
> http://mojo.codehaus.org/sonar-maven-plugin/examples/use-enterprise-database.html
> Expected behavior:
> pom.xml
> {code}
>       <plugin>
>         <groupId>org.apache.maven.plugins</groupId>
>         <artifactId>maven-changes-plugin</artifactId>
>         <version>2.6</version>
>         <configuration>
>           <!-- refer settings.xml for jira credentials -->
>           <smtpHost>localhost</smtpHost>
>           <smtpPort implementation="java.lang.Integer">25</smtpPort>
>           <toAddresses>
>             <toAddress 
> implementation="java.lang.String">${dev-email}</toAddress>
>           </toAddresses>
>         </configuration>
>         <reportSets>
>           <reportSet>
>             <reports>
>               <report>jira-report</report>
>               <report>changes-report</report>
>             </reports>
>           </reportSet>
>         </reportSets>
>       </plugin>
> {code}
> settings.xml
> {code}
> <profiles>
>   <profile>
>       <id>jira</id>
>       <properties>
>           <jiraUser>jiraadmin</jiraUser>
>           <jiraPassword>adminpwd</jiraPassword>
>       </properties>
>     </profile>
> </profiles>
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to