brett       2004/07/07 03:35:35

  Modified:    .        Tag: MAVEN-1_0-BRANCH maven.xml project.properties
  Added:       .        Tag: MAVEN-1_0-BRANCH plugin-profile.xml
  Log:
  use a plugin profile to build the release so that it can be reproduced later
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.97.2.31 +27 -38    maven/maven.xml
  
  Index: maven.xml
  ===================================================================
  RCS file: /home/cvs/maven/maven.xml,v
  retrieving revision 1.97.2.30
  retrieving revision 1.97.2.31
  diff -u -r1.97.2.30 -r1.97.2.31
  --- maven.xml 5 Jul 2004 20:58:49 -0000       1.97.2.30
  +++ maven.xml 7 Jul 2004 10:35:35 -0000       1.97.2.31
  @@ -18,6 +18,7 @@
   <project default="jar:jar"
     xmlns:j="jelly:core"
     xmlns:u="jelly:util"
  +  xmlns:x="jelly:xml"
     xmlns:ant="jelly:ant"
     xmlns:maven="jelly:maven">
   
  @@ -177,35 +178,20 @@
       <ant:fixcrlf srcdir="${installerDir}" eol="crlf" includes="**/*.bat" />
       <ant:fixcrlf srcdir="${installerDir}" eol="lf" includes="**/*.sh,**/maven" />
   
  -    <!-- TODO: check if this works when run by scm:perform-release -->
  +    <x:parse var="plugins" xml="${maven.plugins.profile}" />
  +    <x:forEach var="plugin" select="$plugins/plugins/plugin">
  +      <j:set var="groupId"><x:expr select="@groupId" /></j:set>
  +      <j:set var="artifactId"><x:expr select="@artifactId" /></j:set>
  +      <j:set var="version"><x:expr select="@version" /></j:set>
  +      <ant:echo>Downloading ${groupId}:${artifactId} version ${version}</ant:echo>
  +      <attainGoal name="plugin:download-artifact" />
  +      <ant:copy 
  +          
file="${maven.repo.local}/${groupId}/plugins/${artifactId}-${version}.jar" 
  +          todir="${installerDir}/plugins"
  +      />
  +    </x:forEach>
   
  -    <maven:reactor
  -      basedir="${maven.plugins.directory}"
  -      includes="${maven.plugins.includes}"
  -      excludes="${maven.plugins.excludes}"
  -      postProcessing="true"
  -      banner="Gathering"
  -      ignoreFailures="false"
  -    />
  -    <j:forEach var="reactorProject" items="${reactorProjects}">
  -      <j:set var="version" 
value="${reactorProject.versions[size(reactorProject.versions)-1]}" />
  -      <j:if test="${version.tag == 'HEAD'}">
  -        <j:set var="version" 
value="${reactorProject.versions[size(reactorProject.versions)-2]}" />
  -      </j:if>
  -      <j:if test="${version == null}">
  -        <ant:fail>WARNING: no version for ${reactorProject})</ant:fail>
  -      </j:if>
  -      <j:if test="${version != null}">
  -        <ant:echo>Downloading ${reactorProject.artifactId} version 
${version}</ant:echo>
  -        <j:set var="groupId" value="maven" />
  -        <j:set var="artifactId" value="${reactorProject.artifactId}" />
  -        <attainGoal name="plugin:download-artifact" />
  -        <ant:copy 
  -            
file="${maven.repo.local}/${reactorProject.groupId}/plugins/${reactorProject.artifactId}-${version}.jar"
 
  -            todir="${installerDir}/plugins"
  -        />
  -      </j:if>
  -    </j:forEach>
  +    <attainGoal name="maven:build-seed-repo" />
     </goal>
   
     <goal name="maven:build-plugin-profile">
  @@ -217,7 +203,8 @@
         banner="Gathering"
         ignoreFailures="false"
       />
  -    <j:file name="${maven.build.dir}/plugin-profile.xml"
  +    <ant:copy tofile="${maven.plugins.profile}.bak" file="${maven.plugins.profile}" 
/>
  +    <j:file name="${maven.plugins.profile}"
           omitXmlDeclaration="false"
           outputMode="xml"
           prettyPrint="true">
  @@ -228,7 +215,7 @@
               <j:set var="version" 
value="${reactorProject.versions[size(reactorProject.versions)-2]}" />
             </j:if>
             <j:if test="${version == null}">
  -            <ant:echo>WARNING: no version for ${reactorProject})</ant:echo>
  +            <ant:echo>WARNING: no version for ${reactorProject}</ant:echo>
             </j:if>
             <j:if test="${version != null}">
               <plugin artifactId="${reactorProject.artifactId}" groupId="maven" 
version="${version}" />
  @@ -336,7 +323,8 @@
         <j:when test="${systemScope['os.name'].startsWith('Windows')}">
           <j:set var="maven.dist.bin.assembly.dir" value="${installerDir}" />
           <attainGoal name="nsis" />
  -        <ant:copy 
tofile="${maven.build.dir}/installer/${pom.artifactId}-${pom.currentVersion}.exe" 
file="${maven.build.dir}/${pom.artifactId}.exe" />
  +        <maven:get var="distDir" plugin="maven-dist-plugin" 
property="maven.dist.dir"/>
  +        <ant:copy 
tofile="${maven.build.dir}/installer/${pom.artifactId}-${pom.currentVersion}.exe" 
file="${distDir}/${pom.artifactId}.exe" />
   <!--
           <j:set var="maven.dist.bin.assembly.dir" value="${installerDirLite}" />
           <attainGoal name="nsis" />
  @@ -414,14 +402,15 @@
       <j:set var="prevRepoLocal" value="${maven.repo.local}" />
       <j:set var="prevRepoRemote" value="${maven.repo.remote}" />
       <j:set var="repoLocal" value="${basedir}/target/seed-repo" />
  -    <j:set var="maven.repo.local" value="${repoLocal}" />
  -    <j:set var="maven.repo.remote" value="file:${prevRepoLocal},${prevRepoRemote}" 
/>
  -<echo>maven.repo.local = ${maven.repo.local}</echo>
  -<echo>maven.repo.remote = ${maven.repo.remote}</echo>
  +    <j:set var="repoRemote" value="file:${prevRepoLocal},${prevRepoRemote}" />
  +    ${systemScope.setProperty('maven.repo.local',repoLocal)}
  +    ${systemScope.setProperty('maven.repo.remote',repoRemote)}
  +    <ant:echo>maven.repo.local = ${repoLocal}</ant:echo>
  +    <ant:echo>maven.repo.remote = ${repoRemote}</ant:echo>
       <ant:delete dir="${repoLocal}" />
       <maven:maven 
descriptor="src/test/touchstone-build/src/reactor-build/default/project.xml" 
goals="java:compile,site" />
       <ant:mkdir dir="${maven.build.dir}/installer" />
  -    <ant:tar tarfile="${maven.build.dir}/installer/seed-repo.tar.gz" 
compression="gzip" longfile="gnu">
  +    <ant:tar 
tarfile="${maven.build.dir}/installer/seed-repo-maven-${pom.currentVersion}.tar.gz" 
compression="gzip" longfile="gnu">
         <ant:tarfileset dir="${repoLocal}">
           <j:forEach var="lib" items="${pom.artifacts}">
             <j:set var="dep" value="${lib.dependency}" />
  @@ -432,8 +421,8 @@
           </j:forEach>
         </ant:tarfileset>
       </ant:tar>
  -    <j:set var="maven.repo.local" value="${prevRepoLocal}" />
  -    <j:set var="maven.repo.remote" value="${prevRepoRemote}" />
  +    ${systemScope.setProperty('maven.repo.local','${prevRepoLocal}')}
  +    ${systemScope.setProperty('maven.repo.remote','${prevRepoRemote}')}
     </goal>
   </project>
   
  
  
  
  1.51.2.29 +1 -0      maven/project.properties
  
  Index: project.properties
  ===================================================================
  RCS file: /home/cvs/maven/project.properties,v
  retrieving revision 1.51.2.28
  retrieving revision 1.51.2.29
  diff -u -r1.51.2.28 -r1.51.2.29
  --- project.properties        13 Jun 2004 11:05:56 -0000      1.51.2.28
  +++ project.properties        7 Jul 2004 10:35:35 -0000       1.51.2.29
  @@ -94,6 +94,7 @@
   maven.plugins.includes = */project.xml
   # Touchstone is not built into Maven any more
   maven.plugins.excludes = 
examples/**,touchstone/**,touchstone-partner/**,plugin-parent/**
  +maven.plugins.profile = plugin-profile.xml
   
   maven.get.jars.baseUrl = http://www.ibiblio.org/maven
   maven.bootstrap.dir = ${basedir}/bootstrap
  
  
  
  No                   revision
  
  Index: project.properties
  ===================================================================
  RCS file: /home/cvs/maven/project.properties,v
  retrieving revision 1.51.2.28
  retrieving revision 1.51.2.29
  diff -u -r1.51.2.28 -r1.51.2.29
  --- project.properties        13 Jun 2004 11:05:56 -0000      1.51.2.28
  +++ project.properties        7 Jul 2004 10:35:35 -0000       1.51.2.29
  @@ -94,6 +94,7 @@
   maven.plugins.includes = */project.xml
   # Touchstone is not built into Maven any more
   maven.plugins.excludes = 
examples/**,touchstone/**,touchstone-partner/**,plugin-parent/**
  +maven.plugins.profile = plugin-profile.xml
   
   maven.get.jars.baseUrl = http://www.ibiblio.org/maven
   maven.bootstrap.dir = ${basedir}/bootstrap
  
  
  
  No                   revision
  
  Index: project.properties
  ===================================================================
  RCS file: /home/cvs/maven/project.properties,v
  retrieving revision 1.51.2.28
  retrieving revision 1.51.2.29
  diff -u -r1.51.2.28 -r1.51.2.29
  --- project.properties        13 Jun 2004 11:05:56 -0000      1.51.2.28
  +++ project.properties        7 Jul 2004 10:35:35 -0000       1.51.2.29
  @@ -94,6 +94,7 @@
   maven.plugins.includes = */project.xml
   # Touchstone is not built into Maven any more
   maven.plugins.excludes = 
examples/**,touchstone/**,touchstone-partner/**,plugin-parent/**
  +maven.plugins.profile = plugin-profile.xml
   
   maven.get.jars.baseUrl = http://www.ibiblio.org/maven
   maven.bootstrap.dir = ${basedir}/bootstrap
  
  
  
  1.1.2.1   +164 -0    maven/Attic/plugin-profile.xml
  
  
  
  

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

Reply via email to