Author: chris.laprun(a)jboss.com
Date: 2007-07-13 18:44:43 -0400 (Fri, 13 Jul 2007)
New Revision: 7762
Removed:
trunk/core-wsrp/src/resources/portal-wsrp-admin-sar/
Modified:
trunk/core-wsrp/build.xml
Log:
- Converted portal-wsrp-admin to WAR instead of SAR so that the -object.xml definition
would be correctly picked up.
- Added tests to build.
Modified: trunk/core-wsrp/build.xml
===================================================================
--- trunk/core-wsrp/build.xml 2007-07-13 22:42:18 UTC (rev 7761)
+++ trunk/core-wsrp/build.xml 2007-07-13 22:44:43 UTC (rev 7762)
@@ -135,6 +135,10 @@
<property name="javadoc.private" value="true"/>
<property name="javadoc.protected" value="false"/>
+ <property name="reports.dir"
value="${module.output}/reports"/>
+ <property name="build.lib.test"
value="${build.lib}/tests"/>
+ <property name="test.reports"
value="${module.output}/tests"/>
+
<taskdef name="explode"
classname="org.jboss.portal.common.ant.Explode"
classpathref="explode.task.classpath"/>
@@ -143,7 +147,7 @@
classpathref="explode.task.classpath"/>
</target>
-
+
<target name="configure-explode">
<path id="explode.task.classpath">
<pathelement location="${project.tools}/lib/explode.jar"/>
@@ -184,7 +188,7 @@
depends="compile">
<mkdir dir="${build.lib}"/>
-
+
<copy todir="${build.resources}">
<fileset dir="${source.resources}" includes="**/*"/>
</copy>
@@ -195,44 +199,38 @@
<fileset dir="${build.classes}"/>
</jar>
- <copy
todir="${build.resources}/portal-wsrp-admin.sar/portal-wsrp-admin.war/WEB-INF/lib2">
- <fileset dir="${apache.myfaces.lib}"
includes="myfaces-api.jar,myfaces-impl.jar,jstl.jar"/>
+ <!--<property name="build.wsrp-admin.war"
value="${build.resources}/portal-wsrp-admin.sar/portal-wsrp-admin.war"/>-->
+ <property name="build.wsrp-admin.war"
value="${build.resources}/portal-wsrp-admin-war"/>
+
+ <!-- Classes loaded by Portal's specific JSF wrapper. Note that it looks for
classes in WEB-INF/lib2 -->
+ <copy todir="${build.wsrp-admin.war}/WEB-INF/lib2">
+ <fileset dir="${apache.myfaces.lib}"
includes="myfaces-api.jar,myfaces-impl.jar,jstl.jar"/>
<fileset dir="${build.lib}"
includes="portal-wsrp-admin-lib.jar"/>
- <fileset dir="${jboss.portal-faces.root}/lib"
includes="portal-faces-lib.jar"/>
- <fileset dir="../core-admin/src/etc/sun-jsf"
includes="jsf-example.jar"/>
- <fileset dir="${facelets.facelets.lib}"
includes="jsf-facelets.jar"/>
- <fileset dir="${el.el.lib}"
includes="el-api.jar,el-ri.jar"/>
- <fileset dir="${portals.bridges/jsf.portlet.lib}"
includes="jsf-portlet.jar"/>
+ <fileset dir="${jboss.portal-faces.root}/lib"
includes="portal-faces-lib.jar"/>
+ <!-- For JSF -->
+ <fileset dir="../core-admin/src/etc/sun-jsf"
includes="jsf-example.jar"/>
+ <fileset dir="${facelets.facelets.lib}"
includes="jsf-facelets.jar"/>
+ <fileset dir="${el.el.lib}"
includes="el-api.jar,el-ri.jar"/>
+ <fileset dir="${portals.bridges/jsf.portlet.lib}"
includes="jsf-portlet.jar"/>
+ <fileset dir="${commons.el.lib}"
includes="commons-el.jar"/>
+ <fileset dir="${apache.beanutils.lib}"
includes="commons-beanutils.jar"/>
+ <fileset dir="${apache.digester.lib}"
includes="commons-digester.jar"/>
</copy>
- <copy
todir="${build.resources}/portal-wsrp-admin.sar/portal-wsrp-admin.war">
+ <copy todir="${build.wsrp-admin.war}/WEB-INF/lib">
+ <!-- Portal specific JSF wrapper -->
+ <fileset dir="${jboss.portal-faces.root}/lib"
includes="portal-faces-loader-lib.jar"/>
+ </copy>
+
+ <copy todir="${build.resources}/portal-wsrp-admin.war">
<fileset dir="${build.resources}/portal-wsrp-admin-war"
includes="**/*"/>
</copy>
<jar jarfile="${build.lib}/portal-wsrp-admin.war">
- <fileset
dir="${build.resources}/portal-wsrp-admin.sar/portal-wsrp-admin.war"/>
- </jar>
+ <fileset dir="${build.resources}/portal-wsrp-admin-war"
includes="**/*"/>
+ </jar>
+ </target>
- <!-- portal-wsrp-admin.sar -->
- <copy todir="${build.resources}/portal-wsrp-admin.sar/">
- <fileset dir="${build.resources}/portal-wsrp-admin-sar"
includes="**/*"/>
- </copy>
-
- <!-- portal-wsrp-admin.sar -->
- <copy todir="${build.resources}/portal-wsrp-admin.sar/lib">
- <fileset dir="${jboss.portal-faces.root}/lib"
includes="portal-faces-loader-lib.jar"/>
- <!-- For JSF -->
- <fileset dir="${commons.el.lib}"
includes="commons-el.jar"/>
- <fileset dir="${apache.beanutils.lib}"
includes="commons-beanutils.jar"/>
- <fileset dir="${apache.digester.lib}"
includes="commons-digester.jar"/>
- </copy>
-
- <jar jarfile="${build.lib}/portal-wsrp-admin.sar">
- <fileset dir="${build.resources}/portal-wsrp-admin-sar"
includes="**/*"/>
- </jar>
-
- </target>
-
<target name="output" depends="artifacts">
<!--implode
@@ -273,37 +271,74 @@
<!-- Deployment -->
<!-- ================================================================== -->
- <!--
- | Deploy the application
- -->
-
- <target name="deploy"
- description="Deploy."
- depends="output">
+ <target name="deploy" description="Deploy."
depends="output">
<require file="${jboss.home}/server/${portal.deploy.dir}"/>
- <copy file="${build.lib}/portal-wsrp-admin.sar"
todir="${jboss.home}/server/${portal.deploy.dir}"
overwrite="true"/>
+ <copy file="${build.lib}/portal-wsrp-admin.war"
todir="${jboss.home}/server/${portal.deploy.dir}"
+ overwrite="true"/>
</target>
-
- <!--
- | Undeploy the application
- -->
- <target name="undeploy"
- description="Undeploy."
- depends="init">
+
+ <target name="undeploy" description="Undeploy."
depends="init">
<require file="${jboss.home}/server/${portal.deploy.dir}"/>
- <delete
file="${jboss.home}/server/${portal.deploy.dir}/portal-wsrp.sar"/>
+ <delete
file="${jboss.home}/server/${portal.deploy.dir}/portal-wsrp-admin.war"/>
</target>
- <target name="package-tests"/>
-
-
- <!--
- Some convenience build targets to help deployment during development
- -->
- <target name="deploy-ha"
- description="Deploy."
- depends="output">
+ <target name="deploy-ha" description="Deploy in clustered
environment." depends="output">
<require file="${jboss.home}/server/${portal-ha.deploy.dir}"/>
- <copy file="${build.lib}/portal-wsrp.sar"
todir="${jboss.home}/server/${portal-ha.deploy.dir}"
overwrite="true"/>
+ <copy file="${build.lib}/portal-wsrp-admin.war"
todir="${jboss.home}/server/${portal-ha.deploy.dir}"
+ overwrite="true"/>
</target>
+
+ <!-- ================================================================== -->
+ <!-- Tests -->
+ <!-- ================================================================== -->
+
+ <target name="package-other-test" description="Generates the other
test artifacts" depends="compile">
+ <mkdir dir="${build.lib.test}"/>
+ <jar jarfile="${build.lib.test}/test-other-lib.jar">
+ <fileset dir="${build.classes}/">
+ <include name="org/jboss/portal/test/wsrp/other/*.class"/>
+ </fileset>
+ </jar>
+ </target>
+
+ <target name="other-test" depends="package-other-test">
+ <execute-tests>
+ <x-test>
+ <test todir="${test.reports}"
name="org.jboss.portal.test.wsrp.other.ConsumerBeanTestCase"/>
+ </x-test>
+ <x-sysproperty>
+ <!--<jvmarg value="-Xdebug"/>
+ <jvmarg value="-Xnoagent"/>
+ <jvmarg value="-Djava.compiler=NONE"/>
+ <jvmarg
value="-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8787"/>-->
+ <sysproperty key="test.root"
value="${build.lib}/tests"/>
+ </x-sysproperty>
+ <x-classpath>
+ <fileset dir="${build.lib.test}"
includes="test-other-lib.jar"/>
+ <fileset dir="${build.lib}"
includes="portal-wsrp-admin-lib.jar"/>
+ <path refid="library.classpath"/>
+ <path refid="dependentmodule.classpath"/>
+ </x-classpath>
+ </execute-tests>
+ </target>
+
+ <target name="clean-test">
+ <!-- remove generated test xml files -->
+ <delete dir="${reports.dir}"/>
+ <delete file="tests.log"/>
+ <delete file="output.log"/>
+ </target>
+
+ <target name="tests" depends="clean-test">
+ <antcall target="other-test"/>
+ </target>
+
+ <target name="reports" depends="init">
+ <junitreport todir="${reports.dir}">
+ <fileset dir="${test.reports}">
+ <include name="TEST-*.xml"/>
+ </fileset>
+ <report format="frames" todir="${reports.dir}"/>
+ </junitreport>
+ </target>
</project>
Show replies by date