db-jdo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c..@apache.org
Subject [db-jdo] 20/43: JDO-374 add tck20.dist goal and dist postGoal copying the release articats to the releases directory
Date Fri, 07 May 2021 23:12:02 GMT
This is an automated email from the ASF dual-hosted git repository.

clr pushed a commit to branch origin/2.0.1
in repository https://gitbox.apache.org/repos/asf/db-jdo.git

commit 2915cf78afb7a1b61cec0a78cc9aab3cf4c4ebcc
Author: Michael Bouschen <mbo@apache.org>
AuthorDate: Sun Apr 30 14:11:05 2006 +0000

    JDO-374 add tck20.dist goal and dist postGoal copying the release articats to the releases
directory
---
 maven.xml          | 40 ++++++++++++++++++++++++++++++++++++++++
 project.properties |  6 ++++++
 tck20/maven.xml    | 23 ++++++++++++-----------
 3 files changed, 58 insertions(+), 11 deletions(-)

diff --git a/maven.xml b/maven.xml
index 6837ed2..f8c85ad 100644
--- a/maven.xml
+++ b/maven.xml
@@ -36,6 +36,7 @@
         <echo>  tck20.build   - builds tck20 and dependent JDO2 projects</echo>
         <echo>  tck20.default - calls the default goal for tck20 and dependent JDO2
projects</echo>
         <echo>  tck20.clean   - cleans tck20 and dependent JDO2 projects</echo>
+        <echo>  tck20.dist    - creates distributions of tck20 and dependent JDO2 projects</echo>
         <echo>  fostore20.clean   - cleans fostore20 and dependencies</echo>
         <echo>  fostore20.build   - builds fostore20 and dependencies</echo>
         <echo>  fostore20.default - calls the default goal for fostore20 and dependencies</echo>
@@ -110,6 +111,13 @@
         <attainGoal name="multiproject:clean"/>
     </goal>
 
+    <goal name="tck20.dist"
+          description="Creates distributions of tck20 and dependent JDO2 projects">
+        <j:set var="maven.multiproject.includes">${tck20.projects}</j:set>
+        <j:set var="goal">dist</j:set>
+        <attainGoal name="multiproject:goal"/>
+    </goal> 
+
     <goal name="fostore20.build"
       description="Builds fostore20 and dependencies">
         <j:set var="maven.multiproject.includes">${fostore20.projects}</j:set>
@@ -158,6 +166,10 @@
         </j:forEach>
     </goal>
 
+    <!-- ==================== -->
+    <!-- Distribution support -->
+    <!-- ==================== -->
+
     <preGoal name="dist:build-src">
         <echo>Copying top-level project.xml, project.properties, and README.txt to
${maven.dist.src.archive.dir}</echo>
         <copy toDir="${maven.dist.src.archive.dir}">
@@ -171,4 +183,32 @@
         <mkdir dir="${maven.dist.src.archive.dir}/lib/ext"/>
     </preGoal>
 
+    <postGoal name="dist">
+        <attainGoal name="copy-release-artifacts"/>
+    </postGoal>
+
+    <goal name="copy-release-artifacts">
+        <attainGoal name="copy-distribution"/>
+        <attainGoal name="copy-dependency-artifacts"/>
+    </goal>
+
+    <goal name="copy-dependency-artifacts">
+        <mkdir dir="${jdo.releases.dist.dir}/java-repository/${pom.groupId}/jars"/>
+        <mkdir dir="${jdo.releases.dist.dir}/java-repository/${pom.groupId}/poms"/>
+
+        <!-- Copy the artifacts for the remote repository -->
+        <copy file="${maven.build.dir}/${maven.final.name}.jar" 
+              todir="${jdo.releases.dist.dir}/java-repository/${pom.groupId}/jars"/>
+        <copy file="project.xml" 
+              toFile="${jdo.releases.dist.dir}/java-repository/${pom.groupId}/poms/${maven.final.name}.pom"
/>
+    </goal>
+
+    <goal name="copy-distribution">
+        <mkdir dir="${jdo.releases.dist.dir}/db/jdo/${pom.currentVersion}"/>
+         <!-- Copy distributions -->
+        <copy todir="${jdo.releases.dist.dir}/db/jdo/${pom.currentVersion}">
+            <fileset dir="${maven.build.dir}/distributions"/>
+        </copy>
+    </goal>
+
 </project>
diff --git a/project.properties b/project.properties
index b09c271..aaff8e9 100644
--- a/project.properties
+++ b/project.properties
@@ -21,6 +21,9 @@ maven.compile.target = 1.3
 # checkstyle settings
 maven.checkstyle.properties = ${basedir}/../jdo_checks.xml
 
+# changelog settings
+maven.changelog.factory = org.apache.maven.svnlib.SvnChangeLogFactory
+
 # Set the javadoc title 
 maven.javadoc.windowtitle = ${pom.name} ${pom.currentVersion}
 
@@ -33,3 +36,6 @@ tck20/project.xml
 tck20.projects=api20/project.xml,core20/project.xml,enhancer20/project.xml,tck20/project.xml
 fostore20.projects=api20/project.xml,core20/project.xml,runtime20/project.xml,query20/project.xml,btree/project.xml,fostore20/project.xml,enhancer20/project.xml
 
+# release properties
+jdo.releases.dir = ${basedir.substring(0, basedir.lastIndexOf('jdo'))}jdo/releases
+jdo.releases.dist.dir = ${jdo.releases.dir}/${pom.currentVersion}/dist
diff --git a/tck20/maven.xml b/tck20/maven.xml
index 8ca6862..12da66e 100644
--- a/tck20/maven.xml
+++ b/tck20/maven.xml
@@ -760,6 +760,15 @@
         </copy>
     </goal>
 
+    <!-- ==================== -->
+    <!-- Distribution support -->
+    <!-- ==================== -->
+
+    <goal name="dist">
+        <!-- Just do a source distribution for tck20. -->
+        <attainGoal name="dist:build-src"/>
+    </goal>
+
     <preGoal name="dist:build-src">
         <echo>Copying build.properties, RunRules.html, assertions, and iut_jars to
${maven.dist.src.archive.dir}/${maven.final.name}</echo>
         <copy toDir="${maven.dist.src.archive.dir}/${maven.final.name}">
@@ -784,16 +793,8 @@
         <mkdir dir="${maven.dist.src.archive.dir}/lib/ext"/>
     </preGoal>
 
-    <postGoal name="dist:build-src">
-         <!-- copy zip distribution to file with date in the name -->   
-         <tstamp>
-             <format property="distdate" pattern="dd_MMM_yyyy" locale="en"/>
-         </tstamp>
-         <u:replace var="version" oldChar="." newChar="_" value="${pom.currentVersion}"/>
-         <j:set var="zipfile" value="${maven.dist.dir}/${maven.final.name}-src.zip"/>
-         <j:set var="distfile" value="${maven.dist.dir}/${maven.final.name}-src-${distdate}.zip"/>
-         <echo>Create ${distfile}</echo>
-         <copy file="${zipfile}" tofile="${distfile}" failonerror="false"/>
-    </postGoal>
+    <goal name="copy-release-artifacts">
+        <attainGoal name="copy-distribution"/>
+    </goal>
 
 </project>

Mime
View raw message