You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm-users@maven.apache.org by "Pensock, John" <JP...@Intrado.com> on 2007/10/10 19:05:34 UTC

AbstractScmMojo.java: developerConnectionUrl parameter initialization

Looking at a snippet of AbstractScmMojo.java shows:

 

/**
 * @author <a href="evenisse@apache.org">Emmanuel Venisse</a>
 * @version $Id: AbstractScmMojo.java 540597 2007-05-22 14:32:28Z
evenisse $
 */
public abstract class AbstractScmMojo
    extends AbstractMojo
{
    /**
     * The SCM connection URL.
     *
     * @parameter expression="${connectionUrl}"
default-value="${project.scm.connection}"
     */
    private String connectionUrl;

    /**
     * The SCM connection URL for developers.
     *
     * @parameter expression="${connectionUrl}"
default-value="${project.scm.developerConnection}"
     */
    private String developerConnectionUrl;



 

I would have thought that the annotation for 'developerConnectionUrl'
would be: 

 

     * @parameter expression="${developerConnectionUrl}"
default-value="${project.scm.developerConnection}"



Being new to Maven plugins, am I misunderstanding something?


Re: AbstractScmMojo.java: developerConnectionUrl parameter initialization

Posted by Emmanuel Venisse <em...@venisse.net>.

Pensock, John a écrit :
> Looking at a snippet of AbstractScmMojo.java shows:
> 
>  
> 
> /**
>  * @author <a href="evenisse@apache.org">Emmanuel Venisse</a>
>  * @version $Id: AbstractScmMojo.java 540597 2007-05-22 14:32:28Z evenisse $
>  */
> public abstract class AbstractScmMojo
>     extends AbstractMojo
> {
>     /**
>      * The SCM connection URL.
>      *
>      * @parameter expression="${connectionUrl}" 
> default-value="${project.scm.connection}"
>      */
>     private String connectionUrl;
> 
>     /**
>      * The SCM connection URL for developers.
>      *
>      * @parameter expression="${connectionUrl}" 
> default-value="${project.scm.developerConnection}"
>      */
>     private String developerConnectionUrl;
> 
>  
> 
> I would have thought that the annotation for ‘developerConnectionUrl’ 
> would be:
> 
>  
> 
>      * @parameter expression="${developerConnectionUrl}" 
> default-value="${project.scm.developerConnection}"
> 
> Being new to Maven plugins, am I misunderstanding something?
> 

We can use the same expression for both as it is a CLI parameter and we need only one connection url for the plugin execution.

Emmanuel