Ant (build.xml)
hi,
I have a couple of question's with regards to ant.
1) I ran build script (through IDE) with a target "all" which compiles all classes and creates the Javadoc. While running each target i.e., "compile" and "doc" the messages are showing up properly. But after completing the target tasks the last message I get is "nothing to build".
When I run the ant from the command line I do not get this message. why is this so?
2)
can the ant build script create the deployment descriptor file that's created by the IDE?
thanks for your time.
regards.
It sounds like you are using JDeveloper 10g Preview. The "Nothing to Build" message was a bug in the preview release, and has already been fixed for the final release.
We are planning to add the ability to generate Ant tasks for deployment descriptors in a future release.
-Matt
Similar Messages
-
Revision: 3680
Author: [email protected]
Date: 2008-10-16 07:58:21 -0700 (Thu, 16 Oct 2008)
Log Message:
Modifying ant build.xml to allow for a local.properties for individual developer build config. Also moving ja_JP locale to the other.locales target (this is called during build machine packaging and isn't needed by dev by default).
QE: No
Doc: No
Checkintests: Pass
Reviewer: Discussed with Jim
Modified Paths:
flex/sdk/trunk/build.xml
flex/sdk/trunk/frameworks/projects/airframework/build.xml
flex/sdk/trunk/frameworks/projects/framework/build.xml
flex/sdk/trunk/frameworks/projects/rpc/build.xmlI tried
ant deployTestSuites
this works. If i do that with the wrong domain (dep_cotrol vs dep_me) name it fails with
ORABPEL-02052Cannot lookup BPEL domain.The BPEL domain "dep_cotrol" cannot be found; the domain may not have initialized properly.Please verify that the BPEL domain loader has a valid set of initialization properties in the application properties file.
So i think my config is ok. There is a bug in this ant bpelTest which ignores the domain? -
Help with flex4unit ant build.xml: Socket timeout waiting for flexunit report
I'm having trouble setting up ant to build and test my project locally and I'm not sure what the next step is.
Info:
Running on XP/Cygwin.
All of the files that FlexUnit4 references when used in Flash Builder are in my '${basename}/libs' folder (eg FlexUnit4_1.0.swc).
I've placed the flexunit4 task in my ant/libs folder.
I'm getting two errors...
I don't think I've set up the 'socket' stuff right for the tests. It just sits and waits then dies...
[flexunit] Waiting for client connection ...
(about a minute later)
[flexunit] Stopping server ...
[flexunit] End of test data reached, sending acknowledgement to player ...
[flexunit] Closing client connection ...
[flexunit] Closing server on port [1024] ...
BUILD FAILED
java.util.concurrent.ExecutionException: Socket timeout waiting for flexunit report
Plus this is the error I get from the flash player:
ReferenceError: Error #1065: Variable mx.skins.spark::BorderSkin is not defined.
I don't know why it's complaining about Borderskin as I think I have included all the flex4 libs I could find. I suspect this second error is causing the first error?
Any help appreciated. I think I'm just setting it up all wrong.
Screencap of errors:
http://twitpic.com/l7ay8
build.xml:
http://gist.github.com/20804Finally got everything working using the files from the CI Example which what i probably should have done in the first place.
So a rough guide for anyone just starting out with this:
Download the Flex 4 'workspace' from the digital primates hudson server . This appears to contain flexunit library and examples in various stages of development.
I used Flex Builder 4 Beta 2 to set up my Test Suite and Test Cases.
I then loaded the libs folder from:
workspace.zip\workspace\project\FlexUnit4SampleCIProject
into my flex project's libs folder:
this includes:
FlexUnit4.swc
FlexUnit4CIListener.swc
flexUnit4UIRunner.swc
flexTasks.jar
flexUnitTasks.jar
I didn't need to remove the FlexUnit4 stuff that is 'referenced' automatically by flash builder when you start adding flexunit4 tests/suites.
Then I used a modified version of the TestRunner.mxml found in:
workspace.zip\workspace\project\FlexUnit4SampleCIProject\src\test\flex
The lines to pay attention to are the ones that look like:
static public function currentRunTestSuite():Array {
var testsToRun:Array = new Array();
testsToRun.push(packagename.TestSuiteName);
testsToRun.push(packagename.TestClassName);
return testsToRun;
Just make sure you update this list to include all of the test suites &/or individual tests you want to run.
I made this a static function and modified the code in the "FlexUnitApplication.mxml" file to use this function so i'd only need to update one list of suites/tests.
FlexUnitApplication.mxml is generated automatically when you run FlexUnit4 tests in the Flash Builder 4 Beta 2 IDE.
This is the build.xml file I'm using in the project:
http://gist.github.com/208211
Change the name of the project from "Flare" to whatever and adjust the other path settings where required (though you might want to write this from scratch at least once so you understand roughly what is going on).
The Debug Flash Player must be installed on the server otherwise you'll get a:
java.util.concurrent.ExecutionException: Socket timeout waiting for flexunit report
...while it waits for the non-existant debugger to attach. (This is obvious but I did forget and was a bit bewildered for a moment)
Need to also ensure the environment variable:FLEX_HOME is set to the location you installed the flex sdk...by editing your .bashrc setting the environment variable the in the Hudson Configuration.
You'll need to point Hudson at your ant installation and your jdk installation. If you downloaded he sdk, be aware you might need to point it to the jdk folder inside the place you installed the sdk.
And I think that's all the problems I had. Hope it's useful to someone... if anyone who actually knows what they are doing can point out any potential issues/better ways of doing things, feel free to comment.
Thanks to Brian (legrosb) and Mike (mlabriola) for their assistance! -
Help with Flex Ant build.xml error
So I've started on a new project and I'm new to Flex. A lot of learning curve here. Anyway, I'm trying to deploy a project that uses flex and is built with Ant. We've moving up from a version of Flex 2 to Flex 3. The build file works fine in the Flex 2 app but for some reason does not seem to be working with Flex 3. I'm hoping someone can give me some insight on what might be wrong or where to start.
The error is Command not found: compc
The part of the build file it has a problem with is:
<compc include-classes="${classes}"
ouput="${flex.dist.dir}/${flex.app.name}.swc"
keep-generated-actionscript="false"
headless-server="${headless.server}"
incremental="true">
<load_config filename="${FLEX_HOME}/frameworks/flex-config.xml" />
<source-path path-element="${FLEX_HOME}/frameworks" />
<source-path path-element="${flex.app.root}" />
<compiler.library-path dir="${FLEX_HOME}/frameworks" append="true">
<include name="libs" />
<include name="../bundles/{local}" />
</compiler.library-path>
<compiler.library-path dir="${flex.app.root}" appent="true">
<include name="libs" />
</compiler.library-path>
</compc>
Any help at all would be greatly appreciated, thank you.Sorry, I meant to address that. Yes, since we've moved up to the Flex 3 sdk, we are pointing at a new directory. The old directory was flex_sdk and the new directory is flex_sdk_340.
FLEX_HOME is being set in the build.properties file for local building and then overidden in the build.xml file with this code:
<target name="build">
<available property="FLEX_HOME" value="/apps/flex_sdk_340" file="/apps/flex_sdk_340" />
<echo>FLEX_HOME = ${FLEX_HOME}</echo>
<antcall target="compile" />
</target>
I did notice a warning about not using the available property, so I removed it and just changed what FLEX_HOME was set to in the build.properties file to the server directory. Would mess up local building but regardless it didn't matter because it had no effect on the error being generated. I alos looked a little into the file property of the available tag trying to figure out if that was somehow an issue but I wasn't able to come to any conclusion.
Before the program errors out, it does displayt he echo statement and the value of FLEX_HOME appears to be correct in that it does show /apps/flex_sdk_340.
Thank you so much for your continued help. This is truly frustrating because nothing but a directory name has really changed and yet it stopped working. I can't find any information anywhere on what could be wrong and this is really my last resort. -
Converting build.cmd to Ant build.xml file
Can anyone help me convert the attached build command file (windows) to a
build.xml file for Ant?
Thanks,
Matt
[build.txt]
Hi Kevin,
You can get lots of help from the following links
http://help.sap.com/saphelp_nw04/helpdata/en/e1/8e51341a06084de10000009b38f83b/frameset.htm
SAP XI - Where to Find Information
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/xi/sap xi - where to find information.pdf
Following is the link for 'how to guides', A step by step guide to create scenarios:
https://websmp201.sap-ag.de/nw-howtoguides
All the information you need in XI :
http://help.sap.com/saphelp_nw04/helpdata/en/0f/80243b4a66ae0ce10000000a11402f/frameset.htm
you can also go through the url for Elearning :
https://www.sdn.sap.com/sdn/elearning.sdn
To understand the architecture of XI, Please go through this link,
http://help.sap.com/saphelp_nw04/helpdata/en/14/80243b4a66ae0ce10000000a11402f/frameset.htm
XI is all about configuration of Adapters, to learn more please go through this link:
http://help.sap.com/saphelp_nw04/helpdata/en/0d/5ab43b274a960de10000000a114084/frameset.htm
One of the most powerful feature of XI, Business Process Management:
http://help.sap.com/saphelp_nw04/helpdata/en/3c/831620a4f1044dba38b370f77835cc/frameset.htm
Once you go through these links and are a bit aware what all XI objects do, you can try a simple "File to File Scenario" which would help you to understand XI objects in a much better manner.
For help on this scenario go through this blog it is in two parts thus i am providing both links below:
/people/venkat.donela/blog/2005/03/02/introduction-to-simplefile-xi-filescenario-and-complete-walk-through-for-starterspart1
/people/venkat.donela/blog/2005/03/03/introduction-to-simple-file-xi-filescenario-and-complete-walk-through-for-starterspart2
Re: new to netweaver
Re: how use XSLT maping in XI
Re: IDOC - XI - FILE scenario
Regards
Vishnu -
Can we rename Ant build.xml?
Hi
Can we rename ant default build.xml name to any other name like myapp_build.xml?
I know this is not right forum;I alreday googled for this.But no luck.
Please help me.
Thanks
AnilYes - but then you will need to specify the -filename option on the ant command line.
-
My build.xml must have problems, because the jar size is way smaller than the JBuilder equivalent. I think it is not including the 3rd party Jars that I want it to include.
Additionally, it builds, but when I execute it I get strange errors indicating it can't find certain system classfiles.
Here is the build file:
<project name="JAutoTest" default="dist" basedir=".">
<!-- set global properties for this build -->
<property name="src" value="src"/>
<property name="build" value="build"/>
<property name="test" value="jAutoTool"/>
<property name="dist" value="dist"/>
<property name="doc" value="doc"/>
<property name="Name" value="JAutoTest"/>
<property name="packages" value="jAutoTool.*"/>
<path id="project.class.path">
<pathelement location="lib/"/>
<pathelement location="jAutoTool/"/>
<pathelement path="${java.class.path}/"/>
</path>
<target name="check_for_optional_packages">
<available property="java.reflection" classname="java.lang.reflect"/>
</target>
<target name="prepare">
<!-- Create the time stamp -->
<tstamp/>
<!-- Create the build directory structure used by compile -->
<mkdir dir="${build}"/>
<mkdir dir="${test}"/>
<mkdir dir="${doc}"/>
</target>
<target name="compile" depends="prepare,check_for_optional_packages">
<!-- Compile the java code from ${src} into ${build} -->
<javac srcdir="${src}" destdir="${build}" debug="on" deprecation="off" optimize="on">
<classpath refid="project.class.path"/>
</javac>
</target>
<target name="genDoc" depends="compile">
<javadoc packagenames="${packages}" sourcepath="${basedir}/${src}" destdir="${doc}" author="true" version="true" windowtitle="${Name} API" doctitle="${Name}" bottom="Copyright � 2001 Motorola, Inc. All Rights Reserved."/>
</target>
<target name="dist" depends="compile">
<!-- Create the ${dist}/lib directory -->
<mkdir dir="${dist}/lib"/>
<!-- Put everything in ${build} into the JAutoTest-${DSTAMP}.jar file -->
<jar jarfile="${dist}/lib/JAutoTest-${DSTAMP}.jar" basedir="${build}"
manifest="${dist}/META-INF/MANIFEST.MF">
<zipgroupfileset dir="lib" includes="*.jar"/>
</jar>
</target>
<target name="clean">
<!-- Delete the ${build} and ${dist} directory trees -->
<delete dir="${build}"/>
<delete dir="${dist}"/>
</target>
</project>
I have the other jars at /lib.
The error I am getting is:
D:\testjTool\dist\lib>java -jar *.jar
Uncaught error fetching image:
java.lang.NullPointerException
at sun.awt.image.URLImageSource.getConnection(URLImageSource.java:102)
at sun.awt.image.URLImageSource.getDecoder(URLImageSource.java:111)
at sun.awt.image.InputStreamImageSource.doFetch(InputStreamImageSource.j
ava:251)
at sun.awt.image.ImageFetcher.fetchloop(ImageFetcher.java:217)
at sun.awt.image.ImageFetcher.run(ImageFetcher.java:185)
Thanks.The error I am getting is:
D:\testjTool\dist\lib>java -jar *.jar
Uncaught error fetching image:
java.lang.NullPointerException
at sun.awt.image.URLImageSource.getConnection(URLImageSource.java:102)
at sun.awt.image.URLImageSource.getDecoder(URLImageSource.java:111)
at sun.awt.image.InputStreamImageSource.doFetch(InputStreamImageSource.j
ava:251)
at sun.awt.image.ImageFetcher.fetchloop(ImageFetcher.java:217)
at sun.awt.image.ImageFetcher.run(ImageFetcher.java:185)
Classpath is:
D:\testjTool>set CLASSPATH=\testjTool\build;c:\JBuilder4\lib\HTTPClient.jar;c:\J
Builder4\lib\htmlparser.jar;c:\JBuilder4\lib\classes12;c:\JBuilder4\lib\classes12\javax.jar;c:\JBuilder4\lib\dbswing.jar;c:\JBuilder4\lib\jbcl.jar;.;
The ant build works, but the executable is 1/2 the size of the
JBuilder one. -
Starting tomcat 5.5 in Ant build.xml
Hi everyone,
I have been trying to get my build.xml file to start and stop Ant but am finding it difficult..
this is a snippet of the code i am using
<target name="tomcatOFF">
<echo>Turning Off Tomcat [http://www.jspbook.com]</echo>
<exec executable="bash" os="microsoft">
<arg value="c:\program files\apache software foundation\bin\stop.bat"/>
</exec>
</target>
<target name="tomcatOn">
<echo>Turning ON Tomcat [http://www.jspbook.com]</echo>
<exec executable="bash" os="microsoft">
<arg value="c:\program files\apache software foundation\bin\start.bat"/>
</exec>
</target>
My computer is running on microsoft server 2003. I have two batch files that work in ms dos when run but wont work in ant as i am not used to the syntax.
But when i run the code nothing happens. Has anyone got any ideas of how to implement the task of starting and stopping the service
many thanks
DaleHello,
I would recommend you to post your question to the OA Framework forum at:
OA Framework
You'll probably get more help about OAF from that forum.
Good luck.
Steff -
Building a jar in an ant build.xml file
Hi,
i previously used netbeans to create a jar that you could doubleclick to have it automatically started (win 2000).
The jar also included other jars like log4j, jdom and so.
In Netbeans, i first made my project and those jars available via the filesystem. Then i just made a new jar, added my project and the startpoints of the other jars. For instance for the jdom.jar, i selected the org and everything beneath.
Then i generated a standard manifest file and added this line:
Main-Class: <package>/<mainclass>
This worked ok fine.
Now, for my question: i'm trying out ant and want to achieve the same as above. Building my project is not a problem. I specified the dependies on other jars like this:
<target name="compile" depends="init" description="compile">
<!-- Compile the java code from ${src} into ${build} -->
<javac srcdir="${src}" destdir="${build}">
<classpath>
<pathelement location="lib/jdom.jar"/>
<pathelement location="lib/log4j-1.2.7.jar"/>
</classpath>
</javac>
</target>Compiling doesn't produce an error.
However i can't seem to figure out how to build a jar where the root of each jar is included in the content of my own jar so i don't have to distribute the jars seperately.
This is what i had so far for my jar:
<target name="dist" depends="compile" description="generate" >
<!-- Create the distribution directory -->
<mkdir dir="${dist}/lib"/>
<!-- Put everything in ${build} into customer-${DSTAMP}.jar file -->
<jar jarfile="${dist}/lib/customer-${DSTAMP}.jar"
basedir="${build}" manifest="${conf}/manifest.mf"/>
</target>My manifest file:
Manifest-Version: 1.0
Main-Class: customer/clientAny idea of how to add the content of another jar to my own jar?
ThanksHhhm. stupid me, i found a sollution to this and it was on this very forum!
This is the relevant thread:
http://forum.java.sun.com/thread.jsp?forum=31&thread=281090 -
JDev 9.0.3.5 Ant build.xml generation for EAR file
Hi. I'm currently using JDeveloper 9.0.3.5, so that I can use the OA Extension. Is it possible to generate an ant file which can be used to build an EAR file for deployment of my application? If so, how do I do it?
If this cannot be done with 9.0.3.5, can it be done with a later version? If so, is it possible to import the generated EAR file into that later version and then generate the ant script to build and later deploy the EAR file from its components?
If neither method above works for creating the ant script that can build the EAR file, is there a sample ant file which I can then modify to do this?
Thanks!Hello,
I would recommend you to post your question to the OA Framework forum at:
OA Framework
You'll probably get more help about OAF from that forum.
Good luck.
Steff -
Need build.xml to create Ear file using Ant in jdeveloper 11g??
Hi all,
I think Jdeveloper use ANT to create Ear file and how to get build.xml from Jdeveloper.
1) I have created ADF Fusion web Application having separte Model and View Controller.
2) Now when I select View Controller project and then i create New ant-> Build.xml i get the required build.xml which can be used to create war file for my View Controller project.
3) Similarly when I select Model project and then i create New ant-> Build.xml i get the required build.xml which can be used to create Jarfile for my Model project.
4) If I select my application and then i click deploy... I'm able to create my ear file having both war file for View Controller and Jar File for Model.
5) But I dont know how to get built.xml file which will create ear file having both View Controller and Model in it.
Thanks a lot....However note the generated Ant script includes unnecessary targets. See the following blog post: http://one-size-doesnt-fit-all.blogspot.com/2010/11/using-ojdeploy-and-ant-for-creating-adf.html
CM. -
Build.xml classpath ref to be used in another build XML file
Hi,
I have ant build.xml with a target as
<target name="build_project">
<ant antfile="C:/projects/antbuild/build.xml" inheritAll="true">
<target name="clean" />
</ant>
</target>
in report1.xml.
This build.xml inturn have the classpath defined in it with the JARS added to the classpath.
In the report2.xml,
Can I use the classpathref in build.xml which is defined in report2.xml? Where report2.xml is imported in report1.xml as
<import file="report2.xml" />
If I can do so I don't have to create duplicate class path ref again adding all the JARS in report2.xml?
Please clarify.
Thanks.I've used quite a bit of ANT in the past, but I don't really know what to answer to your question that is in any way helpful to you. I remember that ANT has some form of build file inheritance built in, I've played around with it in years ago to try and crank out somewhat standardized build files with reusable elements. What I can recall is that I had to read a book on advanced ANT usage to be able to work it out, the online manual wasn't nearly enough.
-
Compilation problem in build.xml
Hi,
This is my build.xml
<?xml version="1.0"?>
<project name="TestApp" default="compile">
<description>TestApp</description>
<property name="J2EE_HOME_13" value="/usr/testapp/bea921/jdk150_06"/>
<property name="J2EE_HOME" value="${J2EE_HOME_13}"/>
<property name="WL_HOME" value="/usr/testapp/bea921/weblogic92"/>
<property name="WLLIB" value="${WL_HOME}/server/lib"/>
<property name="CPATH1" value="${J2EE_HOME}/lib/tools.jar:${J2EE_HOME}/lib/j2ee.jar"/>
<property name="CPATH2" value="${WL_HOME}/server:${WLLIB}/weblogic_sp.jar:${WLLIB}/weblogic.jar"/>
<property name="CPATH" value="${CPATH1}:${CPATH2}"/>
<property name="src.dir" location="/home/mashan/WEB-INF/classes/com/data" />
<property name="classes.dir" location="/home/mashan/WEB-INF/classes/com/data" />
<property name="javac.debug" value="on" />
<target name="compile" description="Compile TestApp">
<javac srcdir="${src.dir}" destdir="${classes.dir}" classpath="${CPATH}" debug="${javac.debug}">
</javac>
</target>
</project>
Here both source and dest. dir are same.My build.xml is in WEB-INF/classes , when i run the build.xml it is generating a folder at /home/mashan/WEB-INF/classes/com/data/com/data/*.class files.
Where i want to generate the class files at /home/mashan/WEB-INF/classes/com/data/*.class.
So that the server can pick up the file from the root directory. Please do rectify this problem.
Where i am going wrong with this build.xml. Im using weblogic server.Please do update the build.xml.
ThanksI also have this problem. When I build the build.xml file, errors happen:
Buildfile: D:\soft\jdevstudio1111TP2\mywork\storefront_techpreview2\Infrastructure\Ant\build.xml
createDatabase:
refreshSchema:
BUILD FAILED
D:\soft\jdevstudio1111TP2\mywork\storefront_techpreview2\Infrastructure\Ant\build.xml:20: The following error occurred while executing this line:
D:\soft\jdevstudio1111TP2\mywork\storefront_techpreview2\Infrastructure\DBSchema\build.xml:89: The following error occurred while executing this line:
D:\soft\jdevstudio1111TP2\mywork\storefront_techpreview2\Infrastructure\DBSchema\build.xml:54: The following error occurred while executing this line:
D:\soft\jdevstudio1111TP2\mywork\storefront_techpreview2\Infrastructure\DBSchema\build.xml:26: D:\softjdevstudio1111TP2\jdbc\lib not found.
Total time: 0 seconds
My build.properties is set as following (meanwhile, I can connect database 10gR2):
# Master Ant properties file for Fusion Order Demo
# All build files refer to this master list of properties
# $Id: build.properties 812 2007-02-20 07:14:33Z lmunsing $
# Base Directory for library lookup
jdeveloper.home=D:\soft\jdevstudio1111TP2
src.home=..//..
# JDBC info used to create Schema
jdbc.driver=oracle.jdbc.OracleDriver
jdbc.urlBase=jdbc:oracle:thin:@localhost
jdbc.port=1521
jdbc.sid=orcl
# Information about the default setup for the demo user
db.adminUser=system
db.adminUser.password=welcome1
db.demoUser=FOD
db.demoUser.password=welcome1
db.demoUser.tablespace=USERS
db.demoUser.tempTablespace=TEMP
-------------------------------------------------------------------------------------- -
Problem with build.xml (not compiling)
Hi
I am not sure if this is an ANT specific question or a general XML question. DO forgive me for being naive
I wrote this ant build.xml file for my web applications and I find that it simply refuses to compile any classes. I am sure I am doing something wrong
<project basedir="." default="PortalMar23">
<target name="PortalMar23"/>
<property name="src.dir" value="src"></property>
<property name="build.dir" value="${basedir}/build"></property>
<property name="build.lib" value="${build.dir}/lib"></property>
<property name="dist.dir" value="dist"></property>
<property name="classes.dir" value="${build.dir}/classes"></property>
<property name="build.etc" value="${src.dir}/etc"></property>
<property name="build.resources" value="${src.dir}/resources"></property>
<property name="lib.dir" value="lib"></property>
<property name="web-inf.dir" value="WEB-INF"></property>
<property name="war.name" value="concepts"></property>
<property file="../common.properties"></property>
<!-- Main Target -->
<target name="init">
<mkdir dir="${build.dir}"></mkdir>
<mkdir dir="${classes.dir}"></mkdir>
<mkdir dir="${dist.dir}"></mkdir>
</target>
<target name="compile" depends="init">
<javac classpath="${libs}" compiler="${compiler}" debug="off" deprecation="on" destdir="${classes.dir}" optimize="on" srcdir="${src.dir}">
<include name="org/apache/commons/fileupload/**/*.java"></include>
<include name="com/portalbook/portlets/**/*.java"></include>
<include name="com/portalbook/portlets/content/**/*.java"></include>
</javac>
</target>
<!--
<target depends="init" name="compile">
<javac debug="true" deprecation="true" destdir="${classes.dir}" optimize="false">
<src>
<pathelement location="${src.dir}"></pathelement>
</src>
<classpath>
<fileset dir="${lib.dir}">
<include name="*.jar">
</include>
</fileset>
</classpath>
</javac>
</target>
-->
<target name="buildwar" depends="compile, init">
<war destfile="${dist.dir}/${war.name}.war" webxml="WEB-INF/web.xml">
<classes dir="${classes.dir}"></classes>
<lib dir="${lib.dir}"></lib>
<webinf dir="${web-inf.dir}"></webinf>
</war>
</target>
<!-- create concepts-lib.jar -->
<jar jarfile="${build.lib}/concepts-lib.jar">
<fileset dir="${classes.dir}"></fileset>
</jar>
<!-- create concepts.war -->
<jar jarfile="${build.lib}/concepts.war" manifest="${build.etc}/concepts-war.mf">
<fileset dir="${build.resources}/concepts-war"></fileset>
</jar>
<!-- concepts.ear -->
<copy todir="${build.resources}/concepts-ear">
<fileset dir="${build.lib}" includes="concepts.war,concepts-lib.jar">
</fileset>
</copy>
<copy todir="${build.resources}/concepts-ear/META-INF">
<fileset dir="${build.resources}/etc" includes="application.xml">
</fileset>
</copy>
<jar jarfile="${build.lib}/concepts.ear">
<fileset dir="${build.resources}/concepts-ear" includes="concepts.war,concepts-lib.jar">
</fileset>
</jar>
<target depends="init, compile, buildwar" name="explode">
<taskdef classname="org.jboss.nukes.common.ant.Explode" classpath="${libs}" name="explode"></taskdef>
<explode file="${build.lib}/concepts.ear" name="concepts.ear" todir="${build.lib}/exploded"></explode>
</target>
<target name="clean">
<delete dir="${build.dir}">
</delete>
<delete dir="${dist.dir}">
</delete>
</target>
</project>------------------
Could anybody help me out on this?
thanks a lotWell, it could be because the compile target is a comment..
Remove the <!-- before the compile step and the "-->" after it.
Then, Ant will see the step, and either compile your programs, or give you errors about them.
Dave Patterson -
Need help with build.xml / junit - pls ignore my previous posting
i'm trying to add unit tests for another class file in a larger package. the package is built with ant. relevant lines of the build.xml that pertain to unit tests are
</target>
<target name="test" depends="dist, build-tests">
<!-- the grouper project doesn't use the junit ant task that's fine with me -->
<java fork="yes"
classname="junit.textui.TestRunner"
taskname="junit"
failonerror="true">
<arg value="organization.organizationSuite"/>
<classpath>
<pathelement path="${java.class.path}"/>
<pathelement path="../organization.jar"/>
<pathelement path="${buildir}" />
</classpath>
</java>
</target>
<target name="test-individual" depends="dist, build-tests">
<!-- the grouper project doesn't use the junit ant task that's fine with me -->
<java fork="yes"
classname="junit.textui.TestRunner"
taskname="junit"
failonerror="true">
<arg value="organization.testFoo"/> <!-- ADJUST THIS FOR YOUR OWN TEST -->
<classpath>
<pathelement path="${java.class.path}"/>
<pathelement path="../organization.jar"/>
<pathelement path="${buildir}" />
</classpath>
</java>
<java fork="yes"
classname="junit.textui.TestRunner"
taskname="junit"
failonerror="true">
<arg value="organization.oldTest"/> <!-- ADJUST THIS FOR YOUR OWN TEST -->
<classpath>
<pathelement path="${java.class.path}"/>
<pathelement path="../organization.jar"/>
<pathelement path="${buildir}" />
</classpath>
</java>i'm trying to add
<arg value="organization.anotherTest"/> <!-- ADJUST THIS FOR YOUR OWN TEST -->
<classpath>
<pathelement path="${java.class.path}"/>
<pathelement path="../organization.jar"/>
<pathelement path="${buildir}" />
</classpath>
</java>right now i can
right now i can
java junit.textui.TestRunner organization.testSuite
or to run a specific test
java junit.textui.TestRunner organization.oldTest
i added the above lines to my build.xml, added the .java file for the anotherTest class to the ${testdir} where oldTest and testSuite and other junit related classes live within the package directory structure, then ran 'ant' to make a new .jar file.
now when i switch in the new .jar file, i get errors whenever i try to
java junit.textui.TestRunner organization.oldTest
i get 'no class oldTest' found
can anyone point me in the right direction?My Ant build.xml doesn't look like yours. I usually do it like this, and it works fine:
<target name="test" depends="compile" description="run all unit tests">
<junit>
<jvmarg value="-Xms32m" />
<jvmarg value="-Xmx64m" />
<classpath>
<path refid="project.class.path" />
</classpath>
<formatter type="xml" />
<batchtest fork="yes" todir="${reports}">
<fileset dir="${output.classes}">
<include name="**/*TestCase.class" />
</fileset>
<fileset dir="${output.classes}">
<include name="**/*TestSuite.class" />
</fileset>
</batchtest>
</junit>
</target>
<target name="report" depends="test" description="create HTML report for JUnit test results">
<junitreport todir="${reports}">
<fileset dir="${reports}">
<include name="TEST-*.xml"/>
</fileset>
<report format="frames" todir="${reports}"/>
</junitreport>
</target>I don't understand why you're running individual tests like that. why not run them all?
%
Maybe you are looking for
-
My wireless router needed restart. And, no Apple TV signal. How do I reset the Apple TV box? no lite. nothing
-
Mains charger requires a closed lid to start charging
real puzzler this one: Both the charger and the battery have been replaced and have been tested with other machines and work beautifully. On my machine: the mains charger will stop working if unplugged and then plugged in during a session. So if I un
-
Putting emoticons in Apple's eMail program
Does any one know of any utility that I can use to put emoticons in an email being written by Apple's standard email program? Thanks G4 Mac OS X (10.4.9)
-
Experts, In the IDOC I receive, there a ~ symbol after each record. So while conversion, my file is holding only the first record. Later records are missing. What do I need to do to get complete file output.
-
Hi gurus, I am working with a bw query in the segment builder. My query has customer and country as a characteristics and some key figures as a results. My problem is that I want to filter in the segment builder by the country and I am not able to do