Search Results

Search found 925 results on 37 pages for 'vdh ant'.

Page 14/37 | < Previous Page | 10 11 12 13 14 15 16 17 18 19 20 21  | Next Page >

  • Is there a way to conditionally cooy a file using ant?

    - by braveterry
    I have the following target: <target name="promptforchoice"> <input addproperty="choice"> Copy the file?. [Y, n] </input> <condition property="copy.file"> <or> <equals arg1="Y" arg2="${choice}"/> <equals arg1="y" arg2="${choice}"/> </or> </condition> </target> In another target, I'd like to conditionally copy a file depending on whether or not the copy.file property is set. Is this possible? Is there some other way to accomplish it?

    Read the article

  • Ant: Create directory containing file if it doesn't already exist?

    - by Benny
    Basically, I get a path like "C:\test\subfolder1\subfolder2\subfolder3\myfile.txt", but it's possible that subfolders 1-3 don't exist already, which means I'd get an exception if I try to write to the file. Is there a way to create the directory structure the target file is in, either by using some task that creates the structure when it outputs to the file and then deleting the file, or by parsing the directory part of the path and using the mkdir task first? Any help is appreciated. Thanks, B.J.

    Read the article

  • Why doesn't ${locale} resolve in my <compc> Ant task?

    - by user165462
    I've seen a number of examples, e.g. here, where people are including locale resource bundles by referencing the locale attribute in the element. For some reason this doesn't work for me. Here's what I have for the task: <compc output="${deploy.dir}/myfrmwrk.swc" locale="en_US"> <source-path path-element="${basedir}/src/main/flex"/> <include-sources dir="${basedir}/src/main/flex" includes="*" /> <include-libraries file="${basedir}/libs"/> <compiler.external-library-path dir="${FLEX_HOME}/frameworks/libs/player/9" append="true"> <include name="playerglobal.swc"/> </compiler.external-library-path> <compiler.library-path dir="${FLEX_HOME}/frameworks" append="true"> <include name="libs"/> <include name="locale/${locale}"/> </compiler.library-path> <load-config filename="${basedir}/fb3config.xml" /> </compc> This fails with a bunch of errors of the form: [compc] Error: could not find source for resource bundle ... I can make it build with this one change: <include name="locale/en_US"/> The configuration file generated by Flex Builder 3 actually renders this as "locale/{locale}" (notice the $ is missing). I've tried that as well with the same (failing) results. For now, I'm doing OK directly injecting en_US as we won't be doing localization bundles for quite some time, but I will eventually need to get this working. Also, it bugs me that I can't make it work the way that it SHOULD work!

    Read the article

  • How do I copy files into an existing JAR file with Ant?

    - by Blue
    I have a project that needs to access resources within its own JAR file. When I create the JAR file for the project, I would like to copy a directory into that JAR file (I guess the ZIP equivalent would be "adding" the directory to the existing ZIP file). I only want the copy to happen after the JAR has been created (and I obviously don't want the copy to happen if I clean and delete the JAR file). Currently the build file looks like this: <?xml version="1.0" encoding="UTF-8"?> <project name="foobar" basedir=".." default="jar"> <!-- project-specific properties --> <property name="project.path" value="my/project/dir/foobar" /> <patternset id="project.include"> <include name="${project.path}/**" /> </patternset> <patternset id="project.jar.include"> <include name="${project.path}/**" /> </patternset> <import file="common-tasks.xml" /> <property name="jar.file" location="${test.dir}/foobar.jar" /> <property name="manifest.file" location="misc/foobar.manifest" /> </project> Some of the build tasks are called from another file (common-tasks.xml), which I can't display here. Thanks.

    Read the article

  • Tutorial on Hudson, JUnit and Ant

    - by Grant Ronald
    Often when discussing ADF we often show the features for developing applications. However, writing applications is only one part.  Building in a team, integrating code, testing it...these are equally important to the success of the project.  If you would like to find out how features in JDeveloper can help you build, maintain, integrate and test your application then check out this tutorial.

    Read the article

  • Where do you download a package with java.exe?

    - by Derek
    I was trying to run this java ee program with session beans which involves the 'ant' command apparently and when I try to run 'ant' it says... '"java.exe"' is not recognized as an internal or external command. Soooo I am thinking I need to get java.exe in order to use 'ant' properly. Where can I find it? What downloadable contains it?

    Read the article

  • How best to store Subversion version information in EAR's?

    - by Rene
    When receiving a bug report or an it-doesnt-work message one of my initials questions is always what version? With a different builds being at many stages of testing, planning and deploying this is often a non-trivial question. I the case of releasing Java JAR (ear, jar, rar, war) files I would like to be able to look in/at the JAR and switch to the same branch, version or tag that was the source of the released JAR. How can I best adjust the ant build process so that the version information in the svn checkout remains in the created build? I was thinking along the lines of: adding a VERSION file, but with what content? storing information in the META-INF file, but under what property with which content? copying sources into the result archive added svn:properties to all sources with keywords in places the compiler leaves them be I ended up using the svnversion approach (the accepted anwser), because it scans the entire subtree as opposed to svn info which just looks at the current file / directory. For this I defined the SVN task in the ant file to make it more portable. <taskdef name="svn" classname="org.tigris.subversion.svnant.SvnTask"> <classpath> <pathelement location="${dir.lib}/ant/svnant.jar"/> <pathelement location="${dir.lib}/ant/svnClientAdapter.jar"/> <pathelement location="${dir.lib}/ant/svnkit.jar"/> <pathelement location="${dir.lib}/ant/svnjavahl.jar"/> </classpath> </taskdef> Not all builds result in webservices. The ear file before deployment must remain the same name because of updating in the application server. Making the file executable is still an option, but until then I just include a version information file. <target name="version"> <svn><wcVersion path="${dir.source}"/></svn> <echo file="${dir.build}/VERSION">${revision.range}</echo> </target> Refs: svnrevision: http://svnbook.red-bean.com/en/1.1/re57.html svn info http://svnbook.red-bean.com/en/1.1/re13.html subclipse svn task: http://subclipse.tigris.org/svnant/svn.html svn client: http://svnkit.com/

    Read the article

  • With Maven2, how would I zip a directory in my resources?

    - by Benny
    I'm trying to upgrade my project from using Maven 1 to Maven 2, but I'm having a problem with one of the goals. I have the following Maven 1 goal in my maven.xml file: <goal name="jar:init"> <ant:delete file="${basedir}/src/installpack.zip"/> <ant:zip destfile="${basedir}/src/installpack.zip" basedir="${basedir}/src/installpack" /> <copy todir="${destination.location}"> <fileset dir="${source.location}"> <exclude name="installpack/**"/> </fileset> </copy> </goal> I'm unable to find a way to do this in Maven2, however. Right now, the installpack directory is in the resources directory of my standard Maven2 directory structure, which works well since it just gets copied over. I need it to be zipped though. I found this page on creating ant plugins: http://maven.apache.org/guides/plugin/guide-ant-plugin-development.html. It looks like I could create my own ant plugin to do what I need. I was just wondering if there was a way to do it using only Maven2. Any suggestions would be much appreciated. Thanks, B.J.

    Read the article

  • Running Cargo From Maven antrun Plugin

    - by Frank
    I have a maven (multi-module) project creating some WAR and EAR files for JBoss AS 7.1.x. For one purpose, I need to deploy one generated EAR file of one module to a fresh JBoss instance and run it, call some REST web service calls against it and stop JBoss. Then I need to package the results of these calls that were written to the database. Currently, I am trying to use CARGO and the maven ant run plugin to perform this task. Unfortunately, I cannot get the three (maven, ant run and CARGO) to play together. I don't have the uberjar that is used in the ant examples of cargo. How can I configure the ant run task so that the cargo ant task can create, start, deploy my JBoss? Ideally the one unpacked and configured by the cargo-maven2-plugin in another phase? Or, is there a better way to achieve my goal of creating the database? I cannot really use the integration-test phase, as it is executed after the package phase. So, I plan to do it all in compile phase using antrun.

    Read the article

  • Automation of EAR packing

    - by glebreutov
    I need to automate packing of Java EE projects into EAR archive in Eclipse. The most easy way, I think, is using Ant script. But writing of Ant from start is routine and long task. Is there a way to generate Ant script based on my actions in eclipse (like macros in MS Office)? Or, maybe, exists easier way to do this? Thanks!

    Read the article

  • Ant trouble with environment variables on Ubuntu

    - by Inaimathi
    Having some trouble with with ant reading environment variables in Ubuntu 9.1. Specifically, the build tasks my company uses has a token like ${env.CATALINA_HOME] in the main build.xml. I set CATALINA_HOME to the correct value in /etc/environment, ~/.pam_environment and (just to be safe) my .bashrc. I can see the correct value when I run printenv from bash, or when I eval (getenv "CATALINA_HOME") in emacs. Ant refuses to build to the correct directory though; instead I get a folder named ${env.CATALINA_HOME} in the same directory as my build.xml. Any idea what's happening there, and/or how to fix it?

    Read the article

  • eclipse adding java ant based project: Specified buildfile does not contain a javac task

    - by ufk
    Hello. I have a project that i wrote for apache tomcat. I started working with eclipse i want to import the project to eclipse ide. using eclipse 3.6.1. when i create a new project using : File - New - Other - Java - Java Project from Existing Ant Buildfile and i provide the build file location i get the following error: Specified buildfile does not contain a javac task I have a red5 project that i used the same method and it worked. what am i missing? do i need to add something to the ant build file to make it work? what exactly ? where can i find more information regarding this specific subject ? thanks!

    Read the article

  • "ant" is not recognized as command in Windows

    - by user1294663
    This is my first time developing Android applications. I'm developing an Android app on Eclipse on Windows 7. I would like to run the Android app from the Windows 7 command line interface. I have my Android device connected to the PC. The workspace directory that I use to store the Android project is C:\Users\Guest\Desktop\Software Applications Development\Java\Android Moblie Applications Projects\Eclipse Indigo for Java EE x64-bit\project workspace I opened the command line interface and I changed the working directory to the Android workspace directory. cd C:\Users\Guest\Desktop\Software Applications Development\Java\Android Moblie Applications Projects\Eclipse Indigo for Java EE x64-bit\project workspace I included Android sdk platform tools directory into the PATH environment variable. c:\Users\admin\Android-sdks\platform-tools Then I entered this into the Windows 7 command line interface: ant debug I have this error message on the cmd: ant is not recognised as an internal or external command, operatable program or batch file. What is the solution to this problem?

    Read the article

  • Does JUnit4 testclasses require a public no arg constructor?

    - by Thomas Baun
    I have a test class, written in JUnit4 syntax, that can be run in eclipse with the "run as junit test" option without failing. When I run the same test via an ant target I get this error: java.lang.Exception: Test class should have public zero-argument constructor at org.junit.internal.runners.MethodValidator.validateNoArgConstructor(MethodValidator.java:54) at org.junit.internal.runners.MethodValidator.validateAllMethods(MethodValidator.java:39) at org.junit.internal.runners.TestClassRunner.validate(TestClassRunner.java:33) at org.junit.internal.runners.TestClassRunner.<init>(TestClassRunner.java:27) at org.junit.internal.runners.TestClassRunner.<init>(TestClassRunner.java:20) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at org.junit.internal.requests.ClassRequest.getRunner(ClassRequest.java:26) at junit.framework.JUnit4TestAdapter.<init>(JUnit4TestAdapter.java:24) at junit.framework.JUnit4TestAdapter.<init>(JUnit4TestAdapter.java:17) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:386) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:911) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:768) Caused by: java.lang.NoSuchMethodException: dk.gensam.gaia.business.bonusregulering.TestBonusregulerAftale$Test1Reader.<init>() at java.lang.Class.getConstructor0(Class.java:2706) at java.lang.Class.getConstructor(Class.java:1657) at org.junit.internal.runners.MethodValidator.validateNoArgConstructor(MethodValidator.java:52) I have no public no arg constructor in the class, but is this really necessary? This is my ant target <target name="junit" description="Execute unit tests" depends="compile, jar-test"> <delete dir="tmp/rawtestoutput"/> <delete dir="test-reports"/> <mkdir dir="tmp/rawtestoutput"/> <junit printsummary="true" failureproperty="junit.failure" fork="true"> <classpath refid="class.path.test"/> <classpath refid="class.path.model"/> <classpath refid="class.path.gui"/> <classpath refid="class.path.jfreereport"/> <classpath path="tmp/${test.jar}"></classpath> <batchtest todir="tmp/rawtestoutput"> <fileset dir="${build}/test"> <include name="**/*Test.class" /> <include name="**/Test*.class" /> </fileset> </batchtest> </junit> <junitreport todir="tmp"> <fileset dir="tmp/rawtestoutput"/> <report todir="test-reports"/> </junitreport> <fail if="junit. failure" message="Unit test(s) failed. See reports!"/> </target> The test class have no constructors, but it has an inner class with default modifier. It also have an anonymouse inner class. Both inner classes gives the "Test class should have public zero-argument constructor error". I am using Ant version 1.7.1 and JUnit 4.7

    Read the article

  • Getting useful emails from Hudson instead of tail of ant log

    - by Rick
    A team member of mine recently setup some Hudson continuous-integration builds for a number of our development code bases. It uses the built in ant integration configured in simple way. While, it is very helpful and I recommend it strongly, I was wondering how to get more more concise/informative/useful emails instead of just the tail of the ant build log. E.G., Don't want this: > [...truncated 36530 lines...] > [junit] Tests run: 32, Failures: 0, Errors: 0, Time elapsed: 0.002 sec ... (hundred of lines omitted) ... > [junit] Tests run: 10, Failures: 0, Errors: 0, Time elapsed: 0.001 sec > [junit] Tests FAILED > > BUILD FAILED I assume, that I could skip the build-in ant support and send the build log through a grep script, but I was hoping there was a more integrated or elegant option.

    Read the article

  • Ant target for compile-time code instrumentation with Spring aspects

    - by alecswan
    I have developed a web application using Netbeans 6.7 and Ant. The webapp works, but I would like to refactor the code to use @Configurable Spring annotation for cleaner dependency injection. I was able to get load-time weaving (LTW) of Spring aspects to work intermittently (see http://forum.springsource.org/showthread.php?t=86904). At this point I would like to use compile-time weaving with my tool set. Could anybody provide an Ant target that I can use to weave Spring aspects at compile time? An extra credit will be given to anybody who explains how to configure Netbeans to execute the new Ant target right after code compilation. Thanks.

    Read the article

  • Is it correct or incorrect for a Java JAR to contain its own dependencies?

    - by 4herpsand7derpsago
    I guess this is a two-part question. I am trying to write my own Ant task (MyFirstTask) that can be used in other project's build.xml buildfiles. To do this, I need to compile and package my Ant task inside its own JAR. Because this Ant task that I have written is fairly complicated, it has about 20 dependencies (other JAR files), such as using XStream for OX-mapping, Guice for DI, etc. I am currently writing the package task in the build.xml file inside the MyFirstTask project (the buildfile that will package myfirsttask.jar, which is the reusable Ant task). I am suddenly realizing that I don't fully understand the intention of a Java JAR. Is it that a JAR should not contain dependencies, and leave it to the runtime configuration (the app container, the runtime environment, etc.) to supply it with the dependencies it needs? I would assume if this is the case, an executable JAR is an exception to the rule, yes? Or, is it the intention for Java JARs to also include their dependencies? Either way, I don't want to be forcing my users to be copying-n-pasting 25+ JARs into their Ant libs; that's just cruel. I like the way WAR files are set up, where the classpath for dependencies is defined under the classes/ directory. I guess, ultimately, I'd like my JAR structure to look like: myfirsttask.jar/ com/ --> the root package of my compiled binaries config/ --> config files, XML, XSD, etc. classes/ --> all dependencies, guice-3.0.jar, xstream-1.4.3.jar, etc. META-INF/ MANIFEST.MF I assume that in order to accomplish this (and get the runtime classpath to also look into the classes/ directory), I'll need to modify the MANIFEST.MF somehow (I know there's a manifest attribute called ClassPath, I believe?). I'm just having a tough time putting everything together, and have a looming/lingering question about the very intent of JARs to begin with. Can someone please confirm whether Oracle intends for JARs to contain their dependencies or not? And, either way, what I would have to do in the manifest (or anywhere else) to make sure that, at runtime, the classpath can find the dependencies stored under the classes/ directory? Thanks in advance!

    Read the article

  • In Netbeans, how do I avoid wsimport rebuilding web service clients every build?

    - by gustafc
    I'm on a project where we use NetBeans (6.8). We use several different web services, which we have added as web service references, and Netbeans auto-generates the Ant wsimport scripts for us. Very handy, with one drawback: The web service clients are recompiled every time ant is invoked. This slows down the build process considerably and has caused the number of sword-related injuries, maimings and deaths to skyrocket. Normally, I'd fix this by changing the wsimport element from <wsimport sourcedestdir="${build.generated.dir}/jax-wsCache/PonyService" destdir="${build.generated.dir}/jax-wsCache/PonyService" wsdl="${wsdl-PonyService}" catalog="catalog.xml" verbose="true"/> to <wsimport sourcedestdir="${build.generated.dir}/jax-wsCache/PonyService" destdir="${build.generated.dir}/jax-wsCache/PonyService" wsdl="${wsdl-PonyService}" catalog="catalog.xml" verbose="true"> <produces dir="${build.generated.dir}/jax-wsCache/PonyService" /> </wsimport> But I can't, 'cause this part of the Ant script is auto-generated. If I right-click the PonyService web service reference and select Edit Web Service Attributes ⇒ wsimport options, I can add attributes to the wsimport element, but not child elements. So: How do I add the produces child element to wsimport other than hacking the auto-generated Ant script? Or more generally: How do I make the NetBeans-generated wsimport not recompile the web service clients every time I build?

    Read the article

  • Shell script task status monitoring

    - by Bikram Agarwal
    I'm running an ANT task in background and checking in 60 second intervals whether that task is complete or not. If it is not, every 60 seconds, a message should be displayed on screen - "Deploy process is still running. $slept seconds since deploy started", where $slept is 60, 120, 180 n so on. There's a limit of 1200 seconds, after which the script will show the log via 'ant log' command and ask the user whether to continue. If the user chooses to continue, 300 seconds are added to the time limit and the process repeats. The code that I am using for this task is - ant deploy & limit=1200 deploy_check() { while [ ${slept:-0} -le $limit ]; do sleep 60 && slept=`expr ${slept:-0} + 60` if [ $$ = "`ps -o ppid= -p $!`" ]; then echo "Deploy process is still running. $slept seconds since deploy started." else wait $! && echo "Application ${New_App_Name} deployed successfully" || echo "Deployment of ${New_App_Name} failed" break fi done } deploy_check if [ $$ = "`ps -o ppid= -p $!`" ]; then echo "Deploy process did not finish in $slept seconds. Here's the log." ant log echo "Do you want to kill the process? Press Ctrl+C to kill. Press Enter to continue." read log limit=`expr ${limit} + 300` deploy_check fi Now, the problem is - this code is not working. This looks like a perfectly good code and yet, this is not working. Can anyone point out what is wrong with this code, please.

    Read the article

  • Maven Java Source Code Generation for Hibernate

    - by Adam
    Hi, I´m busy converting an existing project from an Ant build to one using Maven. Part of this build includes using the hibernate hbm2java tool to convert a collection of .hbm.xml files into Java. Here's a snippet of the Ant script used to do this: <target name="dbcodegen" depends="cleangen" description="Generate Java source from Hibernate XML"> <hibernatetool destdir="${src.generated}"> <configuration> <fileset dir="${src.config}"> <include name="**/*.hbm.xml"/> </fileset> </configuration> <hbm2java jdk5="true"/> </hibernatetool> </target> I've had a look around on the internet and some people seem to do this (I think) using Ant within Maven and others with the Maven plugin. I'd prefer to avoid mixing Ant and Maven. Can anyone suggest a way to do this so that all of the .hbm.xml files are picked up and the code generation takes place as part of the Maven code generation build phase? Thanks! Adam.

    Read the article

  • Garmin Ant Agent USB sticks is not working on Windows 8

    - by VinnyG
    I have a garmin gps training watch that connect with Ant agent (http://www8.garmin.com/support/download_details.jsp?id=3741) but in my new install of windows 8 the USB drivers are not working anymore I get a device problem, I downloaded the latest drivers but it did not work. I also try to install it manualy but no more luck. I made a request to Garmin support but if some has a solution until they fix it, let me know!

    Read the article

  • How to get more details of a java compilation

    - by Farid
    Hi, We are using an ant script in order to build our application. I recently made a change in one jar required by our app. However, when running the ant script, the compilation fails and the error message shown let me think that the compiler is using a previous version of the jar. Also, compilation throug my IDE works fine. Manual compilation with the javac command and specifying my new jar works as well. When looking at the classpath used by ant to build, I can see that the jar seems to be the correct one. So I am a bit lost actually, don't know where to look at ... Any ideas ? I also wanted to know if this is possible to get the path of the jar javac is really using when compiling a particular class .. Thanks and regards

    Read the article

< Previous Page | 10 11 12 13 14 15 16 17 18 19 20 21  | Next Page >