The normal convention for this is to assign a classifier and attach it
instead.

I can see that you might not want to install at all though, so I'll
leave this intact and rename to "primaryArtifact" instead, which I feel
is clearer.

- Brett

[EMAIL PROTECTED] wrote:
> Author: aramirez
> Date: Wed Mar 22 18:34:15 2006
> New Revision: 388004
> 
> URL: http://svn.apache.org/viewcvs?rev=388004&view=rev
> Log:
> PR: MWAR-13
> Submitted By: Maria Odea Ching
> Reviewed By: Allan Ramirez
> 
> allows turning off the setting of the war file generated in the executions 
> section, which will be used by install and deploy as reference for the 
> artifact to be copied to the repository.
> 
> Modified:
>     
> maven/plugins/trunk/maven-war-plugin/src/main/java/org/apache/maven/plugin/war/WarMojo.java
> 
> Modified: 
> maven/plugins/trunk/maven-war-plugin/src/main/java/org/apache/maven/plugin/war/WarMojo.java
> URL: 
> http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-war-plugin/src/main/java/org/apache/maven/plugin/war/WarMojo.java?rev=388004&r1=388003&r2=388004&view=diff
> ==============================================================================
> --- 
> maven/plugins/trunk/maven-war-plugin/src/main/java/org/apache/maven/plugin/war/WarMojo.java
>  (original)
> +++ 
> maven/plugins/trunk/maven-war-plugin/src/main/java/org/apache/maven/plugin/war/WarMojo.java
>  Wed Mar 22 18:34:15 2006
> @@ -83,6 +83,11 @@
>       */
>      private MavenProjectHelper projectHelper;
>  
> +    /**
> +     * @parameter expression="${setWarFile}" default-value="true"
> +     */
> +    private boolean setWarFile;
> +
>      // ----------------------------------------------------------------------
>      // Implementation
>      // ----------------------------------------------------------------------
> @@ -168,7 +173,17 @@
>          }
>          else
>          {
> -            getProject().getArtifact().setFile( warFile );
> +            if( setWarFile )
> +            {
> +                getProject().getArtifact().setFile( warFile );
> +            }
> +            else
> +            {
> +                if( getProject().getArtifact().getFile() == null || 
> getProject().getArtifact().getFile().isDirectory() )
> +                {
> +                    getProject().getArtifact().setFile( warFile );
> +                }
> +            }            
>          }
>      }
>  }
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to