You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by ev...@apache.org on 2003/04/05 10:13:36 UTC

cvs commit: maven/src/plugins-build/java/xdocs changes.xml

evenisse    2003/04/05 00:13:36

  Modified:    src/plugins-build/java plugin.jelly
               src/plugins-build/java/xdocs changes.xml
  Log:
  Split java plugin in clean, jar and java plugin.
  
  Revision  Changes    Path
  1.14      +6 -184    maven/src/plugins-build/java/plugin.jelly
  
  Index: plugin.jelly
  ===================================================================
  RCS file: /home/cvs/maven/src/plugins-build/java/plugin.jelly,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- plugin.jelly	30 Mar 2003 16:17:20 -0000	1.13
  +++ plugin.jelly	5 Apr 2003 08:13:35 -0000	1.14
  @@ -3,13 +3,7 @@
   <project 
     xmlns:j="jelly:core"
     xmlns:ant="jelly:ant"
  -  xmlns:license="license"
  -  xmlns:maven="jelly:maven"
  -  xmlns:deploy="deploy"
  -  xmlns:resources="resources"
  -  xmlns:util="jelly:util"
  -  xmlns:doc="doc"
  -  xmlns:m="maven">
  +  xmlns:resources="resources">
   
     <!--
     
  @@ -125,7 +119,11 @@
           <ant:echo>No java source files to compile.</ant:echo>
         </j:otherwise>      
       </j:choose>
  -
  +  </goal>
  +  
  +  <goal name="java:jar"
  +        description="Create the deliverable jar file."
  +        prereqs="jar:jar">
     </goal>
   
     <!-- ================================================================== -->
  @@ -142,180 +140,4 @@
         />
       </j:if>
     </goal>
  -
  -  <!-- ================================================================== -->
  -  <!-- J A R                                                              -->
  -  <!-- ================================================================== -->
  -  <goal name="jar" prereqs="java:jar" 
  -    description="Create the deliverable jar file."/>
  -  <goal name="java:jar"
  -        description="Create the deliverable jar file."
  -        prereqs="test:test">
  -
  -    <ant:available property="maven.jar.manifest.available" 
  -      file="${maven.jar.manifest}"/>
  -
  -    <ant:jar
  -      jarfile="${maven.build.dir}/${maven.final.name}.jar"
  -      basedir="${maven.build.dest}"
  -      excludes="${maven.jar.excludes}"> 
  -      
  -      <j:if test="${maven.jar.manifest.available}">
  -        <ant:setProperty name="manifest" value="${maven.jar.manifest}" />
  -      </j:if>
  -
  -      <j:set var="licenseFileName"><license:fileName/></j:set>
  -      <util:file name="${licenseFileName}" var="licenseFile"/>
  -      <ant:metainf dir="${licenseFile.canonicalFile.parent}">
  -        <ant:include name="${licenseFile.canonicalFile.name}"/>
  -      </ant:metainf>
  -      <ant:manifest>
  -        <ant:attribute name="Built-By" value="${user.name}"/>
  -        <ant:attribute name="Created-By" value="Apache Jakarta Maven"/>
  -        <ant:attribute name="Package" value="${pom.package}"/>
  -        <ant:attribute name="Build-Jdk" value="${java.version}"/>
  -        <!-- added supplementary entries -->
  -        <ant:attribute name="Extension-Name" value="${pom.artifactId}"/>
  -        <ant:attribute name="Specification-Version" value="${pom.specificationVersion}"/>
  -        <ant:attribute name="Specification-Vendor" value="${pom.organization.name}"/>
  -        <ant:attribute name="Specification-Title" value="${pom.shortDescription}"/>
  -        <ant:attribute name="Implementation-Version" value="${pom.currentVersion}"/>
  -        <ant:attribute name="Implementation-Vendor" value="${pom.organization.name}"/>
  -        <ant:attribute name="Implementation-Vendor-Id" value="${pom.organization.identifier}"/>
  -        <j:set var="mainclass" value="${pom.getPluginContext('maven-java-plugin').getVariable('maven.jar.mainclass')}"/>
  -        <j:if test="${!empty(mainclass)}">
  -            <ant:attribute name="Main-Class" value="${mainclass}"/>
  -        </j:if>        
  -      </ant:manifest>
  -    </ant:jar>
  -  </goal>
  -
  -  <!-- ================================================================== -->
  -  <!-- S N A P S H O T  J A R                                             -->
  -  <!-- ================================================================== -->
  -
  -  <goal
  -    name="jar:snapshot"
  -    description="Create a snapshot jar, ie 'id-YYYYMMDD.hhmmss.jar'">
  -
  -    <maven:snapshot project="${pom}"/>    
  -
  -    <j:set var="maven.final.name" value="${snapshotSignature}"/>
  -    <ant:echo>Building snapshot JAR: ${maven.final.name}</ant:echo>
  -    
  -    <attainGoal name="java:jar"/>
  -    
  -  </goal>
  -
  -  <!-- ================================================================== -->
  -  <!-- D E P L O Y  S N A P S H O T                                       -->
  -  <!-- ================================================================== -->
  -
  -  <goal
  -    name="jar:deploy-snapshot"
  -    description="Deploy a snapshot jar to the remote repository">
  -
  -    <m:user-check user="${maven.username}"/>
  -    <attainGoal name="jar:snapshot"/>
  -    <ant:property name="maven.jar.to.deploy" value="${maven.final.name}.jar"/>
  -    <ant:property name="dir" 
  -      value="${maven.repo.central.directory}/${pom.artifactDirectory}/jars"/>
  -    
  -    <util:replace var="jarToDeploy" oldChar="\" newChar="/">${maven.build.dir}/${maven.jar.to.deploy}</util:replace>
  -    <util:replace var="forwardSlashBaseDir" oldChar="\" newChar="/" value="${basedir}"/>
  -    <j:if test="${!forwardSlashBaseDir.endsWith('/')}">
  -      <j:set var="base" value="${forwardSlashBaseDir}/" />
  -    </j:if>
  -    <j:set var="relativePath">${jarToDeploy.substring(base.length())}</j:set>
  -    
  -    <deploy:artifact
  -      artifact="${relativePath}"
  -      type="jars"
  -      assureDirectoryCommand="mkdir -p"
  -      siteCommand="cd @deployDirectory@; chmod g+w ${maven.jar.to.deploy}; chgrp maven ${maven.jar.to.deploy}; ln -sf ${maven.jar.to.deploy} ${pom.artifactId}-SNAPSHOT.jar; echo ${snapshotVersion} > ${pom.artifactId}-snapshot-version"
  -    />
  -                    
  -  </goal>
  -
  -  <!-- ================================================================== -->
  -  <!-- D E P L O Y  J A R                                                 -->
  -  <!-- ================================================================== -->
  -
  -  <goal
  -    name="jar:deploy"
  -    description="Deploy a jar to the remote repository">
  -
  -    <m:user-check user="${maven.username}"/>
  -    <attainGoal name="java:jar"/>
  -    <ant:property name="maven.jar.to.deploy" value="${maven.final.name}.jar"/>
  -    
  -    <j:set var="sl" value="/"/>
  -    <util:replace var="jarToDeploy" oldChar="\" newChar="/">${maven.build.dir}/${maven.jar.to.deploy}</util:replace>
  -    <util:replace var="forwardSlashBaseDir" oldChar="\" newChar="/" value="${basedir}"/>
  -    <j:if test="${!forwardSlashBaseDir.endsWith('/')}">
  -      <j:set var="base" value="${forwardSlashBaseDir}/" />
  -    </j:if>
  -    <j:set var="relativePath">${jarToDeploy.substring(base.length())}</j:set>
  -
  -    <deploy:artifact
  -      artifact="${relativePath}"
  -      type="jars"
  -      assureDirectoryCommand="mkdir -p"
  -      siteCommand="cd @deployDirectory@; chmod g+w ${maven.jar.to.deploy}; chgrp maven ${maven.jar.to.deploy}"
  -    />
  -
  -  </goal>
  -
  -  <!-- ================================================================== -->
  -  <!-- I N S T A L L   J A R                                              -->
  -  <!-- ================================================================== -->
  -
  -  <goal name="jar:install" prereqs="java:jar"
  -    description="Install the jar in the local repository">
  -    
  -    <ant:echo>
  -    id = '${pom.artifactId}'
  -    groupId = '${pom.groupId}'
  -    artifactDirectory = '${pom.artifactDirectory}'
  -    </ant:echo>
  -    
  -    <ant:property name="jardir__" value="${maven.repo.local}/${pom.artifactDirectory}/jars"/>
  -    <ant:mkdir dir="${jardir__}"/>    
  -    <ant:copy 
  -      file="${maven.build.dir}/${maven.final.name}.jar"
  -      todir="${jardir__}"
  -      overwrite="true"
  -    />
  -  </goal>
  -
  -  <!-- ================================================================== -->
  -  <!-- I N S T A L L  S N A P S H O T                                       -->
  -  <!-- ================================================================== -->
  -
  -  <goal
  -    name="jar:install-snapshot" prereqs="jar:snapshot"
  -    description="Install a snapshot jar in the local repository">
  -
  -    <ant:property name="jardir__" value="${maven.repo.local}/${pom.artifactDirectory}/jars"/>
  -    <ant:mkdir dir="${jardir__}"/>
  -    <ant:copy
  -      file="${maven.build.dir}/${maven.final.name}.jar"
  -      tofile="${jardir__}/${pom.artifactId}-SNAPSHOT.jar"
  -      overwrite="true"
  -    />
  -    <ant:copy
  -      file="${maven.build.dir}/${maven.final.name}.jar"
  -      tofile="${jardir__}/${maven.final.name}.jar"
  -    />
  -  </goal>
  -
  -  <goal name="clean" description="Remove all project artifacts"
  -    prereqs="clean:clean"/>
  -
  -  <goal name="clean:clean"
  -        description="Remove all project artifacts">
  -    <ant:delete dir="${maven.build.dir}"/>
  -    <ant:delete file="${basedir}/velocity.log" quiet="true" failonerror="false"/>
  -  </goal>
  -
   </project>
  
  
  
  1.4       +4 -0      maven/src/plugins-build/java/xdocs/changes.xml
  
  Index: changes.xml
  ===================================================================
  RCS file: /home/cvs/maven/src/plugins-build/java/xdocs/changes.xml,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- changes.xml	2 Mar 2003 14:54:24 -0000	1.3
  +++ changes.xml	5 Apr 2003 08:13:36 -0000	1.4
  @@ -9,6 +9,10 @@
     <body>
       
       <release version="1.3" date="in cvs">
  +      <action dev="evenisse" type="remove">
  +        Remove clean goals and jar goals. Clean goals and jar goals move to
  +        clean plugin and jar plugin.
  +      </action>
         <action dev="dion" type="fix">Added chgrp maven to jar:deploy.</action>
         <action dev="dion" type="add">
           Added velocity.log to files deleted on clean
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org