Author: juanpablo
Date: Tue Feb  7 23:51:19 2012
New Revision: 1241705

URL: http://svn.apache.org/viewvc?rev=1241705&view=rev
Log:
tests are now part of the main build. Also, they can be desactivated through 
jspwiki.test.skip property (i.e.: ant clean dist -Djspwiki.test.skip=true).

No version bump as there isn't any new functionality.

Modified:
    incubator/jspwiki/trunk/ChangeLog
    incubator/jspwiki/trunk/build.xml

Modified: incubator/jspwiki/trunk/ChangeLog
URL: 
http://svn.apache.org/viewvc/incubator/jspwiki/trunk/ChangeLog?rev=1241705&r1=1241704&r2=1241705&view=diff
==============================================================================
--- incubator/jspwiki/trunk/ChangeLog (original)
+++ incubator/jspwiki/trunk/ChangeLog Tue Feb  7 23:51:19 2012
@@ -1,4 +1,9 @@
-2012-01-14  Juan Pablo Santos (juanpablo AT apache DOT org)
+2012-02-07  Juan Pablo Santos (juanpablo AT apache DOT org)
+        
+        * tests are now part of the main build. Also, they can be desactivated 
through 
+          jspwiki.test.skip property (i.e.: ant clean dist 
-Djspwiki.test.skip=true)
+        
+2012-02-06  Juan Pablo Santos (juanpablo AT apache DOT org)
 
         * 2.9.0-svn-4
         

Modified: incubator/jspwiki/trunk/build.xml
URL: 
http://svn.apache.org/viewvc/incubator/jspwiki/trunk/build.xml?rev=1241705&r1=1241704&r2=1241705&view=diff
==============================================================================
--- incubator/jspwiki/trunk/build.xml (original)
+++ incubator/jspwiki/trunk/build.xml Tue Feb  7 23:51:19 2012
@@ -294,8 +294,7 @@
   </target>
 
   <!--  Builds the jar of all compiled class files -->
-
-  <target name="jar" depends="compile">
+  <target name="buildjar" unless="check_jar_has_been_built">
          <!-- This is unfortunately needed, since the default property files 
are not otherwise
               used. FIXME: Figure out a better way to do this in the future. 
-->
          <copy file="${code.i18n}/CoreResources.properties" 
tofile="${code.i18n}/CoreResources_en.properties"/>
@@ -303,20 +302,28 @@
          <copy file="${code.i18n}/plugin/PluginResources.properties" 
tofile="${code.i18n}/plugin/PluginResources_en.properties"/>
       <jar jarfile="${jarfile}">
          <fileset dir="${code.build}" includes="**/*.class" />
-         <fileset dir="${code.src}" includes="com/**/*.properties" />
+         <fileset dir="${code.src}" includes="org/**/*.properties" />
          <fileset dir="${code.src}" includes="templates/**/*.properties" />
          <fileset dir="${code.i18n}" />
          <fileset dir="etc" includes="ini/*.xml ini/*.properties" />
       </jar>
   </target>
 
+  <target name="jar" depends="compile">
+    <condition property="check_jar_has_been_built">
+      <available file="${jarfile}"/>
+    </condition>
+       <antcall target="buildjar" /> <!-- needed to avoid circular references 
when invoking tests target -->
+    <antcall target="tests" />
+  </target>
+
   <target name="jartests" depends="compiletests">
     <jar jarfile="${testjarfile}" update="false">
       <fileset dir="${tests.build}">
         <include name="**/*.class"/>
       </fileset>
       <fileset dir="${tests.src}">
-        <include name="com/**/*.properties"/>
+        <include name="org/**/*.properties"/>
       </fileset>
     </jar>
   </target>
@@ -673,9 +680,14 @@
 
        More info http://ant.apache.org/faq.html#delegating-classloader
    -->
-  <target name="tests" depends="jar,tests-init,jartests,tests-db-init"
+  <target name="tests" depends="tests-init,jartests,tests-db-init" 
unless="jspwiki.test.skip"
           description="Runs the JUnit tests.">
 
+    <condition property="check_jar_has_been_built"> <!-- build main jar if it 
has not been created yet; should -->
+      <available file="${jarfile}"/>                <!-- only happen if this 
target is invoked directly        -->
+    </condition>
+    <antcall target="buildjar" />
+    
     <junit printsummary="yes" haltonfailure="no" fork="yes">
         <classpath>
            <path refid="path.tests" />


Reply via email to