From 0d4d0e8bd53faedf01502a4f9865507648a02117 Mon Sep 17 00:00:00 2001 From: Ian Wolfcat Atha Date: Wed, 12 Jan 2011 12:57:25 -0800 Subject: [PATCH 1/2] Support for Maven, equivalence of building tools. pom.xml is a Maven module for kilim (named kilim:kilim:0.7.2-SNAPSHOT). It currently compiles identically to the "build.sh" script, as reported by the "build-equiv.sh" script. No gurantees about the execution of the unit tests are made. build-equiv.sh compares the binary results of the three build tools supported in kilim, right now: Maven, Ant, Shell Script. In terms of the results of the binary comparison, right now: Maven == ShellScript != Ant --- build-equiv.sh | 20 +++++++ pom.xml | 160 +++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 180 insertions(+) create mode 100755 build-equiv.sh create mode 100644 pom.xml diff --git a/build-equiv.sh b/build-equiv.sh new file mode 100755 index 0000000..019ab21 --- /dev/null +++ b/build-equiv.sh @@ -0,0 +1,20 @@ +#!/bin/bash +echo Cleaning +rm -rf testclasses-* classes-* testclasses classes +echo Build via Ant +ant clean compile +mv classes classes-ant +mv testclasses testclasses-ant +echo Build via shell script +./build.sh +mv classes classes-sh +mv testclasses testclasses-sh +echo Build via Maven +mvn install +mv classes classes-mvn +mv testclasses testclasses-mvn +echo Comparing +diff -aqr classes-mvn/ classes-sh/ && echo success +diff -aqr testclasses-mvn/ testclasses-sh/ && echo success +diff -aqr classes-ant/ classes-sh/ && echo success +diff -aqr testclasses-ant/ testclasses-sh/ && echo success \ No newline at end of file diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..fe752ba --- /dev/null +++ b/pom.xml @@ -0,0 +1,160 @@ + + + 4.0.0 + + kilim + kilim + 0.7.2 + jar + + + 1.6 + UTF-8 + + + + + asm + asm-all + 2.2.3 + + + junit + junit + 3.8.2 + test + + + + + src/ + test/ + classes/ + classes/ + + + org.codehaus.mojo + build-helper-maven-plugin + + + add-source + generate-sources + + add-source + + + + ${basedir}/bench + ${basedir}/examples + ${basedir}/bench + + + + + + + maven-clean-plugin + 2.4.1 + + + auto-clean + initialize + + clean + + + + + + + maven-compiler-plugin + + true + ${jdk.version} + ${jdk.version} + + + + org.codehaus.mojo + exec-maven-plugin + + + + kilim-asm + compile + + exec + + + java + + -classpath + + -ea + kilim.tools.Asm + -d + ${project.build.outputDirectory} + ${project.build.testSourceDirectory}/kilim/test/ex/ExJSR.j + ${project.build.testSourceDirectory}/kilim/test/ex/ExYieldSub.j + + + + + + kilim-weave-main + process-test-classes + + exec + + + java + test + + -classpath + + -ea + kilim.tools.Weaver + -d + ${project.build.outputDirectory} + -x + ExInvalid|test + ${project.build.outputDirectory} + + + + + + kilim-weave-test + process-test-classes + + exec + + + java + test + + -classpath + + -ea + kilim.tools.Weaver + -d + ${basedir}/testclasses + -x + ExInvalid + ${project.build.OutputDirectory} + + + + + + + + From f1450df47a3eab43d4b40ac0c0c00de1152f0297 Mon Sep 17 00:00:00 2001 From: Ian Wolfcat Atha Date: Wed, 12 Jan 2011 13:51:51 -0800 Subject: [PATCH 2/2] The maven "test" goal now runs the two TestSuites test.sh runs. --- .gitignore | 3 +++ pom.xml | 42 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+) diff --git a/.gitignore b/.gitignore index 59ba545..21b6e63 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,6 @@ +target/** +classes-*/** +testclasses-*/** classes/**/* testclasses/**/* .DS_Store diff --git a/pom.xml b/pom.xml index fe752ba..e0a96c9 100644 --- a/pom.xml +++ b/pom.xml @@ -155,6 +155,48 @@ + + org.apache.maven.plugins + maven-surefire-plugin + 2.7.1 + + + default-test + + true + + + + test-weaver + test + + test + + + + kilim/test/AllNotWoven.java + + + + + test-api + test + + test + + + ${basedir}/testclasses + runtime + + 10 + + + kilim/test/AllWoven.java + + + + +