blob: f230905446510a18f6d63393ab7518fe919e0077 [file] [log] [blame]
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE project [
<!--
Copyright (c) 2017, 2018 Oracle and/or its affiliates. All rights reserved.
This program and the accompanying materials are made available under the
terms of the Eclipse Public License v. 2.0, which is available at
http://www.eclipse.org/legal/epl-2.0.
This Source Code may also be made available under the following Secondary
Licenses when the conditions for such availability set forth in the
Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
version 2 with the GNU Classpath Exception, which is available at
https://www.gnu.org/software/classpath/license.html.
SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
-->
<!ENTITY commonSetup SYSTEM "./../../../../config/properties.xml">
<!ENTITY commonBuild SYSTEM "./../../../../config/common.xml">
<!ENTITY commonRun SYSTEM "./../../../../config/run.xml">
<!ENTITY testproperties SYSTEM "./build.properties">
<!ENTITY database SYSTEM "../../config/database.xml">
]>
<project name="osgi-ee-resources-test" default="usage" basedir=".">
&database;
&commonSetup;
&commonBuild;
&commonRun;
&testproperties;
<target name="all" depends="clean, build, setup, deploy, wait, check-results, undeploy, unsetup"/>
<target name="clean" depends="init-common">
<antcall target="clean-common"/>
<delete quiet="true" file="osgi-resources-test-bundle.jar"/>
<delete quiet="true" file="osgi-resources-client-bundle.jar"/>
</target>
<target name="setup" >
<antcall target="deploy-jdbc-common"/>
<sleep seconds="10"/>
<antcall target="execute-sql-common">
<param name="sql.file" value="sql/createtables.sql"/>
</antcall>
</target>
<target name="unsetup" >
<antcall target="execute-sql-common">
<param name="sql.file" value="sql/droptables.sql"/>
</antcall>
<antcall target="undeploy-jdbc-common"/>
</target>
<target name="build" >
<mkdir dir="${build.classes.dir}"/>
<echo message="common.xml: Compiling test source files" level="verbose"/>
<javac srcdir="src"
destdir="${build.classes.dir}"
classpath="${env.APS_HOME}/lib/reporter.jar:${env.S1AS_HOME}/modules/gf-client-module.jar:${env.S1AS_HOME}/javadb/lib/derbyclient.jar:${s1astest.classpath}:${env.S1AS_HOME}/osgi/felix/bin/felix.jar:${env.S1AS_HOME}/modules/autostart/osgi-jdbc.jar"
debug="on"
failonerror="true"/>
<jar destfile="osgi-resources-test-bundle.jar" basedir="${build.classes.dir}" includes="**/*.class" excludes="**/*Client.class"></jar>
<jar manifest= "META-INF/MANIFEST.MF" update="true" destfile="osgi-resources-test-bundle.jar" basedir="." includes="osgi.bundle"></jar>
<jar destfile="osgi-resources-client-bundle.jar" basedir="${build.classes.dir}" includes="**/Client.class" excludes="**/*ResourcesTestActivator.class">
<manifest>
<attribute name="Main-Class"
value="org.glassfish.osgi_resources_test.client.Client"/>
</manifest>
</jar>
</target>
<target name="deploy" >
<copy file="osgi-resources-test-bundle.jar" todir="${env.S1AS_HOME}/domains/domain1/autodeploy/bundles/"/>
</target>
<target name="wait" >
<sleep seconds="30"/>
</target>
<target name="check-results">
<java classname="org.glassfish.osgi_resources_test.client.Client" fork="true">
<classpath>
<pathelement location="${env.S1AS_HOME}/../javadb/lib/derbynet.jar"/>
<pathelement location="${env.S1AS_HOME}/../javadb/lib/derbyclient.jar"/>
<pathelement location="${env.S1AS_HOME}/../javadb/lib/derby.jar"/>
<pathelement location="osgi-resources-client-bundle.jar"/>
<pathelement location="${env.APS_HOME}/lib/reporter.jar"/>
</classpath>
</java>
</target>
<target name="undeploy" >
<delete file="${env.S1AS_HOME}/domains/domain1/autodeploy/bundles/osgi-resources-test-bundle.jar"/>
<delete file="osgi-resources-test-bundle.jar"/>
<delete file="osgi-resources-client-bundle.jar"/>
</target>
<target name="usage">
<antcall target="usage-common"/>
</target>
</project>