diff options
Diffstat (limited to '')
-rw-r--r-- | java/sca/samples/calculator/build.xml | 85 | ||||
-rw-r--r-- | java/sca/samples/calculator/pom.xml | 23 |
2 files changed, 47 insertions, 61 deletions
diff --git a/java/sca/samples/calculator/build.xml b/java/sca/samples/calculator/build.xml index c4b755ef94..36f733e12d 100644 --- a/java/sca/samples/calculator/build.xml +++ b/java/sca/samples/calculator/build.xml @@ -16,57 +16,36 @@ * specific language governing permissions and limitations * under the License. --> + <project name="calculator" default="compile"> - <property name="test.class" value="calculator.CalculatorClient" /> - <property name="test.jar" value="sample-calculator.jar" /> - - <target name="init"> - <mkdir dir="target/classes"/> - </target> - - <target name="compile" depends="init"> - <javac srcdir="src/main/java" - destdir="target/classes" - debug="on" - source="1.5" - target="1.5"> - <classpath> - <pathelement location="../../lib/tuscany-sca-manifest.jar"/> - </classpath> - </javac> - <copy todir="target/classes"> - <fileset dir="src/main/resources"/> - </copy> - <jar destfile="target/${test.jar}" basedir="target/classes"> - <manifest> - <attribute name="Main-Class" value="${test.class}" /> - </manifest> - </jar> - </target> - - <target name="run-classes"> - <java classname="${test.class}" - fork="true"> - <classpath> - <pathelement path="target/classes"/> - <pathelement location="../../lib/tuscany-sca-manifest.jar"/> - </classpath> - </java> - </target> - - <target name="run"> - <java classname="${test.class}" - fork="true"> - <classpath> - <pathelement path="target/${test.jar}"/> - <pathelement location="../../lib/tuscany-sca-manifest.jar"/> - </classpath> - </java> - </target> - - <target name="clean"> - <delete quiet="true" includeemptydirs="true"> - <fileset dir="target"/> - </delete> - </target> -</project> + + <property name="jar.name" value="sample-calculator.jar" /> + <property name="main.class" value="calculator.CalculatorClient" /> + + <target name="compile" depends="init"> + <javac srcdir="src/main/java" destdir="target/classes" debug="on" source="1.5" target="1.5"> + <classpath> + <pathelement location="../../modules/tuscany-sca-api-2.0-SNAPSHOT.jar"/> + <pathelement location="../../modules/tuscany-node-api-2.0-SNAPSHOT.jar"/> + </classpath> + </javac> + <copy todir="target/classes"> + <fileset dir="src/main/resources"/> + </copy> + <jar destfile="target/${jar.name}" basedir="target/classes"> + <manifest> + <attribute name="Main-Class" value="${main.class}" /> + </manifest> + </jar> + </target> + + <target name="init"> + <delete quiet="true" includeemptydirs="true"> + <fileset dir="target"/> + </delete> + <mkdir dir="target/classes"/> + </target> + +</project> + + diff --git a/java/sca/samples/calculator/pom.xml b/java/sca/samples/calculator/pom.xml index 814b212722..7a1bbf7b36 100644 --- a/java/sca/samples/calculator/pom.xml +++ b/java/sca/samples/calculator/pom.xml @@ -28,13 +28,6 @@ <artifactId>sample-calculator</artifactId> <name>Apache Tuscany SCA Calculator Sample</name> - <repositories> - <repository> - <id>apache.incubator</id> - <url>http://people.apache.org/repo/m2-incubating-repository</url> - </repository> - </repositories> - <dependencies> <dependency> <groupId>org.apache.tuscany.sca</groupId> @@ -67,5 +60,19 @@ <build> <finalName>${artifactId}</finalName> - </build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-jar-plugin</artifactId> + <version>2.2</version> + <configuration> + <archive> + <manifest> + <mainClass>calculator.CalculatorClient</mainClass> + </manifest> + </archive> + </configuration> + </plugin> + </plugins> + </build> </project> |