Search Results

Search found 923 results on 37 pages for 'ant'.

Page 8/37 | < Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >

  • Execute a default task in ANT in case of failure

    - by elos
    Hi, I'm currently using ANT for building my Java project on a Windows XP machine. In my build.xml file I've defined 3 task and I would like that,in case of fail,a default task be executed before closing the building and exiting (like a recovery procedure). I would like to know if it's possible. thanks

    Read the article

  • Ant variable does not exists in Ubuntu 10.10

    - by Nishat Baig
    I am trying to set up ANT build. However when I invoke build command helloworld_15/${NAME} does not exist. BUILD FAILED (total time: 0 seconds) Also the configure variables does not seems to be assigned. However i have set them into /etc/envitonment I tried echo $<varaiable_name> and value get displayed. Tried to google but not solutions seems am the first one having this issue. PS: OS Ubuntu 10.10

    Read the article

  • war Ant task with needxmlfile="false" still complains

    - by Menelaos Perdikeas
    I have the following war task in my build.xml and even though needxmlfile is set to false, Ant (version 1.8.2) complains when the web.xml file does not exist ("BUILD FAILED ... Deployment descriptor: /home/.../web/WEB-INF/web.xml does not exist") What am I missing? <target name="war" depends="build"> <mkdir dir="${build.dir}"/> <war needxmlfile="false" basedir="${webroot.dir}" warfile="${build.dir}/${project.distname}.war" webxml="${webinf.dir}/web.xml"> <exclude name="WEB-INF/${build.dir}/**"/> <exclude name="WEB-INF/src/**"/> <exclude name="WEB-INF/web.xml"/> </war> </target>

    Read the article

  • Ant build.xml requires user input, but Eclipse has no tty

    - by carneades
    I'm trying to better integrate Eclipse with my build.xml. My build file calls GNU Make for the native portion of the program, and the Makefile uses sudo to movethe compiled libs into system path. Unfortunately that requires entering a password, and Eclipse's terminal doesn't accept user input. So the result from running the build in eclipse is: [exec] sudo: no tty present and no askpass program specified [exec] make: *** [install] Error 1 Any way around this problem? Can the ant build be elevated to root some other way?

    Read the article

  • Problem making ant compile my classes present in different Eclipse projects into single destination

    - by KCore
    I have close to about 20 projects in my Eclipse workspace. They are interdependent. Now I want to build all of them in a single war file. The thing is eclipse does it nicely... if I create a Dynamic Web Project and link sources of all the 20 projects. But I want to automate the entire process and want to be able to run a script (ant maybe..) and deploy a war in my app server. My approach: I started with a simple approach. I tried to sequentially build each project (javac task) with destination directory as web-inf of my war. But it is giving me weird errors like : package " ** " not found,when it shows the same all the required classes in classpath (I used verbose) Do you think, a continous integration engine will be better for my case (20 projects..) I saw Team City, but didnt get it the first time...

    Read the article

  • Problem with building with csc task in Ant

    - by Wing C. Chen
    I have an ant build target using csc: <target name="compile"> <echo>Starting compiling ServiceLauncher</echo> <csc optimize="true" debug="true" warnLevel="1" unsafe="false" targetType="exe" failonerror="true" incremental="false" mainClass = "ServiceLauncher.Launcher" srcdir="ServiceLauncher/Launcher/" outputfile="ServiceLauncher.exe" > <reference file="libs/log4net.dll"/> <define name="RELEASE"/> </csc> </target> When I run it, the following exception comes up: csc failed: java.io.IOException: Cannot run program "csc": CreateProcess error=2, The system cannot find the file specified However, it runs without the exception but never correctly builds the .exe file, when I manually add in an empty ServiceLauncher.exe. How can I correctly build this .Net project "ServiceLauncher"?

    Read the article

  • Building Android app from ant via Hudson - chicken and egg problem

    - by Eno
    When using an Android-generated ant build file, the file references your SDK installation via an sdk.dir property inside the local.properties files which is generated by "android update project -p .". The comments in build.xml suggest that local.properties should NOT be checked into version control. BUT, when you run your build from Hudson, it does a fresh checkout of your code from version control, hence local.properties does not exist and subsequently the build fails without sdk.dir being set. So its kind of chicken and egg problem. As a workaround I have checked local.properties into version control for now (nobody else will use it) but I was curious as to how other developers had tackled this problem ?

    Read the article

  • Using Ant to merge two different properties files

    - by Justin
    I have a default properties file, and some deployment specific properties files that override certain settings from the default, based on deployment environment. I would like my Ant build script to merge the two properties files (overwriting default values with deployment specific values), and then output the resulting properties to a new file. I tried doing it like so but I was unsuccessful: <target depends="init" name="configure-target-environment"> <filterset id="application-properties-filterset"> <filtersfile file="${build.config.path}/${target.environment}/application.properties" /> </filterset> <copy todir="${web-inf.path}/conf" file="${build.config.path}/application.properties" overwrite="true" failonerror="true" > <filterset refid="application-properties-filterset" /> </copy> </target>

    Read the article

  • Ant: make "available" throw an understandable error?

    - by digitala
    When running ant, how do I make an <available /> block throw an adequate error message? This is what I have so far: <target name="requirements"> <available classname="foo.bar.baz" property="baz.present" /> </target> <target name="directories" depends="requirements" if="baz.present"> <mkdir dir="build" /> </target> <target name="compile" depends="directories"> <!-- build some stuff --> </target> What I'm currently seeing when requirements fails is a message complaining about the ./build dir not being available. How can I change this so that a message is displayed about the missing class, such as "foo.bar.baz is not available"?

    Read the article

  • Ant Tokenizer: Selecting an individual Token

    - by John Oxley
    I have the following ant task: <loadfile property="proj.version" srcfile="build.py"> <filterchain> <striplinecomments> <comment value="#"/> </striplinecomments> <linecontains> <contains value="Version" /> </linecontains> </filterchain> </loadfile> <echo message="${proj.version}" /> And the output is [echo] config ["Version"] = "v1.0.10-r4.2" How do I then use a tokenizer to get only v1.0.10-r4.2, the equivalent of | cut -d'"' -f4

    Read the article

  • Ant database rebuild script, avoiding interactive prompting

    - by fras85
    Hi Guys. I'm writing an ant script to rebuild our database i.e. dropping everything and rebuilding from scratch. The problem our DBA adds a Y/N prompt before executing the rest of the script, and therefore we can't call this from an automated build process. Does anyone have any suggestions to circumvent the Y/N prompt? Obviously we could create seperate scripts, one for the DBA's and one for the automated build - but this requires maintaning both. We're running on Windows so it's not as easy as using sed to strip out the prompt...but i'm thinking something along those lines. Not sure if that's clear enough but hope you can help. Cheers.

    Read the article

  • ant cpptask with ivy

    - by AC
    A company I am working for, has some c binaries build with ant using cpptask. They use ivy to retrieve shared c libraries every time we start a build which wastes a significant amount of time comparing the revisions and downloading, when then only need to be download if the header files have changed. I have added a target which sets a var, which causes the build to skip over the ivy steps but I'd like a better solution. I see that cpptask creates a file history.xml and only rebuilds to binary if any of the sources have change. I'd like to know if there is way to independently test if the binary needs to build, and it does, I'd like it fire off the ivy targets. I'd also like for a variable to be set if the binary was rebuilt so that I can conditionally start an rpm generation task

    Read the article

  • Ant Exec environment var

    - by Mike
    I have a problem where I don't want to have to call a setEnv.sh file before i call my ant target that calls an exec task. Right now I have a way to save the environment variables in setenv.properties file in the key=value notation. The exec task for some reason does not see the variables that are set in the .properties file.... (I know i could use the tag but the setenv.properties is dynamically generated) setenv.properties: HELLO=XYZ part of my build.xml : <property file="setenv.properties"/> <target name="test" depends="setEnv"> <exec executable="/bin/ksh" newenvironment="false"> test.sh : echo ${HELLO} Any thoughts?

    Read the article

  • Handling hundreds of dependencies with ant

    - by Roberto
    Hi guys, I have to refactor an ant xml file. Basicly I have one big task that checkouts (using cvs) a lot of dependencies, build them, and then copy all the jar/wsdl generated by building them to a directory that I specify. If one dependency version changes, I have to change the name in at least 3 places on the xml file (cvs checkout, build, copy). What I'd like to have is just a single place where I can specify my dependencies name, without having to search & replace the dependency name through the code. One of the problems is that the cvs project could be /path1/path2/project with tag=v12 but then the jars generated by the single project build could be several with different names, so it seems to be a bit complicated. Do you have any idea on how I can get this done?

    Read the article

  • Deploy java (command line) app using Netbeans / ant

    - by Haes
    I've finally managed to create a Netbeans project out of an old standalone (not Web-) Java application which consisted only out of single .java sources. Now I have basically two questions regarding Netbeans Subversion interaction and application deployment: Do you check in all the Netbeans project files into the repository, normally? If I build the project using Netbeans (or ant) I get a .jar file and some additional jar libraries. In order for the app to run properly on the server, some additional config files and directories (log/ for example) are needed. The application itself is a J2SE application (no frameworks) which runs from the command line on a Linux platform. How would you deploy and install such an application? It would also be nice if I could see what version of app is currently installed (maybe by appending the version number to the installed app path). Thanks for any tips.

    Read the article

  • Generating Ant build file for a project in eclipse

    - by Negai
    Hi everyone. I have a project written in Java using eclipse and I would like to generate an Ant build file for it. How can it be done? I constantly need to keep it synchronized with the source code, so that I could promote it along with the code to the common repository when with the project structure is modified. I'm sorry for a stupid question like this. I've browsed across the forums, but still no luck. Thanks in advance.

    Read the article

  • ant: iterator over properties file

    - by scheibenkleister
    Hi, all my projects and their versions are defined in a properties file like this: ProjectNameA=0.0.1 ProjectNameB=1.4.2 I'd like to iterate over all projects and use there names and versions in an ant script. Right now, I read the entire properties file in help of the property task. Then I iterate over a given list in a for loop like this: <for list="ProjectNameA,ProjectNameB" param="project"> <sequential> <echo message="@{project} has version ${@{project}}" /> </sequential> </for> How can I avoid the duplication of the project names in the for loop. So basically iterate over each line and extract the name and the version of a project. Thanks.

    Read the article

  • ANT antcall a target that defines a property

    - by alem0lars
    In ANT I want to define a target (called A) that define a property and antcall it from another target (called B). I want that the target B, after antcalling the target A, can access to the property defined in the target A. For example: <target name="B"> <antcall target="A" inheritAll="true" inheritRefs="true" /> <echo>${myprop}</echo> </target> <target name="A"> <property name="myprop" value="myvalue" /> </target> However it doesn't work and <echo>${myprop}</echo> doesn't print myvalue (I think because the property myprop isn't defined in B). Is there any way to do that? Thanks..

    Read the article

  • How to Deploy a Directory or WAR in TOMCAT6 using ANT?

    - by Hitesh
    I want to deploy directory which is extraction of .war file using ANT in Tomcat6. I have build.xml like <property name="WAR_PATH" value="E:/18-06-2013/TEST"/> <property name="mgr.context.path" value="/FOUR"/> <property name="url" value="http://localhost:8080/manager"/> <property name="username" value="tomcat"/> <property name="password" value="password"/> <target name="deploy" description="Install web application" > <deploy url="${url}" username="${username}" password="${password}" path="${mgr.context.path}" war="file:${WAR_PATH}"/ But when i run the ANT(build.xml) script i get error something like java.io.IOException: too many bytes written at sun.net.www.protocol.http.HttpURLConnection$StreamingOutputStream.write(HttpURLConnection.java:2632) at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65> Same script work properly when i try to deploy .war file But ANT(build.xml) script not work properly in case directory. I have also try to deploy directory using HTTP command it work properly.

    Read the article

  • Error Ant Build/deploy to websphere 7.0

    - by adisembiring
    Hi I'm trying to build/deploy war to websphere process server 7.0. and I run on windows environment. I use http://illegalargumentexception.blogspot.com/2008/08/ant-automated-deployment-to-websphere.html as my reference. and http://illegalargumentexception.googlecode.com/svn/trunk/code/java/WebSphereAntFiles/ as my sample code to deployed. this is my buil.properies is ? #build properties mywebappear=D:/data/code/WebSphereAntFiles/scripts/test/mywebappEAR.ear #WAS6 install directory was_home=C:/IBM/WID7_WTE/runtimes/bi_v7 #server name (see cell/node/server; e.g. "server1") was_server=server1 #user + password; for use when security is enabled was_user=admin was_password=admin #stops scripts on problem was_failonerror=true #virtual host was_virtualhost=default_host #Absolute path to EAR file #was_ear=fooEAR.ear #Name of the enterprise application #was_appname=fooEAR this is my console while I trying to build with ws_ant.bat [wsDefaultBindings] mywebapp.war [wsDefaultBindings] <virtual-host> --> default_host [wsDefaultBindings] [wsDefaultBindings] ------------------------ [wsDefaultBindings] Saving EAR File to directory [wsDefaultBindings] Saved EAR File to directory Successfully test_wsStartServer: WAS_wsStartServer: depCheck: depCheck: [startServer] ADMU0116I: Tool information is being logged in file [startServer] C:\IBM\WID7_WTE\runtimes\bi_v7\profiles\qwps\logs\server1\startServer.log [startServer] ADMU0128I: Starting tool with the qwps profile [startServer] ADMU3100I: Reading configuration for server: server1 [startServer] ADMU3028I: Conflict detected on port 8880. Likely causes: a) An instance of [startServer] the server server1 is already running b) some other process is [startServer] using port 8880 [startServer] ADMU3027E: An instance of the server may already be running: server1 [startServer] ADMU0111E: Program exiting with error: [startServer] com.ibm.websphere.management.exception.AdminException: ADMU3027E: An [startServer] instance of the server may already be running: server1 [startServer] ADMU1211I: To obtain a full trace of the failure, use the -trace option. [startServer] ADMU0211I: Error details may be seen in the file: [startServer] C:/IBM/WID7_WTE/runtimes/bi_v7/profiles/qwps\logs\server1\startServer.log BUILD FAILED D:\data\code\WebSphereAntFiles\scripts\test\build.xml:68: The following error occurred while executing this line: D:\data\code\WebSphereAntFiles\scripts\was\wsStartServer.xml:49: Java returned: -1

    Read the article

  • Docbook+Ant: Could not find variable with the name of fop.extensions

    - by rfkrocktk
    After a lot of spent time trying to get my article to compile in Ant with Docbook, I can't seem to make FO compilation work. I'm using Xalan 2.7.0, and everything else (both single-page and chunked HTML) compiles perfectly. It's only when I try to compile to FO that I get this error: Fatal Error! org.apache.xml.utils.WrappedRuntimeException: Could not find variable with the name of fop.extensions Cause: org.apache.xml.utils.WrappedRuntimeException: Could not find variable with the name of fop.extensions This is pretty strange and I can't seem to resolve it. I even added a <param> value defining the variable it "can't find:" <xslt style="docbook-xsl/fo/fo.xsl" in="documents/book.xml" out="output.fo"> <classpath> <fileset dir="lib" includes="**/*"/> </classpath> <param name="fop.extensions" expression="1"/> </xslt> Is there anything I can do to resolve this issue? It's really weird if you ask me. (Again, using the same code as above, all of my other Docbook compilation works just fine)

    Read the article

  • Layout of Ant build.xml with junit tests

    - by Derk
    In a project I have a folder src for all application source code and a different folder test for all junit test (both with a simular package hierarchy). Now I want that Ant can run all tests in in test folder, bot the problem is that now also files in the src folder with "Test" in the filename are included. This is the test target in the build.xml: <target name="test" depends="build"> <mkdir dir="reports/tests" /> <junit fork="yes" printsummary="yes"> <formatter type="xml"/> <classpath> <path location="${build}/WEB-INF/classes"/> <fileset dir="${projectname.home}/lib"> <include name="servlet-api.jar"/> <include name="httpunit.jar"/> <include name="Tidy.jar"/> <include name="js.jar"/> <include name="junit.jar"/> </fileset> </classpath> <batchtest todir="reports/tests"> <fileset dir="${build}/WEB-INF/classes"> <include name="**/*Test.class"/> </fileset> </batchtest> </junit> And I have added the test folder to the build target: <target name="build" depends="init,init-props,prepare"> <javac source="1.5" debug="true" destdir="${build}/WEB-INF/classes"> <src path="src" /> <src path="test" /> <classpath refid="classpath"/> </javac> </target>

    Read the article

< Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >