shiro-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lhazlew...@apache.org
Subject svn commit: r736939 - in /incubator/jsecurity/trunk: ./ core/ samples/quickstart/ samples/spring-hibernate/ samples/spring/ samples/standalone/ samples/web/ support/ehcache/ support/quartz/ support/spring/ web/
Date Fri, 23 Jan 2009 05:30:12 GMT
Author: lhazlewood
Date: Thu Jan 22 21:30:11 2009
New Revision: 736939

URL: http://svn.apache.org/viewvc?rev=736939&view=rev
Log:
re-enabled samples builds

Modified:
    incubator/jsecurity/trunk/build.xml
    incubator/jsecurity/trunk/common.ant.xml
    incubator/jsecurity/trunk/core/build.xml
    incubator/jsecurity/trunk/samples/quickstart/build.xml
    incubator/jsecurity/trunk/samples/quickstart/quickstart.iml
    incubator/jsecurity/trunk/samples/spring-hibernate/build.xml
    incubator/jsecurity/trunk/samples/spring/build.xml
    incubator/jsecurity/trunk/samples/standalone/build.xml
    incubator/jsecurity/trunk/samples/web/build.xml
    incubator/jsecurity/trunk/support/ehcache/build.xml
    incubator/jsecurity/trunk/support/quartz/build.xml
    incubator/jsecurity/trunk/support/spring/build.xml
    incubator/jsecurity/trunk/web/build.xml

Modified: incubator/jsecurity/trunk/build.xml
URL: http://svn.apache.org/viewvc/incubator/jsecurity/trunk/build.xml?rev=736939&r1=736938&r2=736939&view=diff
==============================================================================
--- incubator/jsecurity/trunk/build.xml (original)
+++ incubator/jsecurity/trunk/build.xml Thu Jan 22 21:30:11 2009
@@ -90,7 +90,8 @@
     </target>
 
     <target name="init">
-        <mkdir dir="${dist.dir}"/>
+        <mkdir dir="${dist.dir}/modules"/>
+        <mkdir dir="${dist.dir}/samples"/>
     </target>
 
     <!-- ==================================================================
@@ -112,13 +113,17 @@
         <ant dir="support/spring" target="${target}"/>
         <echo message="Executing '${target}' for the quartz module..."/>
         <ant dir="support/quartz" target="${target}"/>
-        <!-- <echo message="Executing '${target}' for the samples/spring module..."/>
+        <echo message="Executing '${target}' for the samples/quickstart module..."/>
+        <ant dir="samples/quickstart" target="${target}"/>
+        <echo message="Executing '${target}' for the samples/standalone module..."/>
+        <ant dir="samples/standalone" target="${target}"/>
+        <echo message="Executing '${target}' for the samples/spring module..."/>
         <ant dir="samples/spring" target="${target}"/>
         <echo message="Executing '${target}' for the samples/spring-hibernate module..."/>
         <ant dir="samples/spring-hibernate" target="${target}"/>
         <echo message="Executing '${target}' for the samples/web module..."/>
-        <ant dir="samples/web" target="${target}"/> -->
-
+        <ant dir="samples/web" target="${target}"/>
+        
     </target>
 
     <!-- ===================================================================
@@ -141,15 +146,16 @@
     </target>
 
     <macrodef name="jarjar">
-        <attribute name="jardir" default="${dist.dir}"/>
+        <attribute name="srcdir" default="${dist.dir}/modules"/>
+        <attribute name="todir" default="${dist.dir}"/>
         <attribute name="jdksuffix" default=""/>
         <sequential>
-            <jar destfile="@{jardir}/${project.name}@{jdksuffix}-${version}.jar" duplicate="fail">
-                <zipfileset src="@{jardir}/${project.name}-core@{jdksuffix}-${version}.jar"/>
-                <zipfileset src="@{jardir}/${project.name}-web@{jdksuffix}-${version}.jar"/>
-                <zipfileset src="@{jardir}/${project.name}-ehcache@{jdksuffix}-${version}.jar"/>
-                <zipfileset src="@{jardir}/${project.name}-quartz@{jdksuffix}-${version}.jar"/>
-                <zipfileset src="@{jardir}/${project.name}-spring@{jdksuffix}-${version}.jar"/>
+            <jar destfile="@{todir}/${project.name}@{jdksuffix}-${version}.jar" duplicate="fail">
+                <zipfileset src="@{srcdir}/${project.name}-core@{jdksuffix}-${version}.jar"/>
+                <zipfileset src="@{srcdir}/${project.name}-web@{jdksuffix}-${version}.jar"/>
+                <zipfileset src="@{srcdir}/${project.name}-ehcache@{jdksuffix}-${version}.jar"/>
+                <zipfileset src="@{srcdir}/${project.name}-quartz@{jdksuffix}-${version}.jar"/>
+                <zipfileset src="@{srcdir}/${project.name}-spring@{jdksuffix}-${version}.jar"/>
             </jar>
         </sequential>
     </macrodef>
@@ -163,54 +169,22 @@
         <!-- Now that each module has been packaged, make a 'master' .jar that includes everything.  This allows
              end-users to choose to use a single jar or multiple jars depending on their preference: -->
         <jarjar/>
-        <jarjar jardir="${dist.dir}/jdk14" jdksuffix="-jdk14"/>
-        <jarjar jardir="${dist.dir}/jdk13" jdksuffix="-jdk13"/>
-
-    </target>
-
-    <target name="samples.quickstart" depends="jar" description="Creates the quickstart .jar">
-        <ant dir="samples/quickstart"/>
-    </target>
-
-    <target name="samples.quickstart.run" depends="samples.quickstart" description="Runs the quickstart class">
-        <ant dir="samples/quickstart" target="run"/>
-    </target>
-
-    <target name="samples.standalone" depends="jar" description="Creates the standalone .jar">
-        <ant dir="samples/standalone"/>
-    </target>
-
-    <target name="samples.standalone.run" depends="samples.standalone" description="Runs the standalone sample class">
-        <ant dir="samples/standalone" target="run"/>
-    </target>
-
-    <target name="samples.web" depends="jar" description="Creates the JSecurity sample webapp .war">
-        <ant dir="samples/web"/>
-    </target>
-
-    <target name="samples.spring" depends="jar" description="Creates the sample JSecurity/Spring .war">
-        <ant dir="samples/spring"/>
-    </target>
+        <jarjar srcdir="${dist.dir}/jdk14" todir="${dist.dir}/jdk14" jdksuffix="-jdk14"/>
+        <jarjar srcdir="${dist.dir}/jdk13" todir="${dist.dir}/jdk13" jdksuffix="-jdk13"/>
 
-    <target name="samples.spring-hibernate" depends="jar"
-            description="Creates the sample JSecurity Spring/Hibernate .war">
-        <ant dir="samples/spring-hibernate"/>
     </target>
 
-    <target name="samples" depends="samples.quickstart,samples.web,samples.spring,samples.spring-hibernate"
-            description="Creates all sample applications"/>
-
-    <target name="samples.web.deploy" depends="samples.web"
+    <target name="samples.web.deploy" depends="package"
             description="Deploys the JSecurity quickstart .war">
         <ant dir="samples/web" target="deploy"/>
     </target>
 
-    <target name="samples.spring.deploy" depends="samples.spring"
+    <target name="samples.spring.deploy" depends="package"
             description="Deploys the sample JSecurity/Spring .war">
         <ant dir="samples/spring" target="deploy"/>
     </target>
 
-    <target name="samples.spring-hibernate.deploy" depends="samples.spring-hibernate"
+    <target name="samples.spring-hibernate.deploy" depends="package"
             description="Deploys the sample JSecurity Spring/Hibernate .war">
         <ant dir="samples/spring-hibernate" target="deploy"/>
     </target>

Modified: incubator/jsecurity/trunk/common.ant.xml
URL: http://svn.apache.org/viewvc/incubator/jsecurity/trunk/common.ant.xml?rev=736939&r1=736938&r2=736939&view=diff
==============================================================================
--- incubator/jsecurity/trunk/common.ant.xml (original)
+++ incubator/jsecurity/trunk/common.ant.xml Thu Jan 22 21:30:11 2009
@@ -48,6 +48,8 @@
     <property name="compile.deprecation" value="false"/>
     <property name="compile.optimize" value="false"/>
 
+    <property name="deploy.dir" value="${env.CATALINA_HOME}/webapps"/>
+
     <path id="all.libs">
         <fileset dir="${lib.dir}">
             <include name="**/*.jar"/>
@@ -58,7 +60,7 @@
     <path id="test.path">
         <path refid="all.libs"/>
         <fileset dir="${dist.dir}">
-            <include name="*.jar"/>
+            <include name="**/*.jar"/>
         </fileset>
     </path>
 

Modified: incubator/jsecurity/trunk/core/build.xml
URL: http://svn.apache.org/viewvc/incubator/jsecurity/trunk/core/build.xml?rev=736939&r1=736938&r2=736939&view=diff
==============================================================================
--- incubator/jsecurity/trunk/core/build.xml (original)
+++ incubator/jsecurity/trunk/core/build.xml Thu Jan 22 21:30:11 2009
@@ -6,7 +6,7 @@
     <property name="module.name" value="core"/>
     <import file="${root.base.dir}/common.ant.xml"/>
     <property name="dist.jarName" value="${project.name}-${module.name}-${version}"/>
-    <property name="dist.jar" value="${dist.dir}/${dist.jarName}.jar"/>
+    <property name="dist.jar" value="${dist.dir}/modules/${dist.jarName}.jar"/>
 
     <path id="compile.path">
         <fileset dir="${lib.dir}/${module.name}">

Modified: incubator/jsecurity/trunk/samples/quickstart/build.xml
URL: http://svn.apache.org/viewvc/incubator/jsecurity/trunk/samples/quickstart/build.xml?rev=736939&r1=736938&r2=736939&view=diff
==============================================================================
--- incubator/jsecurity/trunk/samples/quickstart/build.xml (original)
+++ incubator/jsecurity/trunk/samples/quickstart/build.xml Thu Jan 22 21:30:11 2009
@@ -17,105 +17,40 @@
   ~ specific language governing permissions and limitations
   ~ under the License.
   -->
-<project name="quickstart" default="dist">
+<project name="quickstart" default="package">
 
     <property name="root.base.dir" value="../.."/>
-
-    <!-- "extend" parent build definition -->
-    <import file="../../build.xml"/>
-
-    <property name="module.name" value="quickstart"/>
-    <property name="module.base.dir" value="${root.base.dir}/samples/quickstart"/>
-    <property name="dist.jar.name" value="${project.name}-${module.name}.jar"/>
-    <property name="dist.jar" value="${root.dist.dir}/${dist.jar.name}"/>
-
-    <!-- Module properties -->
-    <property name="module.name" value="quickstart"/>
-    <property name="dist.war.name" value="${project.name}-${module.name}.war"/>
-    <property name="dist.war" value="${root.base.dir}/build/${dist.war.name}"/>
-
-    <property name="dist.dir" value="${build.dir}/dist"/>
+    <property name="module.name" value="samples-quickstart"/>
+    <import file="${root.base.dir}/common.ant.xml"/>
+    <property name="dist.jarName" value="${project.name}-${module.name}-${version}"/>
+    <property name="dist.jar" value="${dist.dir}/samples/${dist.jarName}.jar"/>
+    <property name="dist.warName" value="${project.name}-${module.name}-${version}"/>
+    <property name="dist.war" value="${dist.dir}/samples/${dist.warName}.war"/>
 
     <path id="compile.path">
-        <fileset dir="${lib.dir}/samples" includes="**/*.jar"/>
-        <fileset dir="${root.dist.dir}" includes="jsecurity.jar"/>
+        <fileset dir="${lib.dir}/samples">
+            <include name="*.jar"/>
+        </fileset>
+        <fileset dir="${dist.dir}/modules">
+            <include name="${project.name}-core-${version}.jar"/>
+        </fileset>
     </path>
 
     <path id="run.path">
         <pathelement location="${classes.dir}"/>
         <fileset dir="${lib.dir}/samples">
-            <include name="ehcache.jar"/>
-            <include name="commons-logging.jar"/>
-            <include name="log4j.jar"/>
-            <!-- needed by ehcache, not jsecurity: -->
-            <include name="backport-util-concurrent.jar"/>
+            <include name="commons-logging-*.jar"/>
+            <include name="log4j-*.jar"/>
             <!-- Not normally needed, but mac os x JDK needs it for some reason: -->
-            <include name="xercesImpl.jar"/>
+            <include name="xercesImpl-*.jar"/>
         </fileset>
-        <fileset dir="${root.dist.dir}" includes="jsecurity.jar"/>
+        <fileset dir="${root.dist.dir}" includes="${project.name}-${version}.jar"/>
     </path>
 
-    <!-- ===================================================================
-  -  clean - clean all build remnants from this submodule
-  - ==================================================================== -->
-    <target name="clean" description="Cleans the quickstart build">
-        <echo message="cleaning ${module.name} module"/>
-        <delete dir="${build.dir}"/>
-    </target>
-
-    <!-- ===================================================================
- -  compile - compile Java source files
- -  =================================================================== -->
-    <target name="compile" description="Compiles the quickstart classes">
-
-        <mkdir dir="${classes.dir}"/>
-        <mkdir dir="${classes.dir}/META-INF"/>
-
-        <javac destdir="${classes.dir}"
-               debug="${compile.debug}"
-               deprecation="${compile.deprecation}"
-               optimize="${compile.optimize}"
-               failonerror="true"
-               classpathref="compile.path">
-            <src path="${src.dir}"/>
-        </javac>
-
-        <copy todir="${classes.dir}">
-            <fileset dir="${src.dir}">
-                <include name="**/*.properties"/>
-                <include name="**/*.ini"/>
-            </fileset>
-        </copy>
-
-    </target>
-
-    <target name="jar" depends="compile" description="Creates a .jar of the quickstart classes">
-
-        <mkdir dir="${dist.dir}"/>
-
-        <jar jarfile="${dist.dir}/jsecurity-${module.name}.jar">
-            <fileset dir="${classes.dir}">
-                <include name="**/*.class"/>
-                <include name="**/*.properties"/>
-            </fileset>
-            <manifest>
-                <attribute name="Implementation-Title"
-                           value="${project.name}-${module.name}"/>
-                <attribute name="Implementation-Version" value="${version}"/>
-                <attribute name="${project.name}-Version" value="${version}"/>
-            </manifest>
-        </jar>
-    </target>
-
-    <!-- ===================================================================
- -  dist - create distribution war (which will be used for deployment)
- -  =================================================================== -->
-    <target name="dist" depends="compile,jar" description="Creates the ${module.name} .jar"/>
-
-    <target name="run" depends="dist" description="Runs the simple ${module.name} class">
+    <target name="compile" depends="compile.src"/> <!-- no test classes, no need to depend on compile.test -->
 
+    <target name="run" depends="package" description="Runs the simple ${module.name} class">
         <java classname="Quickstart" classpathref="run.path"/>
-
     </target>
 
 </project>
\ No newline at end of file

Modified: incubator/jsecurity/trunk/samples/quickstart/quickstart.iml
URL: http://svn.apache.org/viewvc/incubator/jsecurity/trunk/samples/quickstart/quickstart.iml?rev=736939&r1=736938&r2=736939&view=diff
==============================================================================
--- incubator/jsecurity/trunk/samples/quickstart/quickstart.iml (original)
+++ incubator/jsecurity/trunk/samples/quickstart/quickstart.iml Thu Jan 22 21:30:11 2009
@@ -4,7 +4,7 @@
     <exclude-output />
     <content url="file://$MODULE_DIR$">
       <sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
-      <excludeFolder url="file://$MODULE_DIR$/target" />
+      <excludeFolder url="file://$MODULE_DIR$/build" />
     </content>
     <orderEntry type="inheritedJdk" />
     <orderEntry type="sourceFolder" forTests="false" />

Modified: incubator/jsecurity/trunk/samples/spring-hibernate/build.xml
URL: http://svn.apache.org/viewvc/incubator/jsecurity/trunk/samples/spring-hibernate/build.xml?rev=736939&r1=736938&r2=736939&view=diff
==============================================================================
--- incubator/jsecurity/trunk/samples/spring-hibernate/build.xml (original)
+++ incubator/jsecurity/trunk/samples/spring-hibernate/build.xml Thu Jan 22 21:30:11 2009
@@ -18,122 +18,82 @@
   ~ specific language governing permissions and limitations
   ~ under the License.
   -->
-<project name="spring-hibernate" default="dist">
+<project name="spring-hibernate" default="package">
 
-  <property name="root.base.dir" value="../.."/>
+    <property name="root.base.dir" value="../.."/>
+    <property name="module.name" value="samples-sprhib"/>
+    <import file="${root.base.dir}/common.ant.xml"/>
+    <property name="dist.jarName" value="${project.name}-${module.name}-${version}"/>
+    <property name="dist.jar" value="${dist.dir}/samples/${dist.jarName}.jar"/>
+    <property name="dist.warName" value="${project.name}-${module.name}-${version}"/>
+    <property name="dist.war" value="${dist.dir}/samples/${dist.warName}.war"/>
+
+    <path id="compile.path">
+        <fileset dir="${lib.dir}/samples">
+            <include name="*.jar"/>
+        </fileset>
+        <fileset dir="${dist.dir}/modules">
+            <include name="${project.name}-core-${version}.jar"/>
+            <include name="${project.name}-web-${version}.jar"/>
+        </fileset>
+    </path>
+
+    <!-- ===================================================================
+         clean - clean all build remnants from this submodule
+         ==================================================================== -->
+    <target name="clean-deploy-dir" description="Removes the deployed war directory">
+        <echo message="cleaning ${dist.warName} module from ${deploy.dir}"/>
+        <delete file="${deploy.dir}/${dist.warName}.war"/>
+        <delete dir="${deploy.dir}/${dist.warName}"/>
+    </target>
+    <target name="clean" depends="clean-deploy-dir" description="Cleans the Spring/Hibernate sample webapp build">
+        <echo message="cleaning ${module.name} module"/>
+        <delete file="${dist.jar}"/>
+        <delete file="${dist.war}"/>
+        <delete dir="${build.dir}"/>
+    </target>
+
+    <target name="compile" depends="compile.src"/> <!-- no test classes, no need to depend on compile.test -->
+
+    <target name="war">
+        <war warfile="${dist.war}" webxml="WEB-INF/web.xml">
+            <lib dir="${dist.dir}" includes="*.jar"/>
+            <lib dir="${root.dist.dir}" includes="jsecurity.jar"/>
+            <lib dir="${lib.dir}/samples">
+                <include name="jstl-*.jar"/>
+                <include name="standard-*.jar"/>
+                <include name="log4j-*.jar"/>
+                <include name="commons-*.jar"/>
+                <include name="ehcache-*.jar"/>
+                <include name="backport-util-concurrent-*.jar"/>
+                <include name="hsqldb-*.jar"/>
+                <include name="spring-*.jar"/>
+            </lib>
+            <!-- Hibernate libs: -->
+            <lib dir="${lib.dir}/samples">
+                <include name="hibernate-*.jar"/>
+                <include name="antlr-*.jar"/>
+                <include name="asm-attrs-*.jar"/>
+                <include name="asm-*.jar"/>
+                <include name="cglib-*.jar"/>
+                <include name="geronimo-jta_1.0.1B_spec.jar"/>
+                <include name="dom4j-*.jar"/>
+                <include name="commons-collections-*.jar"/>
+            </lib>
+            <fileset dir="${base.dir}" includes="**" excludes="**/web.xml, **/build.xml"/>
+        </war>
+
+    </target>
+
+    <target name="package" depends="jar,war"/>
+
+    <target name="quick-deploy" description="Blindly deploys the sample Spring/Hibernate .war to Tomcat">
+        <echo>Deploying application to Tomcat...</echo>
+        <unzip src="${dist.war}" dest="${env.CATALINA_HOME}/webapps/${project.name}-${module.name}"/>
+        <touch file="${env.CATALINA_HOME}/webapps/${project.name}-${module.name}/WEB-INF/web.xml"/>
+    </target>
 
-  <!-- "extend" parent build definition -->
-  <import file="../../build.xml"/>
-
-  <property name="module.name" value="spring-hibernate"/>
-  <property name="module.base.dir" value="${root.base.dir}/samples/spring-hibernate"/>
-  <property name="dist.jar.name" value="${project.name}-${module.name}.jar"/>
-  <property name="dist.jar" value="${dist.dir}/${dist.jar.name}"/>
-
-  <!-- Module properties -->
-  <property name="dist.war.name" value="${project.name}-${module.name}.war"/>
-  <property name="dist.war" value="${root.base.dir}/build/${dist.war.name}"/>
-
-  <property name="dist.dir" value="${build.dir}/dist"/>
-
-  <!-- Deployment properties for development -->
-  <property name="deploy.dir" value="${env.CATALINA_HOME}/webapps"/>
-
-  <path id="compile.path">
-    <fileset dir="${lib.dir}" includes="**/*.jar"/>
-  </path>
-
-  <!-- ===================================================================
--  clean - clean all build remnants from this submodule
-- ==================================================================== -->
-  <target name="clean" depends="clean-deploy-dir" description="Cleans the spring-hibernate sample application build">
-    <echo message="cleaning ${module.name} module"/>
-    <delete file="${dist.war}"/>
-    <delete dir="${build.dir}"/>
-  </target>
-
-  <target name="clean-deploy-dir" description="Removes the deployed war directory">
-    <echo message="cleaning ${dist.war.name} module from ${deploy.dir}"/>
-    <delete file="${deploy.dir}/${dist.war.name}"/>
-    <delete dir="${deploy.dir}/${project.name}-${module.name}"/>
-  </target>
-
-  <!-- ===================================================================
--  compile - compile Java source files
--  =================================================================== -->
-  <target name="compile" description="Compiles the sample spring-hibernate app classes">
-
-    <mkdir dir="${classes.dir}"/>
-    <mkdir dir="${classes.dir}/META-INF"/>
-
-    <javac destdir="${classes.dir}"
-           debug="${compile.debug}"
-           deprecation="${compile.deprecation}"
-           optimize="${compile.optimize}"
-           failonerror="true"
-           classpathref="all.libs">
-      <src path="${src.dir}"/>
-      <classpath location="${root.dist.dir}/jsecurity.jar"/>
-    </javac>
-
-  </target>
-
-  <target name="jar" depends="compile" description="Creates a jar of the spring-hibernate sample app classes">
-
-    <mkdir dir="${dist.dir}"/>
-
-    <jar jarfile="${dist.dir}/${dist.jar.name}">
-      <fileset dir="${classes.dir}">
-        <include name="**/*.class"/>
-      </fileset>
-      <manifest>
-        <attribute name="Implementation-Title" value="${project.name}-${module.name}"/>
-        <attribute name="Implementation-Version" value="${version}"/>
-        <attribute name="${project.name}-Version" value="${version}"/>
-      </manifest>
-    </jar>
-  </target>
-
-  <!-- ===================================================================
--  dist - create distribution war (which will be used for deployment)
--  =================================================================== -->
-  <target name="dist" depends="compile,jar" description="Creates the quickstart .war">
-    <war warfile="${dist.war}" webxml="WEB-INF/web.xml">
-      <lib dir="${dist.dir}" includes="*.jar"/>
-      <lib dir="${root.dist.dir}" includes="jsecurity.jar"/>
-      <lib dir="${lib.dir}/samples">
-        <include name="jstl.jar"/>
-        <include name="standard.jar"/>
-        <include name="log4j.jar"/>
-        <include name="commons-*.jar"/>
-        <include name="ehcache.jar"/>
-        <include name="backport-util-concurrent.jar"/>
-        <include name="hsqldb.jar"/>
-        <include name="spring.jar"/>
-      </lib>
-      <!-- Hibernate libs: -->
-      <lib dir="${lib.dir}/samples">
-        <include name="hibernate.jar"/>
-        <include name="antlr.jar"/>
-        <include name="asm-attrs.jar"/>
-        <include name="asm.jar"/>
-        <include name="cglib.jar"/>
-        <include name="geronimo-jta_1.0.1B_spec.jar"/>
-        <include name="dom4j.jar"/>
-        <include name="commons-collections.jar"/>
-      </lib>
-      <fileset dir="${module.base.dir}" includes="**" excludes="**/web.xml, **/build.xml"/>
-      <!-- <lib dir="${dist.dir}" includes="*.jar"/> -->
-    </war>
-  </target>
-
-  <target name="quick-deploy" description="Blindly deploys the spring-hibernate sample app .war to Tomcat">
-    <echo>Deploying application to Tomcat...</echo>
-    <unzip src="${dist.war}" dest="${env.CATALINA_HOME}/webapps/${project.name}-${module.name}"/>
-    <touch file="${env.CATALINA_HOME}/webapps/${project.name}-${module.name}/WEB-INF/web.xml"/>
-  </target>
-
-  <target name="deploy" depends="dist,quick-deploy"
-          description="Creates and deploys the spring-hibernate sample app .war to Tomcat"/>
+    <target name="deploy" depends="package,quick-deploy"
+            description="Creates and deploys the sample Spring/Hibernate .war to Tomcat"/>
 
 </project>

Modified: incubator/jsecurity/trunk/samples/spring/build.xml
URL: http://svn.apache.org/viewvc/incubator/jsecurity/trunk/samples/spring/build.xml?rev=736939&r1=736938&r2=736939&view=diff
==============================================================================
--- incubator/jsecurity/trunk/samples/spring/build.xml (original)
+++ incubator/jsecurity/trunk/samples/spring/build.xml Thu Jan 22 21:30:11 2009
@@ -17,21 +17,21 @@
   ~ specific language governing permissions and limitations
   ~ under the License.
   -->
-<?xml version="1.0"?>
-
-<project name="spring" default="package">
+<project name="samples-spring" default="package">
 
     <property name="root.base.dir" value="../.."/>
     <property name="module.name" value="samples-spring"/>
     <import file="${root.base.dir}/common.ant.xml"/>
     <property name="dist.jarName" value="${project.name}-${module.name}-${version}"/>
-    <property name="dist.jar" value="${dist.dir}/${dist.jarName}.jar"/>
+    <property name="dist.jar" value="${dist.dir}/samples/${dist.jarName}.jar"/>
+    <property name="dist.warName" value="${project.name}-${module.name}-${version}"/>
+    <property name="dist.war" value="${dist.dir}/samples/${dist.warName}.war"/>
 
     <path id="compile.path">
-        <fileset dir="${lib.dir}/${module.name}">
+        <fileset dir="${lib.dir}/samples">
             <include name="*.jar"/>
         </fileset>
-        <fileset dir="${dist.dir}">
+        <fileset dir="${dist.dir}/modules">
             <include name="${project.name}-core-${version}.jar"/>
             <include name="${project.name}-web-${version}.jar"/>
         </fileset>
@@ -41,12 +41,13 @@
          clean - clean all build remnants from this submodule
          ==================================================================== -->
     <target name="clean-deploy-dir" description="Removes the deployed war directory">
-        <echo message="cleaning ${dist.war.name} module from ${deploy.dir}"/>
-        <delete file="${deploy.dir}/${dist.war.name}"/>
-        <delete dir="${deploy.dir}/${project.name}-${module.name}"/>
+        <echo message="cleaning ${dist.warName} module from ${deploy.dir}"/>
+        <delete file="${deploy.dir}/${dist.warName}.war"/>
+        <delete dir="${deploy.dir}/${dist.warName}"/>
     </target>
-    <target name="clean" depends="clean-deploy-dir" description="Cleans the Spring build">
+    <target name="clean" depends="clean-deploy-dir" description="Cleans the Spring sample webapp build">
         <echo message="cleaning ${module.name} module"/>
+        <delete file="${dist.jar}"/>
         <delete file="${dist.war}"/>
         <delete dir="${build.dir}"/>
     </target>
@@ -66,22 +67,12 @@
             description="Creates a .jar of the Spring sample app classes"/>
 
     <target name="war">
-
-    </target>
-
-    <target name="package" depends="jar,war"/>
-
-    <!-- ===================================================================
-         dist - create distribution war (which will be used for deployment)
-         =================================================================== -->
-    <target name="dist" depends="compile,jar" description="Creates the sample Spring application .war">
-
         <property name="webstart.lib.dir" value="${build.dir}/webstart"/>
         <mkdir dir="${webstart.lib.dir}"/>
         <copy todir="${webstart.lib.dir}" preservelastmodified="true" flatten="true">
-            <fileset dir="${dist.dir}" includes="jsecurity-spring-sample.jar"/>
-            <fileset dir="${root.base.dir}" includes="**/jsecurity.jar"/>
-            <fileset dir="${lib.dir}/samples" includes="spring.jar"/>
+            <fileset dir="${dist.dir}" includes="${dist.jarName}.jar"/>
+            <fileset dir="${dist.dir}" includes="${project.name}-${version}.jar"/>
+            <fileset dir="${lib.dir}/samples" includes="spring-*.jar" excludes="spring-webmvc-*.jar"/>
             <fileset dir="${lib.dir}/samples" includes="commons-*.jar"/>
         </copy>
         <signjar keystore="${etc.dir}/jsecurity-sample.jks"
@@ -92,8 +83,11 @@
         </signjar>
 
         <war warfile="${dist.war}" webxml="webroot/WEB-INF/web.xml">
-            <lib dir="${lib.dir}/samples" includes="*.jar" excludes="servlet-api.jar"/>
-            <lib dir="${root.dist.dir}" includes="jsecurity.jar"/>
+            <lib dir="${lib.dir}/samples">
+                <exclude name="servlet-api-*.jar"/>
+            </lib>
+            <lib dir="${lib.dir}/samples" includes="*.jar" excludes="servlet-api-*.jar"/>
+            <lib dir="${root.dist.dir}" includes="${project.name}-${version}.jar"/>
             <webinf dir="${basedir}" includes="resources/**"/>
             <fileset dir="webroot" includes="**" excludes="**/web.xml"/>
 
@@ -102,15 +96,18 @@
             <!-- Jar for webstart application -->
             <fileset dir="${webstart.lib.dir}" includes="*.jar"/>
         </war>
+
     </target>
 
+    <target name="package" depends="jar,war"/>
+
     <target name="quick-deploy" description="Blindly deploys the sample Spring .war to Tomcat">
         <echo>Deploying application to Tomcat...</echo>
         <unzip src="${dist.war}" dest="${env.CATALINA_HOME}/webapps/${project.name}-${module.name}"/>
         <touch file="${env.CATALINA_HOME}/webapps/${project.name}-${module.name}/WEB-INF/web.xml"/>
     </target>
 
-    <target name="deploy" depends="dist,quick-deploy"
+    <target name="deploy" depends="package,quick-deploy"
             description="Creates and deploys the sample Spring .war to Tomcat"/>
 
 

Modified: incubator/jsecurity/trunk/samples/standalone/build.xml
URL: http://svn.apache.org/viewvc/incubator/jsecurity/trunk/samples/standalone/build.xml?rev=736939&r1=736938&r2=736939&view=diff
==============================================================================
--- incubator/jsecurity/trunk/samples/standalone/build.xml (original)
+++ incubator/jsecurity/trunk/samples/standalone/build.xml Thu Jan 22 21:30:11 2009
@@ -17,101 +17,40 @@
   ~ specific language governing permissions and limitations
   ~ under the License.
   -->
-<project name="standalone" default="dist">
+<project name="standalone" default="package">
 
     <property name="root.base.dir" value="../.."/>
-
-    <!-- "extend" parent build definition -->
-    <import file="../../build.xml"/>
-
-    <!-- Module properties -->
-    <property name="module.name" value="standalone"/>
-    <property name="module.base.dir" value="${root.base.dir}/samples/${module.name}"/>
-    <property name="dist.jar.name" value="${project.name}-${module.name}.jar"/>
-    <property name="dist.jar" value="${root.dist.dir}/${dist.jar.name}"/>
-    <property name="dist.dir" value="${build.dir}/dist"/>
+    <property name="module.name" value="samples-standalone"/>
+    <import file="${root.base.dir}/common.ant.xml"/>
+    <property name="dist.jarName" value="${project.name}-${module.name}-${version}"/>
+    <property name="dist.jar" value="${dist.dir}/samples/${dist.jarName}.jar"/>
+    <property name="dist.warName" value="${project.name}-${module.name}-${version}"/>
+    <property name="dist.war" value="${dist.dir}/samples/${dist.warName}.war"/>
 
     <path id="compile.path">
-        <fileset dir="${lib.dir}/samples" includes="**/*.jar"/>
-        <fileset dir="${root.dist.dir}" includes="jsecurity.jar"/>
+        <fileset dir="${lib.dir}/samples">
+            <include name="*.jar"/>
+        </fileset>
+        <fileset dir="${dist.dir}/modules">
+            <include name="${project.name}-core-${version}.jar"/>
+        </fileset>
     </path>
 
     <path id="run.path">
         <pathelement location="${classes.dir}"/>
         <fileset dir="${lib.dir}/samples">
-            <include name="ehcache.jar"/>
-            <include name="commons-beanutils.jar"/>
-            <include name="commons-logging.jar"/>
-            <include name="log4j.jar"/>
-            <!-- needed by ehcache, not jsecurity: -->
-            <include name="backport-util-concurrent.jar"/>
+            <include name="commons-logging-*.jar"/>
+            <include name="log4j-*.jar"/>
             <!-- Not normally needed, but mac os x JDK needs it for some reason: -->
-            <include name="xercesImpl.jar"/>
+            <include name="xercesImpl-*.jar"/>
         </fileset>
-        <fileset dir="${root.dist.dir}" includes="jsecurity.jar"/>
+        <fileset dir="${root.dist.dir}" includes="${project.name}-${version}.jar"/>
     </path>
 
-    <!-- ===================================================================
-  -  clean - clean all build remnants from this submodule
-  - ==================================================================== -->
-    <target name="clean" description="Cleans the ${module.name} build">
-        <echo message="cleaning ${module.name} module"/>
-        <delete dir="${build.dir}"/>
-    </target>
-
-    <!-- ===================================================================
- -  compile - compile Java source files
- -  =================================================================== -->
-    <target name="compile" description="Compiles the ${module.name} classes">
-
-        <mkdir dir="${classes.dir}"/>
-        <mkdir dir="${classes.dir}/META-INF"/>
-
-        <javac destdir="${classes.dir}"
-               debug="${compile.debug}"
-               deprecation="${compile.deprecation}"
-               optimize="${compile.optimize}"
-               failonerror="true"
-               classpathref="compile.path">
-            <src path="${src.dir}"/>
-        </javac>
-
-        <copy todir="${classes.dir}">
-            <fileset dir="${src.dir}">
-                <include name="**/*.properties"/>
-                <include name="**/*.ini"/>
-            </fileset>
-        </copy>
-
-    </target>
-
-    <target name="jar" depends="compile" description="Creates a .jar of the ${module.name} classes">
-
-        <mkdir dir="${dist.dir}"/>
-
-        <jar jarfile="${dist.dir}/jsecurity-${module.name}.jar">
-            <fileset dir="${classes.dir}">
-                <include name="**/*.class"/>
-                <include name="**/*.properties"/>
-            </fileset>
-            <manifest>
-                <attribute name="Implementation-Title"
-                           value="${project.name}-${module.name}"/>
-                <attribute name="Implementation-Version" value="${version}"/>
-                <attribute name="${project.name}-Version" value="${version}"/>
-            </manifest>
-        </jar>
-    </target>
-
-    <!-- ===================================================================
- -  dist - create distribution war (which will be used for deployment)
- -  =================================================================== -->
-    <target name="dist" depends="compile,jar" description="Creates the ${module.name} .jar"/>
-
-    <target name="run" depends="dist" description="Runs the simple ${module.name} class">
+    <target name="compile" depends="compile.src"/> <!-- no test classes, no need to depend on compile.test -->
 
+    <target name="run" depends="package" description="Runs the simple ${module.name} class">
         <java classname="Standalone" classpathref="run.path"/>
-
     </target>
 
 </project>

Modified: incubator/jsecurity/trunk/samples/web/build.xml
URL: http://svn.apache.org/viewvc/incubator/jsecurity/trunk/samples/web/build.xml?rev=736939&r1=736938&r2=736939&view=diff
==============================================================================
--- incubator/jsecurity/trunk/samples/web/build.xml (original)
+++ incubator/jsecurity/trunk/samples/web/build.xml Thu Jan 22 21:30:11 2009
@@ -17,105 +17,67 @@
   ~ specific language governing permissions and limitations
   ~ under the License.
   -->
-<project name="web" default="dist">
+<project name="samples-web" default="package">
 
     <property name="root.base.dir" value="../.."/>
-
-    <!-- "extend" parent build definition -->
-    <import file="../../build.xml"/>
-
-    <property name="module.name" value="web"/>
-    <property name="module.base.dir" value="${root.base.dir}/samples/web"/>
-    <property name="dist.jar.name" value="${project.name}-${module.name}.jar"/>
-    <property name="dist.jar" value="${root.dist.dir}/${dist.jar.name}"/>
-
-    <!-- Module properties -->
-    <property name="dist.war.name" value="${project.name}-${module.name}.war"/>
-    <property name="dist.war" value="${root.base.dir}/build/${dist.war.name}"/>
-
-    <property name="dist.dir" value="${build.dir}/dist"/>
-
-    <!-- Deployment properties for development -->
-    <property name="deploy.dir" value="${env.CATALINA_HOME}/webapps"/>
+    <property name="module.name" value="samples-web"/>
+    <import file="${root.base.dir}/common.ant.xml"/>
+    <property name="dist.jarName" value="${project.name}-${module.name}-${version}"/>
+    <property name="dist.jar" value="${dist.dir}/samples/${dist.jarName}.jar"/>
+    <property name="dist.warName" value="${project.name}-${module.name}-${version}"/>
+    <property name="dist.war" value="${dist.dir}/samples/${dist.warName}.war"/>
 
     <path id="compile.path">
-        <fileset dir="${lib.dir}" includes="**/*.jar"/>
+        <fileset dir="${lib.dir}/samples">
+            <include name="*.jar"/>
+        </fileset>
+        <fileset dir="${dist.dir}/modules">
+            <include name="${project.name}-core-${version}.jar"/>
+            <include name="${project.name}-web-${version}.jar"/>
+        </fileset>
     </path>
 
     <!-- ===================================================================
-  -  clean - clean all build remnants from this submodule
-  - ==================================================================== -->
-    <target name="clean" description="Cleans the samples webapp build">
+         clean - clean all build remnants from this submodule
+         ==================================================================== -->
+    <target name="clean-deploy-dir" description="Removes the deployed war directory">
+        <echo message="cleaning ${dist.warName} module from ${deploy.dir}"/>
+        <delete file="${deploy.dir}/${dist.warName}.war"/>
+        <delete dir="${deploy.dir}/${dist.warName}"/>
+    </target>
+    <target name="clean" depends="clean-deploy-dir" description="Cleans the Spring/Hibernate sample webapp build">
         <echo message="cleaning ${module.name} module"/>
+        <delete file="${dist.jar}"/>
         <delete file="${dist.war}"/>
         <delete dir="${build.dir}"/>
     </target>
 
-    <!-- ===================================================================
- -  compile - compile Java source files
- -  =================================================================== -->
-    <target name="compile" description="Compiles the sample webapp classes">
-
-        <!-- <mkdir dir="${classes.dir}"/>
-    <mkdir dir="${classes.dir}/META-INF"/>
-
-    <javac destdir="${classes.dir}"
-              debug="${compile.debug}"
-              deprecation="${compile.deprecation}"
-              optimize="${compile.optimize}"
-              failonerror="true"
-              classpathref="all.libs">
-     <src path="${src.dir}"/>
-           <classpath location="${root.dist.dir}/jsecurity.jar"/>
-       </javac> -->
-
-    </target>
-
-    <target name="jar" depends="compile" description="Creates a jar of the sample webapp classes">
-
-        <!-- <mkdir dir="${dist.dir}"/>
-
-       <jar jarfile="${dist.jar}">
-           <fileset dir="${classes.dir}">
-               <include name="**/*.class"/>
-           </fileset>
-           <fileset dir="${etc.dir}">
-               <include name="*.xml"/>
-               <include name="*.gif"/>
-               <include name="*.jpg"/>
-               <include name="*.properties"/>
-           </fileset>
-           <manifest>
-               <attribute name="Implementation-Title" value="${project.name}-${module.name}"/>
-               <attribute name="Implementation-Version" value="${version}"/>
-               <attribute name="${project.name}-Version" value="${version}"/>
-           </manifest>
-       </jar> -->
-    </target>
 
     <!-- ===================================================================
- -  dist - create distribution war (which will be used for deployment)
- -  =================================================================== -->
-    <target name="dist" description="Creates the samples webapp .war">
+         war - create distribution war (which will be used for deployment)
+         =================================================================== -->
+    <target name="war" description="Creates the samples webapp .war">
         <war warfile="${dist.war}" webxml="../web/WEB-INF/web.xml">
-            <lib dir="${root.dist.dir}" includes="jsecurity.jar"/>
-            <lib dir="${lib.dir}/samples" includes="jstl.jar"/>
-            <lib dir="${lib.dir}/samples" includes="standard.jar"/>
-            <lib dir="${lib.dir}/samples" includes="log4j.jar"/>
+            <lib dir="${root.dist.dir}" includes="jsecurity-*.jar"/>
+            <lib dir="${lib.dir}/samples" includes="jstl-*.jar"/>
+            <lib dir="${lib.dir}/samples" includes="standard-*.jar"/>
+            <lib dir="${lib.dir}/samples" includes="log4j-*.jar"/>
             <lib dir="${lib.dir}/samples" includes="commons-*.jar"/>
-            <lib dir="${lib.dir}/samples" includes="ehcache.jar"/>
-            <lib dir="${lib.dir}/samples" includes="backport-util-concurrent.jar"/>
-            <fileset dir="${module.base.dir}" includes="**" excludes="**/web.xml, **/build.xml"/>
-            <!-- <lib dir="${dist.dir}" includes="*.jar"/> -->
+            <lib dir="${lib.dir}/samples" includes="ehcache-*.jar"/>
+            <lib dir="${lib.dir}/samples" includes="backport-util-concurrent-*.jar"/>
+            <fileset dir="${base.dir}" includes="**" excludes="**/web.xml, **/build.xml"/>
         </war>
     </target>
 
-    <target name="quick-deploy" description="Blindly deploys the samples webapp .war to Tomcat">
+    <target name="package" depends="war"/>
+
+    <target name="quick-deploy" description="Blindly deploys the sample web .war to Tomcat">
         <echo>Deploying application to Tomcat...</echo>
         <unzip src="${dist.war}" dest="${env.CATALINA_HOME}/webapps/${project.name}-${module.name}"/>
         <touch file="${env.CATALINA_HOME}/webapps/${project.name}-${module.name}/WEB-INF/web.xml"/>
     </target>
 
-    <target name="deploy" depends="dist,quick-deploy" description="Creates and deploys the samples webapp .war to Tomcat"/>
+    <target name="deploy" depends="package,quick-deploy"
+            description="Creates and deploys the sample web .war to Tomcat"/>
 
 </project>

Modified: incubator/jsecurity/trunk/support/ehcache/build.xml
URL: http://svn.apache.org/viewvc/incubator/jsecurity/trunk/support/ehcache/build.xml?rev=736939&r1=736938&r2=736939&view=diff
==============================================================================
--- incubator/jsecurity/trunk/support/ehcache/build.xml (original)
+++ incubator/jsecurity/trunk/support/ehcache/build.xml Thu Jan 22 21:30:11 2009
@@ -6,13 +6,13 @@
     <property name="module.name" value="ehcache"/>
     <import file="${root.base.dir}/common.ant.xml"/>
     <property name="dist.jarName" value="${project.name}-${module.name}-${version}"/>
-    <property name="dist.jar" value="${dist.dir}/${dist.jarName}.jar"/>
+    <property name="dist.jar" value="${dist.dir}/modules/${dist.jarName}.jar"/>
 
     <path id="compile.path">
         <fileset dir="${lib.dir}/${module.name}">
             <include name="*.jar"/>
         </fileset>
-        <fileset dir="${dist.dir}">
+        <fileset dir="${dist.dir}/modules">
             <include name="${project.name}-core-${version}.jar"/>
         </fileset>
     </path>

Modified: incubator/jsecurity/trunk/support/quartz/build.xml
URL: http://svn.apache.org/viewvc/incubator/jsecurity/trunk/support/quartz/build.xml?rev=736939&r1=736938&r2=736939&view=diff
==============================================================================
--- incubator/jsecurity/trunk/support/quartz/build.xml (original)
+++ incubator/jsecurity/trunk/support/quartz/build.xml Thu Jan 22 21:30:11 2009
@@ -6,13 +6,13 @@
     <property name="module.name" value="quartz"/>
     <import file="${root.base.dir}/common.ant.xml"/>
     <property name="dist.jarName" value="${project.name}-${module.name}-${version}"/>
-    <property name="dist.jar" value="${dist.dir}/${dist.jarName}.jar"/>
+    <property name="dist.jar" value="${dist.dir}/modules/${dist.jarName}.jar"/>
 
     <path id="compile.path">
         <fileset dir="${lib.dir}/${module.name}">
             <include name="*.jar"/>
         </fileset>
-        <fileset dir="${dist.dir}">
+        <fileset dir="${dist.dir}/modules">
             <include name="${project.name}-core-${version}.jar"/>
         </fileset>
     </path>

Modified: incubator/jsecurity/trunk/support/spring/build.xml
URL: http://svn.apache.org/viewvc/incubator/jsecurity/trunk/support/spring/build.xml?rev=736939&r1=736938&r2=736939&view=diff
==============================================================================
--- incubator/jsecurity/trunk/support/spring/build.xml (original)
+++ incubator/jsecurity/trunk/support/spring/build.xml Thu Jan 22 21:30:11 2009
@@ -6,13 +6,13 @@
     <property name="module.name" value="spring"/>
     <import file="${root.base.dir}/common.ant.xml"/>
     <property name="dist.jarName" value="${project.name}-${module.name}-${version}"/>
-    <property name="dist.jar" value="${dist.dir}/${dist.jarName}.jar"/>
+    <property name="dist.jar" value="${dist.dir}/modules/${dist.jarName}.jar"/>
 
     <path id="compile.path">
         <fileset dir="${lib.dir}/${module.name}">
             <include name="*.jar"/>
         </fileset>
-        <fileset dir="${dist.dir}">
+        <fileset dir="${dist.dir}/modules">
             <include name="${project.name}-core-${version}.jar"/>
             <include name="${project.name}-web-${version}.jar"/>
         </fileset>

Modified: incubator/jsecurity/trunk/web/build.xml
URL: http://svn.apache.org/viewvc/incubator/jsecurity/trunk/web/build.xml?rev=736939&r1=736938&r2=736939&view=diff
==============================================================================
--- incubator/jsecurity/trunk/web/build.xml (original)
+++ incubator/jsecurity/trunk/web/build.xml Thu Jan 22 21:30:11 2009
@@ -6,13 +6,13 @@
     <property name="module.name" value="web"/>
     <import file="${root.base.dir}/common.ant.xml"/>
     <property name="dist.jarName" value="${project.name}-${module.name}-${version}"/>
-    <property name="dist.jar" value="${dist.dir}/${dist.jarName}.jar"/>
+    <property name="dist.jar" value="${dist.dir}/modules/${dist.jarName}.jar"/>
 
     <path id="compile.path">
         <fileset dir="${lib.dir}/${module.name}">
             <include name="*.jar"/>
         </fileset>
-        <fileset dir="${dist.dir}">
+        <fileset dir="${dist.dir}/modules">
             <include name="${project.name}-core-${version}.jar"/>
         </fileset>
     </path>



Mime
View raw message