ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 4303] New: - Problem using ant to build jar file
Date Sat, 20 Oct 2001 03:11:43 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4303>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4303

Problem using ant to build jar file

           Summary: Problem using ant to build jar file
           Product: Ant
           Version: 1.4
          Platform: PC
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Blocker
          Priority: Other
         Component: Core
        AssignedTo: ant-dev@jakarta.apache.org
        ReportedBy: Long.Thai@ericsson.ca
                CC: Long.Thai@ericsson.ca


I have downloaded the JBoss-2.4.1_Tomcat-3.2.3 and want to try how the EJB works 
by following their tutorial.
When I execute the ant target, it generates some errors so I decide to execute 
ant -v as you suggest in your homepage and it returns the following:

c:\jboss\examples\build>ant -v
4NT: C:\JAKARTA-ANT-1.4.1\BIN\ANT.BAT [76]  Unknown command "\..\bin\lcp.bat"
Ant version 1.3 compiled on May 11 2001

Buildfile: build.xml
Detected Java Version: 1.3
Detected OS: Windows 2000
parsing buildfile C:\jboss\examples\build\build.xml with URI = file:C:/jboss/exa
mples/build/build.xml
Project base dir set to: C:\jboss\examples
 [property] Loading Environment env.
Build sequence for target `main' is [validate-servlet, validate-jboss, fail_if_n
ot_valid, init, main]
Complete build sequence is [validate-servlet, validate-jboss, fail_if_not_valid,
 init, main, cmp-cd-upload, cmp-cd-remove, cmp-cd-list, jms-hello-topic, intro-i
nterest-client, clean, dist, jms-destroy-dest25, jms-hello-publisher25, jms-dest
roy-dest, jms-hello-topic-durable, howto-appletclient-jar, intro-interest-deploy
, intro-interest-jar, howto-javamail-deploy-ear, howto-appletclient-compile, jms
-hello-queue-bmt, howto-appletclient-client, jms-create-dest, jms-topic-hello24,
 jms-hello-sender, jms-topic-hello22, intro-interest-compile, jms-hello-listener
, cmp-cd-compile, howto-javamail-compile, jms-hello-receiver, howto-appletclient
-deploy, howto-javamail-client, jms-hello-topic-fullconf, jms-hello-receiver25,
jms-manual-jndi, jms-hello-sender25, jms-compile, howto-javamail-deploy, jms-hel
lo-queue, jms-hello-subscriber25, jms-hello-subscriber, cmp-cd-dist, jms-create-
dest25, intro-interest-ear, howto-javamail-jar, jms-hello-publisher, cmp-jaws-co
mpile, jms-build]

validate-servlet:
[available] Unable to find file C:\JBoss-2.4.1_Tomcat-3.2.3\jboss\..\jetty\lib\j
avax.servlet.jar to set property servlet.jar
[available] Unable to find file C:\JBoss-2.4.1_Tomcat-3.2.3\jboss\..\catalina\co
mmon\lib\servlet.jar to set property servlet.jar
 [property] Override ignored for servlet.jar

BUILD FAILED

C:\jboss\examples\build\build.xml:36: Could not create task of type: path. Commo
n solutions are to use taskdef to declare your task, or, if this is an optional
task, to put the optional.jar in the lib directory of your ant installation (ANT
_HOME).

Total time: 1 second

I attach also the build.xml here for your review:

<?xml version="1.0" encoding="UTF-8" ?>
<!-- 
	Ant build file for the documentation tutorial code
	Writer of a chapter with an example have to include a foroward
	to their build file.  This latest build file suppose arguments 
	sets here :
		src.dir : Directory where the source are : manual\src\examples
		build.dir : Base directory where to store generated files 
(class/ejb/war/...)
		classpath : Classpath used to make any compilation (set up here 
by verifing 
			which version of JBoss is used.
	
  -->

<project name="CMP" default="main" basedir="../">

    <property environment="env" />
    <!-- Override with your JBoss server dist location if the JBOSS_DIST env var 
is not set -->
    <property name="jboss.dist" value="${env.JBOSS_DIST}"/>

    <property name="src.dir" value="${basedir}"/>
    <property name="src.resources" value="${basedir}/resources"/>
    <property name="build.dir" value="${basedir}/build-examples"/>
    <property name="dist.dir" value="${basedir}/../../dist-examples"/>

    <target name="validate-servlet">
        <!-- Override with your web server servlet jar location. 
             The default assumes that JBOSS_DIST points to a 
             JBoss/Tomcat bundle distribution
         -->
        <available property="servlet.jar" 
value="${env.JBOSS_DIST}/../tomcat/lib/servlet.jar" 
file="${env.JBOSS_DIST}/../tomcat/lib/servlet.jar"/>
        <available property="servlet.jar" 
value="${env.JBOSS_DIST}/../jetty/lib/javax.servlet.jar" 
file="${env.JBOSS_DIST}/../jetty/lib/javax.servlet.jar"/>
        <available property="servlet.jar" 
value="${env.JBOSS_DIST}/../catalina/common/lib/servlet.jar" 
file="${env.JBOSS_DIST}/../catalina/common/lib/servlet.jar"/>
        <available property="servlet.jar" 
value="${env.JBOSS_DIST}/../catalina/common/lib/servlet.jar" 
file="${env.TOMCAT_HOME}/lib/servlet.jar"/>
        <property name="servlet.jar" value="COULD_NOT_FIND_SERVLET_JAR"/>

        <path id="base.path_22">
            <pathelement location="${jboss.dist}/client/ejb.jar"/>
            <pathelement location="${jboss.dist}/client/jaas.jar"/>
            <pathelement location="${jboss.dist}/client/jbosssx-client.jar"/>
            <pathelement location="${jboss.dist}/client/jboss-client.jar"/>
            <pathelement location="${jboss.dist}/client/jnp-client.jar"/>
            <pathelement location="${servlet.jar}"/>
        </path>
        <path id="base.path_24">
            <pathelement location="${jboss.dist}/client/jboss-j2ee.jar"/>
            <pathelement location="${jboss.dist}/client/jaas.jar"/>
            <pathelement location="${jboss.dist}/client/jbosssx-client.jar"/>
            <pathelement location="${jboss.dist}/client/jboss-client.jar"/>
            <pathelement location="${jboss.dist}/client/jnp-client.jar"/>
            <pathelement location="${servlet.jar}"/>
        </path>
    </target>

    <target name="validate-jboss" depends="validate-servlet">
        <available property="classpath_id" value="base.path_22" 
file="${jboss.dist}/client/ejb.jar" />
        <available property="classpath_id" value="base.path_24" 
file="${jboss.dist}/client/jboss-j2ee.jar" />

    </target>
    
    <target name="fail_if_not_valid" unless="classpath_id">
        <fail message="jboss.dist=${jboss.dist} is not a valid JBOSS_DIST 
directory. If using a bundled JBoss version set JBOSS_DIST to the jboss/ 
subdir."/>
    </target>
    
    <target name="init" depends="validate-jboss,fail_if_not_valid">
        <property name="classpath" refid="${classpath_id}" />
        <echo message="Using JBoss directory=${jboss.dist}" />
        <echo message="Using base classpath=${classpath}" />
        <echo message="Using Source directory=${src.dir}" />
        <echo message="Using Build directory=${build.dir}" />
    </target>
    
    <!-- Clean build and dist -->
    <target name="clean" depends="init">
    	<delete dir="${build.dir}"/>
    	<delete dir="${dist.dir}"/>
    </target>

	<!-- No default Target -->
    <target name="main" depends="init">
		<echo message="Specify which target you want to run. Example: 
build cmp-cd-list" />
    </target>
    
	<!-- Target to create files to store on the Web site -->
	
    <target name="dist" depends="clean">
    	<mkdir dir="${dist.dir}"/>
    	<!-- Bundle all the sources and build script in one file -->
    	<zip zipfile="${dist.dir}/documentation-example.zip" 
basedir="${src.dir}/../"
          includes="examples/**" />
      <tar tarfile="${dist.dir}/documentation-example.tar" 
basedir="${src.dir}/../"
          includes="examples/**" />
      <gzip src="${dist.dir}/documentation-example.tar" 
zipfile="${dist.dir}/documentation-example.tar.gz" />
		<!-- Add Chapter specific files here 
		<antcall target="cmp-cd-dist" />
		-->
    </target>

    <!-- 
*************************************************************************** -->
    <!-- Chapter 1 - First Steps -->
    <target name="intro-interest-compile" depends="init">
        <ant antfile="org/jboss/docs/interest/build.xml" target="compile" />
    </target>

    <target name="intro-interest-jar" depends="init">
        <ant antfile="org/jboss/docs/interest/build.xml" target="ejb-jar" />
    </target>

    <target name="intro-interest-ear" depends="init">
        <ant antfile="org/jboss/docs/interest/build.xml" target="ear" />
    </target>

    <target name="intro-interest-deploy" depends="init">
        <ant antfile="org/jboss/docs/interest/build.xml" target="deploy-ejb-jar" 
/>
    </target>

    <target name="intro-interest-client" depends="init">
        <ant antfile="org/jboss/docs/interest/build.xml" 
target="interest-client" />
    </target>


    <!-- 
*************************************************************************** -->
    <!-- Chapter 4 - CMP -->
	
    <target name="cmp-cd-compile" depends="init">
        <ant antfile="org/jboss/docs/cmp/cd/build/build-cmp-cd-compile.xml" 
target="main" />
    </target>
    
    <target name="cmp-cd-dist" depends="cmp-cd-compile">
    	<!-- Nothing special here -->
    </target>
    
    <target name="cmp-cd-list" depends="init">
        <ant antfile="org/jboss/docs/cmp/cd/build/build-client.xml" 
target="main">
            <property name="client" value="List"/>
        </ant>
    </target>
    
    <target name="cmp-cd-upload" depends="init">
        <ant antfile="org/jboss/docs/cmp/cd/build/build-client.xml" 
target="main">
            <property name="client" value="Upload"/>
        </ant>
    </target>

    <target name="cmp-cd-remove" depends="init">
        <ant antfile="org/jboss/docs/cmp/cd/build/build-client.xml" 
target="main">
            <property name="client" value="Remove"/>
        </ant>
    </target>
    
    <!-- 
*************************************************************************** -->
	<!-- Chapter 5 - JAWS -->
	
    <target name="cmp-jaws-compile" depends="init">
        <ant antfile="org/jboss/docs/cmp/jaws/build/build-cmp-jaws-compile.xml" 
target="main" />
    </target>


        <!-- 
*************************************************************************** -->
	<!-- Chapter 7 - JMS -->
	
    <target name="jms-compile" depends="init">
        <ant antfile="org/jboss/docs/jms/build.xml" target="compile" />
    </target>

    <target name="jms-build" depends="init">
        <ant antfile="org/jboss/docs/jms/build.xml" target="build" />
    </target>

     <target name="jms-hello-publisher" depends="init">
        <ant antfile="org/jboss/docs/jms/build.xml" target="jms-hello-publisher" 
/>
    </target>

   <target name="jms-hello-subscriber" depends="init">
        <ant antfile="org/jboss/docs/jms/build.xml" 
target="jms-hello-subscriber" />
    </target>

    <target name="jms-hello-publisher25" depends="init">
        <ant antfile="org/jboss/docs/jms/build.xml" 
target="jms-hello-publisher25" />
    </target>

   <target name="jms-hello-subscriber25" depends="init">
        <ant antfile="org/jboss/docs/jms/build.xml" 
target="jms-hello-subscriber25" />
    </target>

     <target name="jms-hello-sender" depends="init">
        <ant antfile="org/jboss/docs/jms/build.xml" target="jms-hello-sender" />
    </target>

   <target name="jms-hello-receiver" depends="init">
        <ant antfile="org/jboss/docs/jms/build.xml" target="jms-hello-receiver" 
/>
    </target>

    <target name="jms-hello-sender25" depends="init">
        <ant antfile="org/jboss/docs/jms/build.xml" target="jms-hello-sender25" 
/>
    </target>

   <target name="jms-hello-receiver25" depends="init">
        <ant antfile="org/jboss/docs/jms/build.xml" 
target="jms-hello-receiver25" />
    </target>

   <target name="jms-manual-jndi" depends="init">
        <ant antfile="org/jboss/docs/jms/build.xml" target="jms-manual-jndi" />
    </target>

      <target name="jms-create-dest" depends="init">
        <ant antfile="org/jboss/docs/jms/build.xml" target="jms-create-dest" />
    </target>

    <target name="jms-destroy-dest" depends="init">
        <ant antfile="org/jboss/docs/jms/build.xml" target="jms-destroy-dest" />
    </target>


      <target name="jms-create-dest25" depends="init">
        <ant antfile="org/jboss/docs/jms/build.xml" target="jms-create-dest25" 
/>
    </target>

    <target name="jms-destroy-dest25" depends="init">
        <ant antfile="org/jboss/docs/jms/build.xml" target="jms-destroy-dest25" 
/>
    </target>

     <target name="jms-hello-topic" depends="init">
        <ant antfile="org/jboss/docs/jms/build.xml" target="jms-hello-topic" />
    </target>

     <target name="jms-hello-topic-durable" depends="init">
        <ant antfile="org/jboss/docs/jms/build.xml" 
target="jms-hello-topic-durable" />
    </target>

     <target name="jms-hello-topic-fullconf" depends="init">
        <ant antfile="org/jboss/docs/jms/build.xml" 
target="jms-hello-topic-fullconf" />
     </target>
     <target name="jms-hello-queue" depends="init">
        <ant antfile="org/jboss/docs/jms/build.xml" target="jms-hello-queue" />
    </target>

    <target name="jms-hello-queue-bmt" depends="init">
        <ant antfile="org/jboss/docs/jms/build.xml" target="jms-hello-queue-bmt" 
/>
    </target>

   <target name="jms-hello-listener" depends="init">
        <ant antfile="org/jboss/docs/jms/build.xml" target="jms-hello-listener" 
/>
    </target>

   <target name="jms-topic-hello24" depends="init">
        <ant antfile="org/jboss/docs/jms/build.xml" target="jms-topic-hello24" 
/>
    </target>
   <target name="jms-topic-hello22" depends="init">
        <ant antfile="org/jboss/docs/jms/build.xml" target="jms-topic-hello22" 
/>
    </target>

 <!-- 
*************************************************************************** -->
	<!-- Chapter  JavaMail -->
	
    <target name="howto-javamail-compile" depends="init">
        <ant antfile="org/jboss/docs/javamail/build.xml" target="compile" />
    </target>

    <target name="howto-javamail-jar" depends="init">
        <ant antfile="org/jboss/docs/javamail/build.xml" target="ejb-jar" />
    </target>

    <target name="howto-javamail-deploy" depends="init">
        <ant antfile="org/jboss/docs/javamail/build.xml" target="deploy-ejb-jar" 
/>
    </target>

    <target name="howto-javamail-deploy-ear" depends="init">
        <ant antfile="org/jboss/docs/javamail/build.xml" target="deploy-ear" />
    </target>

    <target name="howto-javamail-client" depends="init">
        <ant antfile="org/jboss/docs/javamail/build.xml" 
target="javamail-client" />
    </target>

	<!-- Chapter  Applet Client -->

    <target name="howto-appletclient-compile" depends="init">
        <ant antfile="org/jboss/docs/appletclient/build.xml" target="compile" />
    </target>

    <target name="howto-appletclient-jar" depends="init">
        <ant antfile="org/jboss/docs/appletclient/build.xml" target="ejb-jar" />
    </target>

    <target name="howto-appletclient-deploy" depends="init">
        <ant antfile="org/jboss/docs/appletclient/build.xml" 
target="deploy-ejb-jar" />
    </target>

    <target name="howto-appletclient-client" depends="init">
        <ant antfile="org/jboss/docs/appletclient/build.xml" 
target="appletclient-client" />
    </target>

	<!-- Add a new target here -->
	
</project>

Mime
View raw message