Source

propertyset / build.xml

<project default="jar" basedir=".">

  <property name="src.test" location="src/test"/>
  <property name="src.etc" location="src/etc"/>

  <property name="common.build" value="osbuild.xml"/>
  <property name="providers" location="providers"/>

  <import file="${common.build}"/>

  <path id="providers.cp">
    <path refid="cp" />
    <fileset dir="${providers}">
      <include name="*/lib/*.jar"/>
    </fileset>
    <pathelement location="${build.java}"/>
    <pathelement location="${providers}/ejb/build"/>
    <pathelement location="${providers}/ejb3/build"/>
    <pathelement location="${providers}/hibernate/build"/>
    <pathelement location="${providers}/hibernate3/build"/>
    <pathelement location="${providers}/ofbiz/build"/>
    <pathelement location="${providers}/ojb/build"/>
  </path>
  
  <path id="jalopy.classpath">
    <fileset dir="lib/build/jalopy">
      <include name="*.jar"/>
    </fileset>
  </path>

  <taskdef name="jalopy" classname="de.hunsicker.jalopy.plugin.ant.AntPlugin">
    <classpath refid="jalopy.classpath"/>
  </taskdef>

  <target name="clean" depends="common.clean">
    <delete>
      <fileset dir="${providers}/ejb/src/com/opensymphony/module/propertyset/ejb">
        <exclude name="**/*EJB*.java"/>
      </fileset>
    </delete>
    <delete includeemptydirs="true">
      <fileset dir="${providers}">
        <include name="*/build/**"/>
      </fileset>
    </delete>
  </target>

  <target name="ejbdoclet" depends="init">
    <taskdef name="ejbdoclet" classname="xdoclet.modules.ejb.EjbDocletTask">
      <classpath>
        <path refid="cp" />
        <fileset dir="${providers}/ejb/lib">
          <include name="*.jar"/>
        </fileset>
      </classpath>
    </taskdef>

    <ejbdoclet ejbspec="2.0" verbose="false" destdir="${providers}/ejb/src">
      <fileset dir="${providers}/ejb/src">
        <include name="com/opensymphony/module/propertyset/ejb/**/*EJB.java"/>
      </fileset>
      <remoteinterface/>
      <localinterface/>
      <homeinterface/>
      <localhomeinterface/>
      <!--<valueobject/>-->
      <!--<entitypk/>-->
      <entitycmp/>
      <!--<session/>-->
      <utilobject pattern="{0}HomeFactory" cacheHomes="true"/>
      <deploymentdescriptor destdir="${providers}/ejb/build/META-INF" validatexml="true" description="OpenSymphony PropertySet"
                            displayname="PropertySet Module"/>
      <jboss version="3.0" destdir="${providers}/ejb/build/META-INF"/>
      <weblogic version="7.0" destdir="${providers}/ejb/build/META-INF" datasource="defaultDS" createtables="true"/>
      <jrun version="4.0" destdir="${providers}/ejb/build/META-INF"/>
      <orion version="2.0" destdir="${providers}/ejb/build/META-INF"/>
    </ejbdoclet>
  </target>

  <target name="test-compile" unless="skip.tests">
    <compile srcdir="${src.test}" destdir="${build.test}" classpathref="providers.cp" />

    <taskdef resource="clovertasks"/>
    <taskdef name="junit" classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTask"/>

    <mkdir dir="${build.clover}"/>
    <clover-setup initString="${build.clover}/coverage.db">
      <files>
        <exclude name="${src.test}/**/*.java"/>
      </files>
    </clover-setup>

    <compile srcdir="${src.java}" destdir="${build.java-test}" />
    <provider-compile provider="ejb3" source="1.5" destdir="${build.java-test}" />
    <provider-compile provider="ejb" destdir="${build.java-test}" />
    <provider-compile provider="hibernate" destdir="${build.java-test}" />
    <provider-compile provider="hibernate3" destdir="${build.java-test}" />
    <provider-compile provider="ofbiz" destdir="${build.java-test}" />
    <provider-compile provider="ojb" destdir="${build.java-test}" />
  </target>

  <target name="test" depends="junit-check, clover-check, compile, test-compile" description="run tests"
          unless="skip.tests">
    <path id="providers.junit.cp">
      <path refid="junit.cp" />
      <path refid="providers.cp" />
    </path>
    <run-junit classpathref="providers.junit.cp"/>
  </target>

  <target name="compile" depends="common.compile">
    <copy file="${src.etc}/propertyset-default.xml" todir="${build.java}/META-INF"/>
    <provider-compile provider="ejb" />
    <provider-compile provider="ejb3" source="1.5"/>
    <provider-compile provider="hibernate" />
    <provider-compile provider="hibernate3" />
    <provider-compile provider="ofbiz" />
    <provider-compile provider="ojb" />
  </target>

  <target name="precompile" depends="ejbdoclet">
    <jalopy fileformat="unix" convention="src/etc/jalopy.xml" history="file" historymethod="adler32" loglevel="error"
            threads="2" classpathref="cp">
      <fileset dir="${src.java}">
        <include name="**/*.java"/>
      </fileset>
      <fileset dir="${src.test}">
        <include name="**/*.java"/>
      </fileset>
      <fileset dir="${providers}">
        <include name="**/*.java"/>
        <exclude name="ejb3/**/*.java"/>
      </fileset>
    </jalopy>
  </target>

  <target name="jar" depends="common.jar">
    <mkdir dir="${dist}"/>
    <provider-jar provider="ejb" manifest="${src.etc}/manifest-ejb.txt" />
    <provider-jar provider="ofbiz" />
    <provider-jar provider="hibernate" />
    <provider-jar provider="hibernate3" />
    <provider-jar provider="ejb3" />
    <provider-jar provider="ojb" />
  </target>
  
  <macrodef name="provider-compile">
    <attribute name="provider" />
    <attribute name="source" default="${compile.version}" />
    <attribute name="destdir" default="${providers}/@{provider}/build" />
    <sequential>
      <path id="@{provider}.cp">
        <path refid="cp" />
        <fileset dir="${providers}/@{provider}/lib">
          <include name="*.jar"/>
        </fileset>
        <pathelement location="${build.java}"/>
      </path>
      <compile srcdir="${providers}/@{provider}/src" destdir="@{destdir}" classpathref="@{provider}.cp" source="@{source}" target="@{source}"/>
    </sequential>
  </macrodef>
  
  <macrodef name="provider-jar">
    <attribute name="provider" />
    <attribute name="manifest" default="${jar.manifest}"/>
    <sequential>
      <jar basedir="${providers}/@{provider}/build" jarfile="${build}/${name}-@{provider}-${version}.jar" manifest="@{manifest}">
        <manifest>
          <attribute name="Implementation-Title" value="${fullname}-@{provider}"/>
          <attribute name="Implementation-Version" value="${version}"/>
          <attribute name="Implementation-Vendor" value="OpenSymphony"/>
        </manifest>        
      </jar>
    </sequential>
  </macrodef>
</project>
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.