You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@velocity.apache.org by he...@apache.org on 2007/05/03 16:09:30 UTC

svn commit: r534875 - in /velocity/anakia/trunk: build/build.properties build/build.xml pom.xml

Author: henning
Date: Thu May  3 07:09:29 2007
New Revision: 534875

URL: http://svn.apache.org/viewvc?view=rev&rev=534875
Log:
Update build to use junit to run the tests. Also make the tests runnable under maven-2 (surefire).


Modified:
    velocity/anakia/trunk/build/build.properties
    velocity/anakia/trunk/build/build.xml
    velocity/anakia/trunk/pom.xml

Modified: velocity/anakia/trunk/build/build.properties
URL: http://svn.apache.org/viewvc/velocity/anakia/trunk/build/build.properties?view=diff&rev=534875&r1=534874&r2=534875
==============================================================================
--- velocity/anakia/trunk/build/build.properties (original)
+++ velocity/anakia/trunk/build/build.properties Thu May  3 07:09:29 2007
@@ -22,7 +22,7 @@
 # Global defaults
 name=          Anakia
 project=       anakia
-version=       1.0-dev
+version=       1.1-dev
 final.name=    ${project}-${version}
 root.package=  org.apache.anakia
 
@@ -44,6 +44,7 @@
 build.test.dest= ${build.dir}/test-classes
 build.javadoc=   ${build.dir}/apidocs
 build.test=      ${build.dir}/test
+build.test.reports= ${build.dir}/test-reports
 build.docs=      ${build.dir}/docs
 
 # Various local pathes in the distribution

Modified: velocity/anakia/trunk/build/build.xml
URL: http://svn.apache.org/viewvc/velocity/anakia/trunk/build/build.xml?view=diff&rev=534875&r1=534874&r2=534875
==============================================================================
--- velocity/anakia/trunk/build/build.xml (original)
+++ velocity/anakia/trunk/build/build.xml Thu May  3 07:09:29 2007
@@ -16,7 +16,7 @@
  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  KIND, either express or implied.  See the License for the
  specific language governing permissions and limitations
- under the License.    
+ under the License.
 -->
 
 <!-- Build file for project -->
@@ -409,11 +409,11 @@
           description="Generates the distribution files">
   </target>
 
-  
+
   <!-- ======================================================================= -->
   <!-- Cleans up the build directory. Leave Libs unharmed to avoid re-download -->
   <!-- ======================================================================= -->
-  <target name="clean" 
+  <target name="clean"
           description="Cleans all generated files except downloaded libs">
     <delete includeEmptyDirs="true" quiet="true">
       <fileset dir="${build.dir}" defaultexcludes="no">
@@ -429,7 +429,7 @@
   <!-- =================================================================== -->
   <!-- Really cleans up the build directory                                -->
   <!-- =================================================================== -->
-  <target name="real-clean" 
+  <target name="real-clean"
           description="Cleans all generated files">
     <delete includeEmptyDirs="true" quiet="true" dir="${build.dir}" />
   </target>
@@ -507,37 +507,26 @@
   <target name="test-anakia">
     <echo message="Running Anakia tests..."/>
 
-    <taskdef name="anakia" classname="org.apache.anakia.AnakiaTask"
-             classpathref="test.classpath"/>
+    <mkdir dir="${build.test.reports}"/>
 
-    <!-- run twice - once with custom context and once without -->
-    <anakia basedir="${test.dir}/anakia/xdocs"
-            destdir="${build.test}/anakia"
-        extension=".html" style="./site_contexts.vsl"
-        projectFile="./stylesheets/project.xml"
-        excludes="**/stylesheets/**"
-        includes="**/*.xml"
-        templatePath="${test.dir}/anakia/xdocs/stylesheets"
-        lastModifiedCheck="false">
-    </anakia>
+    <junit dir="${app.dir}"
+           fork="true"
+           printSummary="yes"
+           haltonerror="${test.haltonerror}"
+           haltonfailure="${test.haltonfailure}">
 
-    <anakia basedir="${test.dir}/anakia/xdocs"
-            destdir="${build.test}/anakia"
-        extension=".context.html" style="./site_contexts.vsl"
-        projectFile="./stylesheets/project.xml"
-        excludes="**/stylesheets/**"
-        includes="**/*.xml"
-        templatePath="${test.dir}/anakia/xdocs/stylesheets"
-        lastModifiedCheck="false">
+      <classpath>
+        <path refid="test.classpath" />
+      </classpath>
 
-        <context name="customContext" file="./stylesheets/customContext.xml"/>
-    </anakia>
+      <batchtest todir="${build.test.reports}">
+        <fileset dir="${test.java.dir}">
+          <include name="**/*TestCase.java"></include>
+        </fileset>
+      </batchtest>
+      <formatter type="plain"/>
+    </junit>
 
-    <java classname="${test.runner}" fork="yes" dir="${app.dir}" failonerror="${test.haltonerror}"
-          classpathref="test.classpath">
-      <arg value="org.apache.anakia.AnakiaTestCase"/>
-    </java>
   </target>
-
 
 </project>

Modified: velocity/anakia/trunk/pom.xml
URL: http://svn.apache.org/viewvc/velocity/anakia/trunk/pom.xml?view=diff&rev=534875&r1=534874&r2=534875
==============================================================================
--- velocity/anakia/trunk/pom.xml (original)
+++ velocity/anakia/trunk/pom.xml Thu May  3 07:09:29 2007
@@ -25,6 +25,12 @@
 
   <modelVersion>4.0.0</modelVersion>
 
+  <parent>
+    <groupId>org.apache</groupId>
+    <artifactId>apache</artifactId>
+    <version>4</version>
+  </parent>
+
   <groupId>org.apache.anakia</groupId>
   <artifactId>anakia</artifactId>
   <version>1.0-SNAPSHOT</version>
@@ -33,15 +39,10 @@
   <url>http://velocity.apache.org/anakia/devel/</url>
   <description>Anakia uses Apache Velocity to generate documents based on XML source files.</description>
   <inceptionYear>2007</inceptionYear>
-  <packaging>pom</packaging>
-
-  <organization>
-    <name>The Apache Software Foundation</name>
-    <url>http://www.apache.org/</url>
-  </organization>
+  <packaging>jar</packaging>
 
   <build>
-    <defaultGoal>install</defaultGoal>
+    <defaultGoal>post-site</defaultGoal>
     <sourceDirectory>src/java</sourceDirectory>
     <testSourceDirectory>src/test</testSourceDirectory>
     <plugins>
@@ -57,25 +58,6 @@
     </plugins>
   </build>
 
-  <licenses>
-    <license>
-      <name>The Apache Software License, Version 2.0</name>
-      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
-      <distribution>repo</distribution>
-    </license>
-  </licenses>
-
-  <repositories>
-    <repository>
-      <id>apache.snapshots</id>
-      <name>Apache Snapshot Repository</name>
-      <url>http://people.apache.org/repo/m2-snapshot-repository</url>
-      <releases>
-        <enabled>false</enabled>
-      </releases>
-    </repository>
-  </repositories>
-
   <distributionManagement>
     <site>
       <id>velocity.apache.org</id>
@@ -184,10 +166,33 @@
       <artifactId>velocity</artifactId>
       <version>1.5</version>
     </dependency>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <version>3.8.1</version>
+      <scope>test</scope>
+    </dependency>
   </dependencies>
 
   <reporting>
     <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-plugin</artifactId>
+        <configuration>
+          <includes>
+            <include>**/*TestCase.java</include>
+          </includes>
+          <systemProperties>
+            <property>
+              <name>test.compare.dir</name>
+              <value>${basedir}/test</value>
+              <name>test.results.dir</name>
+              <value>${basedir}/target/test</value>
+            </property>
+          </systemProperties>
+        </configuration>
+      </plugin>
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-project-info-reports-plugin</artifactId>