Author: rgardler
Date: Thu Feb 25 23:02:45 2010
New Revision: 916484

URL: http://svn.apache.org/viewvc?rev=916484&view=rev
Log:
Add version number to jar file [FIXES WOOKIE-108]

Publish local no longer uses the timestamp - use SNAPSHOTS instead

Modified:
    incubator/wookie/trunk/ant/ivy-common.xml
    incubator/wookie/trunk/ant/ivy-java-common.xml
    incubator/wookie/trunk/ant/ivysettings.xml
    incubator/wookie/trunk/ivy.xml

Modified: incubator/wookie/trunk/ant/ivy-common.xml
URL: 
http://svn.apache.org/viewvc/incubator/wookie/trunk/ant/ivy-common.xml?rev=916484&r1=916483&r2=916484&view=diff
==============================================================================
--- incubator/wookie/trunk/ant/ivy-common.xml (original)
+++ incubator/wookie/trunk/ant/ivy-common.xml Thu Feb 25 23:02:45 2010
@@ -88,18 +88,6 @@
         <property 
file="${project.build.classes.dir}/${ant.project.name}.properties" />
     </target>
 
-    <target name="local-version">
-               <tstamp>
-                       <format property="now" pattern="yyyyMMddHHmmss"/>
-               </tstamp>
-        <property name="revision" value="${now}"/>
-       <!-- used only to create a local version and put the corresponding file 
in the jar so that it will be displayed by the module -->
-        <mkdir dir="${project.build.classes.dir}"/>
-               <echo message="version=${revision}" 
file="${project.build.classes.dir}/${ant.project.name}.properties" 
append="false" />
-
-        <property 
file="${project.build.classes.dir}/${ant.project.name}.properties" />
-    </target>
-
        <target name="clean-local" depends="configure" description="cleans the 
local repository for the current module">
           <delete dir="${ivy.local.default.root}/${ant.project.name}"/>
        </target>

Modified: incubator/wookie/trunk/ant/ivy-java-common.xml
URL: 
http://svn.apache.org/viewvc/incubator/wookie/trunk/ant/ivy-java-common.xml?rev=916484&r1=916483&r2=916484&view=diff
==============================================================================
--- incubator/wookie/trunk/ant/ivy-java-common.xml (original)
+++ incubator/wookie/trunk/ant/ivy-java-common.xml Thu Feb 25 23:02:45 2010
@@ -31,9 +31,7 @@
        
        <property name="dist.dir" location="dist"/>
        
-    <property name="jar.file" location="${dist.dir}/${ant.project.name}.jar"/>
-       
-       <property name="java.source.version" value="1.5"/>
+    <property name="java.source.version" value="1.5"/>
        <property name="java.target.version" value="1.5"/>
        
        <target name="init">
@@ -119,30 +117,35 @@
     
     <target name="jar" depends="clean-dist, version, compile-core" 
description="--> make a jar file for this project">
        <mkdir dir="${dist.dir}"/>
-        <jar destfile="${jar.file}">
+        <jar destfile="${dist.dir}/${ant.project.name}-${version}.jar">
             <fileset dir="${project.build.classes.dir}"/>
         </jar>
     </target>
        
     <target name="publish" depends="clean-build, new-version, jar" 
description="--> publish this project in the ivy repository">
-        <property name="revision" value="${version}"/>
-       <ivy:publish
+        <ivy:publish
           artifactspattern="[artifact].[ext]"
            resolver="shared"
-           pubrevision="${revision}" 
+           pubrevision="${version}" 
        />
         <echo message="project ${ant.project.name} released with version 
${revision}" />
     </target>
 
-    <target name="publish-local" depends="clean-dist, local-version, jar" 
description="--> publish this project in the local ivy repository">
+    <target name="publish-local" depends="clean-dist, jar" description="--> 
publish this project in the local ivy repository">
                <delete file="${build.dir}/ivy.xml"/> <!-- delete last produced 
ivy file to be sure a new one will be generated -->
+       <tstamp>
+                       <format property="now" pattern="yyyyMMddHHmmss"/>
+               </tstamp>
+       <ivy:makepom ivyfile="${basedir}/ivy.xml" 
pomfile="${dist.dir}/wookie.pom"/>
        <ivy:publish resolver="local"
                artifactspattern="${dist.dir}/[artifact].[ext]"
-               pubrevision="${revision}"
+               pubrevision="${version}"
                forcedeliver="true"
                        pubdate="${now}"
-       />
-        <echo message="project ${ant.project.name} published locally with 
version ${revision}" />
+               overwrite="true">
+               <artifact name="wookie" type="pom" ext="pom"/> 
+       </ivy:publish>
+        <echo message="project ${ant.project.name} published locally with 
version ${version}" />
     </target>
 
 </project>

Modified: incubator/wookie/trunk/ant/ivysettings.xml
URL: 
http://svn.apache.org/viewvc/incubator/wookie/trunk/ant/ivysettings.xml?rev=916484&r1=916483&r2=916484&view=diff
==============================================================================
--- incubator/wookie/trunk/ant/ivysettings.xml (original)
+++ incubator/wookie/trunk/ant/ivysettings.xml Thu Feb 25 23:02:45 2010
@@ -3,7 +3,7 @@
   
   <resolvers>
     <chain name="wookie-chain">
-      <filesystem name="local">
+      <filesystem name="local" m2compatible="true" local="true">
           <artifact 
pattern="${user.home}/.m2/repository/[organisation]/[module]/[revision]/[module]-[revision].[ext]"
 />
       </filesystem>
       <filesystem name="wookie-local">

Modified: incubator/wookie/trunk/ivy.xml
URL: 
http://svn.apache.org/viewvc/incubator/wookie/trunk/ivy.xml?rev=916484&r1=916483&r2=916484&view=diff
==============================================================================
--- incubator/wookie/trunk/ivy.xml (original)
+++ incubator/wookie/trunk/ivy.xml Thu Feb 25 23:02:45 2010
@@ -1,5 +1,5 @@
 <ivy-module version="2.0">
-    <info organisation="org.apache.incubator" module="wookie"/>
+    <info organisation="org.apache.incubator" module="wookie" 
revision="0.8.1-SNAPSHOT"/>
     
     <configurations>
       <conf name="deploy"/>


Reply via email to