[jboss-cvs] jboss-seam/seam-gen/build-scripts ...
Gavin King
gavin.king at jboss.com
Mon Nov 6 03:51:43 EST 2006
User: gavin
Date: 06/11/06 03:51:43
Modified: seam-gen/build-scripts build.xml
Added: seam-gen/build-scripts .classpath .exploded.launch
.project
Log:
exploded directory integration with eclipse
Revision Changes Path
1.5 +87 -43 jboss-seam/seam-gen/build-scripts/build.xml
(In the diff below, changes in quantity of whitespace are not shown.)
Index: build.xml
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/seam-gen/build-scripts/build.xml,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- build.xml 2 Nov 2006 23:21:46 -0000 1.4
+++ build.xml 6 Nov 2006 08:51:43 -0000 1.5
@@ -6,16 +6,19 @@
<property file="${basedir}/build.properties" />
<!-- set global properties for this build -->
+ <property name="project.name" value="@projectName@"/>
<property name="dist.dir" value="dist" />
- <property name="classes.dir" value="exploded-archives/@projectName at .jar" />
<property name="src.java.dir" value="src" />
<property name="lib.dir" value="lib" />
- <property name="ear.dir" value="exploded-archives/@projectName at .ear" />
- <property name="jar.dir" value="exploded-archives/@projectName at .jar" />
- <property name="war.dir" value="exploded-archives/@projectName at .war" />
+ <property name="ear.dir" value="exploded-archives/${project.name}.ear" />
+ <property name="jar.dir" value="exploded-archives/${project.name}.jar" />
+ <property name="war.dir" value="exploded-archives/${project.name}.war" />
<property name="test.dir" value="build/test" />
<property name="embedded-ejb3.dir" value="${basedir}/embedded-ejb/conf" />
<property name="deploy.dir" value="${jboss.home}/server/default/deploy" />
+ <property name="ear.deploy.dir" value="${deploy.dir}/${project.name}.ear" />
+ <property name="jar.deploy.dir" value="${ear.deploy.dir}/${project.name}.jar" />
+ <property name="war.deploy.dir" value="${ear.deploy.dir}/${project.name}.war" />
<property name="testng.jar" value="${basedir}/lib/testng-4.5.1-jdk15.jar" />
<property name="javac.debug" value="true" />
<property name="javac.deprecation" value="false" />
@@ -29,43 +32,37 @@
</path>
<target name="init" description="Initialize the build">
- <mkdir dir="${classes.dir}" />
- <mkdir dir="${dist.dir}" />
+ <mkdir dir="${jar.dir}" />
<mkdir dir="${ear.dir}" />
<mkdir dir="${war.dir}" />
+ <mkdir dir="${dist.dir}" />
</target>
<target name="compile" depends="init" description="Compile the Java source code">
- <javac classpathref="build.classpath" destdir="${classes.dir}" debug="${javac.debug}" deprecation="${javac.deprecation}" nowarn="on">
+ <javac classpathref="build.classpath" destdir="${jar.dir}" debug="${javac.debug}" deprecation="${javac.deprecation}" nowarn="on">
<src path="${src.java.dir}" />
</javac>
</target>
- <target name="build-jar" depends="compile" description="Build the distribution .jar file">
- <copy todir="${classes.dir}">
+ <target name="jar" depends="compile" description="Build the distribution .jar file">
+ <copy todir="${jar.dir}">
<fileset dir="${basedir}/resources">
<include name="seam.properties" />
</fileset>
</copy>
- <copy todir="${classes.dir}/META-INF">
+ <copy todir="${jar.dir}/META-INF">
<fileset dir="${basedir}/resources/META-INF">
<include name="ejb-jar.xml" />
<include name="persistence.xml" />
</fileset>
</copy>
- <jar jarfile="${ear.dir}/@projectName at .jar" basedir="${classes.dir}">
- <include name="**/*" />
- <manifest>
- <attribute name="@projectName@" value="Seam Generated Application" />
- </manifest>
- </jar>
</target>
- <target name="build-war" depends="compile" description="Build the distribution .war file">
- <copy todir="${basedir}/exploded-archives/@projectName at .war">
+ <target name="war" depends="compile" description="Build the distribution .war file">
+ <copy todir="${war.dir}">
<fileset dir="${basedir}/view" />
</copy>
- <copy todir="${basedir}/exploded-archives/@projectName at .war/WEB-INF/lib">
+ <copy todir="${war.dir}/WEB-INF/lib">
<fileset dir="${lib.dir}">
<include name="el-api.jar" />
<include name="el-ri.jar" />
@@ -74,22 +71,22 @@
<include name="jboss-seam-ui.jar" />
</fileset>
</copy>
- <copy todir="${basedir}/exploded-archives/@projectName at .war/WEB-INF">
+ <copy todir="${war.dir}/WEB-INF">
<fileset dir="${basedir}/resources/WEB-INF" />
<filterset>
- <filter token="jndiPattern" value="@projectName@/#{ejbName}/local"/>
+ <filter token="jndiPattern" value="${project.name}/#{ejbName}/local"/>
<filter token="embeddedEjb" value="false"/>
</filterset>
</copy>
- <copy todir="${basedir}/exploded-archives/MyDomain.war/WEB-INF/classes">
+ <copy todir="${war.dir}/WEB-INF/classes">
<fileset dir="${basedir}/resources">
<include name="messages*.properties"/>
</fileset>
</copy>
</target>
- <target name="build-ear" depends="build-jar,build-war" description="Build the EAR">
- <copy todir="${basedir}/exploded-archives/@projectName at .ear">
+ <target name="ear" description="Build the EAR">
+ <copy todir="${ear.dir}">
<fileset dir="${basedir}/resources">
<include name="*jpdl.xml" />
<include name="hibernate.cfg.xml" />
@@ -100,42 +97,87 @@
<include name="jbpm*.jar" />
</fileset>
</copy>
- <copy todir="${basedir}/exploded-archives/@projectName at .ear/META-INF">
+ <copy todir="${ear.dir}/META-INF">
<fileset dir="${basedir}/resources/META-INF">
<include name="application.xml" />
<include name="jboss-app.xml" />
<include name="jboss-beans.xml" />
</fileset>
</copy>
- <zip destfile="exploded-archives/@projectName at .ear/@projectName at .war" basedir="${war.dir}" update="true" />
- <ear basedir="${ear.dir}" appxml="${ear.dir}/META-INF/application.xml" destfile="${dist.dir}/@projectName at .ear" />
</target>
- <target name="deploy" depends="build-ear" description="Deploy to JBoss">
- <fail unless="jboss.home">jboss.home MUST be set. Update build.properties to point to a valid JBoss installation.</fail>
+ <target name="archive" depends="jar,war,ear" description="Package the archives">
+ <jar jarfile="${dist.dir}/${project.name}.jar" basedir="${jar.dir}"/>
+ <jar jarfile="${dist.dir}/${project.name}.war" basedir="${war.dir}"/>
+ <jar jarfile="${dist.dir}/${project.name}.ear">
+ <fileset dir="${ear.dir}"/>
+ <fileset dir="${dist.dir}">
+ <include name="${project.name}.jar"/>
+ <include name="${project.name}.war"/>
+ </fileset>
+ </jar>
+ </target>
+
+ <target name="datasource">
+ <fail unless="jboss.home">jboss.home not set</fail>
<copy todir="${deploy.dir}">
<fileset dir="${basedir}/resources">
- <include name="@projectName at -ds.xml" />
+ <include name="${project.name}-ds.xml" />
</fileset>
</copy>
- <copy todir="${deploy.dir}" file="${dist.dir}/@projectName at .ear" />
+ </target>
+
+ <target name="explode" depends="jar,war,ear,datasource" description="Deploy the exploded archive">
+ <fail unless="jboss.home">jboss.home not set</fail>
+
+ <mkdir dir="${jar.deploy.dir}"/>
+ <mkdir dir="${war.deploy.dir}"/>
+
+ <copy todir="${jar.deploy.dir}">
+ <fileset dir="${jar.dir}"/>
+ </copy>
+ <copy todir="${war.deploy.dir}">
+ <fileset dir="${war.dir}"/>
+ </copy>
+ <copy todir="${ear.deploy.dir}">
+ <fileset dir="${ear.dir}"/>
+ </copy>
+ </target>
+
+ <target name="unexplode" description="Undeploy the exploded archive">
+ <delete>
+ <fileset dir="${ear.deploy.dir}">
+ <exclude name="**/*.jar"/>
+ </fileset>
+ </delete>
+ <delete failonerror="no">
+ <fileset dir="${ear.deploy.dir}">
+ <include name="**/*.jar"/>
+ </fileset>
+ </delete>
+ </target>
+
+ <target name="restart" depends="unexplode,explode" description="Restart the exploded archive"/>
+
+ <target name="deploy" depends="archive,datasource" description="Deploy to JBoss AS">
+ <fail unless="jboss.home">jboss.home not set</fail>
+ <copy todir="${deploy.dir}" file="${dist.dir}/${project.name}.ear" />
</target>
<target name="undeploy" description="Undeploy the example from JBoss">
- <delete file="${deploy.dir}/@projectName at .ear" />
- <delete file="${deploy.dir}/@projectName at -ds.xml" />
+ <delete file="${deploy.dir}/${project.name}.ear" />
+ <delete file="${deploy.dir}/${project.name}-ds.xml" />
</target>
<target name="clean" description="Cleans up the build directory">
- <delete dir="${test.dir}" />
<delete dir="${dist.dir}" />
- <delete dir="${classes.dir}" />
+ <delete dir="${test.dir}" />
<delete dir="${ear.dir}" />
<delete dir="${war.dir}" />
<delete dir="${jar.dir}" />
</target>
- <target name="test" depends="build-ear" description="Test registration module">
+ <target name="test" depends="jar,war,ear" description="Run the tests">
<taskdef resource="testngtasks" classpath="${testng.jar}" />
<copy todir="${test.dir}">
@@ -161,5 +203,7 @@
<classpath refid="build.classpath" />
<xmlfileset dir="${test.dir}" includes="*Test.xml" />
</testng>
+
</target>
+
</project>
1.1 date: 2006/11/06 08:51:43; author: gavin; state: Exp;jboss-seam/seam-gen/build-scripts/.classpath
Index: .classpath
===================================================================
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="embedded-ejb/conf"/>
<classpathentry kind="src" path="resources"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="lib" path="lib/commons-beanutils-1.7.0.jar"/>
<classpathentry kind="lib" path="lib/commons-codec-1.3.jar"/>
<classpathentry kind="lib" path="lib/commons-collections-3.1.jar"/>
<classpathentry kind="lib" path="lib/commons-digester-1.6.jar"/>
<classpathentry kind="lib" path="lib/commons-el-1.0.jar"/>
<classpathentry kind="lib" path="lib/commons-lang-2.1.jar"/>
<classpathentry kind="lib" path="lib/hibernate-all.jar"/>
<classpathentry kind="lib" path="lib/javax.servlet.jsp.jar"/>
<classpathentry kind="lib" path="lib/jboss-aop-jdk50.jar"/>
<classpathentry kind="lib" path="lib/jboss-cache-jdk50.jar"/>
<classpathentry kind="lib" path="lib/jboss-ejb3-all.jar"/>
<classpathentry kind="lib" path="lib/jboss-seam.jar"/>
<classpathentry kind="lib" path="lib/jboss-seam-debug.jar"/>
<classpathentry kind="lib" path="lib/jboss-seam-ui.jar"/>
<classpathentry kind="lib" path="lib/jbpm-3.1.2.jar"/>
<classpathentry kind="lib" path="lib/jgroups.jar"/>
<classpathentry kind="lib" path="lib/jsf-facelets.jar"/>
<classpathentry kind="lib" path="lib/jstl-1.1.0.jar"/>
<classpathentry kind="lib" path="lib/myfaces-api-1.1.4.jar"/>
<classpathentry kind="lib" path="lib/servlet-api.jar"/>
<classpathentry kind="lib" path="lib/testng-4.5.1-jdk15.jar"/>
<classpathentry kind="lib" path="lib/thirdparty-all.jar"/>
<classpathentry kind="lib" path="lib/el-api.jar"/>
<classpathentry kind="lib" path="lib/el-ri.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
1.1 date: 2006/11/06 08:51:43; author: gavin; state: Exp;jboss-seam/seam-gen/build-scripts/.exploded.launch
Index: .exploded.launch
===================================================================
<?xml version="1.0" encoding="UTF-8"?>
<launchConfiguration type="org.eclipse.ant.AntBuilderLaunchConfigurationType">
<booleanAttribute key="org.eclipse.debug.ui.ATTR_LAUNCH_IN_BACKGROUND" value="false"/>
<booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="true"/>
<booleanAttribute key="org.eclipse.ant.ui.DEFAULT_VM_INSTALL" value="false"/>
<stringAttribute key="org.eclipse.ant.ui.ATTR_ANT_AFTER_CLEAN_TARGETS" value="clean,"/>
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_RUN_BUILD_KINDS" value="full,incremental,auto,"/>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
<listEntry value="1"/>
</listAttribute>
<booleanAttribute key="org.eclipse.ant.ui.ATTR_TARGETS_UPDATED" value="true"/>
<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_TRIGGERS_CONFIGURED" value="true"/>
<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/>
<stringAttribute key="org.eclipse.ant.ui.ATTR_ANT_MANUAL_TARGETS" value="restart,"/>
<stringAttribute key="org.eclipse.ant.ui.ATTR_ANT_AUTO_TARGETS" value="explode,"/>
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="ExplodeMe"/>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
<listEntry value="/@projectName@/build.xml"/>
</listAttribute>
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${workspace_loc:/@projectName@/build.xml}"/>
</launchConfiguration>
1.1 date: 2006/11/06 08:51:43; author: gavin; state: Exp;jboss-seam/seam-gen/build-scripts/.project
Index: .project
===================================================================
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>@projectName@</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.ui.externaltools.ExternalToolBuilder</name>
<triggers>auto,full,incremental,</triggers>
<arguments>
<dictionary>
<key>LaunchConfigHandle</key>
<value><project>/.exploded.launch</value>
</dictionary>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
More information about the jboss-cvs-commits
mailing list