maven-m2-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eveni...@apache.org
Subject cvs commit: maven-components/maven-plugins/maven-war-plugin/src/main/java/org/apache/maven/plugin/war WarMojo.java
Date Thu, 10 Mar 2005 09:36:47 GMT
evenisse    2005/03/10 01:36:45

  Modified:    maven-archiver/src/main/java/org/apache/maven/archiver
                        MavenArchiver.java
               maven-plugins/maven-jar-plugin/src/main/java/org/apache/maven/plugin/jar
                        JarMojo.java
               maven-plugins/maven-war-plugin/src/main/java/org/apache/maven/plugin/war
                        WarMojo.java
  Log:
  Add Package in manifest from plugin configuration.
  
  Revision  Changes    Path
  1.3       +10 -5     maven-components/maven-archiver/src/main/java/org/apache/maven/archiver/MavenArchiver.java
  
  Index: MavenArchiver.java
  ===================================================================
  RCS file: /home/cvs/maven-components/maven-archiver/src/main/java/org/apache/maven/archiver/MavenArchiver.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- MavenArchiver.java	10 Mar 2005 01:35:13 -0000	1.2
  +++ MavenArchiver.java	10 Mar 2005 09:36:44 -0000	1.3
  @@ -51,6 +51,8 @@
   
           String mainClass = (String) request.getParameter( "mainClass" );
   
  +        String packageName = (String) request.getParameter( "package" );
  +
           boolean addClasspath = new Boolean( (String) request.getParameter( "addClasspath"
) ).booleanValue();
   
           boolean addExtensions = new Boolean( (String) request.getParameter( "addExtensions"
) ).booleanValue();
  @@ -61,10 +63,13 @@
           m.addConfiguredAttribute( buildAttr );
           Manifest.Attribute createdAttr = new Manifest.Attribute( "Created-By", "Apache
Maven" );
           m.addConfiguredAttribute( createdAttr );
  -/* TODO: need to add jar plugin config
  -        Manifest.Attribute packageAttr = new Manifest.Attribute( "Package", project.getPackage()
);
  -        m.addConfiguredAttribute( packageAttr );
  -*/
  +
  +        if ( packageName != null )
  +        {
  +            Manifest.Attribute packageAttr = new Manifest.Attribute( "Package", packageName
);
  +            m.addConfiguredAttribute( packageAttr );
  +        }
  +
           Manifest.Attribute buildJdkAttr = new Manifest.Attribute( "Build-Jdk", System.getProperty(
"java.version" ) );
           m.addConfiguredAttribute( buildJdkAttr );
   
  
  
  
  1.17      +9 -2      maven-components/maven-plugins/maven-jar-plugin/src/main/java/org/apache/maven/plugin/jar/JarMojo.java
  
  Index: JarMojo.java
  ===================================================================
  RCS file: /home/cvs/maven-components/maven-plugins/maven-jar-plugin/src/main/java/org/apache/maven/plugin/jar/JarMojo.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- JarMojo.java	10 Mar 2005 01:35:24 -0000	1.16
  +++ JarMojo.java	10 Mar 2005 09:36:44 -0000	1.17
  @@ -17,6 +17,7 @@
    */
   
   import org.apache.maven.archiver.MavenArchiver;
  +import org.apache.maven.plugin.AbstractPlugin;
   import org.apache.maven.plugin.PluginExecutionRequest;
   import org.apache.maven.plugin.PluginExecutionResponse;
   
  @@ -48,6 +49,12 @@
    * expression="#maven.jar.index"
    * default="false"
    * description=""
  + * @parameter name="package"
  + * type="String"
  + * required="false"
  + * validator=""
  + * expression="#maven.jar.package"
  + * description=""
    * @parameter name="manifest"
    * type="String"
    * required="false"
  @@ -94,7 +101,7 @@
    * description="current MavenProject instance"
    */
   public class JarMojo
  -    extends AbstractJarMojo
  +    extends AbstractPlugin
   {
       /**
        * @todo Add license files in META-INF directory.
  
  
  
  1.8       +7 -1      maven-components/maven-plugins/maven-war-plugin/src/main/java/org/apache/maven/plugin/war/WarMojo.java
  
  Index: WarMojo.java
  ===================================================================
  RCS file: /home/cvs/maven-components/maven-plugins/maven-war-plugin/src/main/java/org/apache/maven/plugin/war/WarMojo.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- WarMojo.java	10 Mar 2005 01:35:13 -0000	1.7
  +++ WarMojo.java	10 Mar 2005 09:36:44 -0000	1.8
  @@ -56,6 +56,12 @@
    * expression="#maven.jar.index"
    * default="false"
    * description=""
  + * @parameter name="package"
  + * type="String"
  + * required="false"
  + * validator=""
  + * expression="#maven.jar.package"
  + * description=""
    * @parameter name="manifest"
    * type="String"
    * required="false"
  
  
  

Mime
View raw message