You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by co...@apache.org on 2002/11/12 23:53:41 UTC

cvs commit: jakarta-commons/modeler build.xml

costin      2002/11/12 14:53:41

  Modified:    modeler  build.xml
  Log:
  Few changes in the build targets to allow builds in a separate dir.
  The temp directory and the target dir can be specified, and the
  result will not create any temp file in the local dir.
  ( this allows much faster compilation and is more IDE friendly ).
  
  Added a target to test and demo the ant tasks. Tomcat5.0 and mx4j-tools
  are required. Right now tomcat won't work - there are still changes that
  need to be commited in tomcat. ( problaby the whole example should
  move in tomcat - but I don't have a better one )
  
  Revision  Changes    Path
  1.4       +57 -9     jakarta-commons/modeler/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/modeler/build.xml,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- build.xml	1 May 2002 00:33:41 -0000	1.3
  +++ build.xml	12 Nov 2002 22:53:41 -0000	1.4
  @@ -1,4 +1,4 @@
  -<project name="Modeler" default="compile" basedir=".">
  +<project name="Modeler" default="jar" basedir=".">
   
   
   <!--
  @@ -71,6 +71,7 @@
     <!-- The base directory for unit test sources -->
     <property name="test.home"               value="src/test"/>
   
  +  <property name="commons-modeler.jar" value="${dist.home}/commons-${component.name}.jar"/>
   
   <!-- ========== Compiler Defaults ========================================= -->
   
  @@ -152,8 +153,7 @@
     </target>
   
   
  -  <target name="compile" depends="static"
  -   description="Compile shareable components">
  +  <target name="compile-only" >
       <javac  srcdir="${source.home}"
              destdir="${build.home}/classes"
                debug="${compile.debug}"
  @@ -168,6 +168,8 @@
       </copy>
     </target>
   
  +  <target name="compile" depends="static,compile-only"
  +   description="Compile shareable components" />
   
     <target name="clean"
      description="Clean build and distribution directories">
  @@ -197,9 +199,17 @@
              classpathref="compile.classpath" />
     </target>
   
  +  <target name="jar" depends="compile-only" > 
  +    <jar    jarfile="${commons-modeler.jar}"
  +            basedir="${build.home}/classes"
  +           manifest="src/conf/MANIFEST.MF">
  +       <include name="org/apache/commons/modeler/**" />
  +       <include name="META-INF/ant.properties" />
  +    </jar>
  +  </target>
   
  -  <target name="dist" depends="compile,javadoc"
  -   description="Create binary distribution">
  +  <target name="dist" depends="compile,javadoc,jar"
  +    description="Create binary distribution">
       <mkdir      dir="${dist.home}"/>
       <copy      file="../LICENSE"
                 todir="${dist.home}"/>
  @@ -210,9 +220,6 @@
       <mkdir      dir="${build.home}/classes/META-INF"/>
       <copy      file="../LICENSE"
                tofile="${build.home}/classes/META-INF/LICENSE.txt"/>
  -    <jar    jarfile="${dist.home}/commons-${component.name}.jar"
  -            basedir="${build.home}/classes"
  -           manifest="${build.home}/conf/MANIFEST.MF"/>
     </target>
   
   
  @@ -249,6 +256,47 @@
       </java>
     </target>
   
  +  <target name="ant.test" depends="init">
  +    <property name="tomcat.home" location="../../jakarta-tomcat-5/build" />
  +
  +    <path id="jmx.test.classpath">
  +      <pathelement location="target/classes" />
  +      <fileset dir="${tomcat.home}/common/lib" includes="*.jar"/>
  +      <fileset dir="${tomcat.home}/server/lib" includes="*.jar"/>
  +      <pathelement location="${commons-logging.jar}" />
  +      <pathelement location="${jmx.jar}" />
  +      <pathelement location="${ide.classes}" />
  +    </path>
  +
  +    <taskdef resource="META-INF/ant.properties"
  +             classpathref="jmx.test.classpath" />
  +
  +    <MLET code="org.apache.commons.modeler.BaseModelMBean"
  +          name="catalina: type=server" >
  +       <arg value="org.apache.catalina.startup.Catalina" />
  +    </MLET>
  +
  +    <MLET code="mx4j.adaptor.http.HttpAdaptor"
  +          name="Http:name=HttpAdaptor" />
  +    <MLET code="mx4j.adaptor.http.XSLTProcessor"
  +          name="Http:name=XSLTProcessor"/>
  +
  +    <jmxSet name="Http:name=HttpAdaptor"
  +            attribute="Port"
  +            type="int"
  +            value="9999" />
  +
  +    <jmxSet name="Http:name=HttpAdaptor"
  +            attribute="ProcessorName"
  +            type="ObjectName"
  +            value="Http:name=XSLTProcessor" />
  +
  +    <jmx name="Http:name=HttpAdaptor"
  +         method="start" />
  +
  +    <sleep hours="1"/>
  +        
  +  </target>
   
   <!-- ========== Demonstration Targets ===================================== -->
   
  
  
  

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>