I compile and run my program in Eclipse and everything works fine, but when I package it with Ant and run it, I get this error:
Exception in thread "main" java.lang.NoClassDefFoundError: org/supercsv/io/ICsvB
eanReader
Caused by: java.lang.ClassNotFoundException: org.supercsv.io.ICsvBeanReader
at java.net.URLClassLoader$1.run(Un...
I'm about to create some complex Ant build files and I wanted find out what people think are best practices for naming ant tasks. It is going to build some Java, C++, compresses JavaScript, generate docs and lots more.
What tasks do you always add to an any script? Things like clean, build?
How to you name targets that make up a single...
I have the following in my build.xml:
<target name="compile.baz" depends="init">
<javac destdir="${build.dir}/classes" debug="on">
<compilerarg value="-Xlint:deprecation"/>
<src>
<pathelement location="${src.dir}/com/foo/bar/baz/" />
<pathelement location="${src.dir}/com/foo/bar/quux/" />
<!-- N...
Hi, I am getting below error when running a target of ANT script. Error message saying that "server certificate verification is failed". Please help how to remove this problem. I am working in Windows XP.
C:\apache-ant-1.8.1>ant checkout
Buildfile: C:\Program Files\Java\apache-ant-1.8.1\build.xml
checkout:
[svn] Using command line i...
Hello everyone,
My ultimate goal is the following : delete all content from a directory that is older than a given date.
What I'm willing to achieve is removing all backup directories that are more than 7 days old compared to today's date. I could check the directories based on their OS timestamp (Windows 2003) or the directory name wh...
Hey everyone!
I've been working on a project in Eclipse and everything's been going smooth except for some Ant issues along the way.
My code compiles perfectly and does exactly what I want it to do, but, when it's in a jar, I get the error:
Exception in thread "main" java.lang.NoSuchMethodError: main
Main definitely exists in the f...
I would like to know how to do something in ant(1) that's equivalent to a particular makefile(4) rule. The makefile(4) rule does the following: 1) starts a process that doesn't terminate and that writes one line to its standard output stream; 2) reads the line from the process; 3) constructs a file using the line; and 4) starts a second...
I have an Ant build file where I compile the Java source code of the application and of the tests, instrument the application classes, run JUnit tests and generate JUnit and Emma code coverage reports. The JUnit task is given the path to the instrumented classes.
The problem is that the interfaces are not instrumented (Emma FAQ) but I u...
Say I'd like to set some variables if the name of an ant's target contains certain words. Is this possible? Can I obtain the current executed target's name?
EDIT: I tried running ant with -d, and I noticed an environment variable TEMP_A which seems to hold the current target's name. I wonder, will this work across different ant versions...
I want to execute .sql file at /x/y/z location of a UNIX server, using ANT script from my local Windows XP system. The .sql files are at UNIX server.
I have used the below ant target from my Windows XP system:
<target name="execute" >
<sshexec host="hostname"
username="UNIX system username"
keyfile="/export/home/appldev...
can anyone let me know how to copy policy.xml and some xml file to META-INF of the EAR file while creating EAR file using ANT script.
sample
Thanks in Advance.
...
How to exclude archive name from file hierarchy after ant unzip task?
example in folder c:\temp should be extracted all files from archive, but after call ant unzip for archive t.zip I have result c:\temp\t\file.tmp
...
jarsigner: Certificate chain not found for: csi.keystore. csi.keystore must ref
erence a valid KeyStore key entry containing a private key and corresponding pub
lic key certificate chain..
who has idea? thanks...
...
In an ant script, I would like to compile only certain packages e.g.
com.example.some_package.foo
com.example.some_package.bar
This is what I want to do, but it doesn't seem to work, because property substitution doesn't seem to work in the <include> tag:
<property name="ROOT_PKG_PATH" location="com/example/some_package"/>
...
<...
I'm getting an error when trying to build a flex4 project with Ant. This code works when i don't have a custom namespace for exporting CustomComponent (aka: it builds just fine normally) - but as soon as i add the namespace and include-namespaces, i get the following error:
[compc] CustomComponent.mxml(235): Error: Could not resolve <m...
Is there a way to run an svn status command from ant without seeing the whole output?
I'm currently using the following:
<svn><status path="." revisionProperty="build.number" /></svn>
Bottom line, i'm trying to quietly get the svn revision number and for some reason I can't use the "info" tag (I get "svn doesn't support nested info el...
Hello internet,
I have been looking for the past two hours for a script to reload my web app.
I'm using Tomcat on a windows server 2003.
I know that there is a link to reload
your web app, but i'm wondering if i
can automate the process to reload my
web app once every 8 hours.
I would really appreciate if you could give me hint or ...
I want to execute a UNIX command from my local Windows XP system using ANT script. UNIX system is a remote server.
I have tried the following:
<target name="execute" >
<sshexec host="host IP"
username="uname"
password="pass"
commandResource="sh abc.sh"/>
</target>
but got the error below:
BUILD FAILED
..\bui...
I've written an ant task that extracts the classpath of a project form eclipse's .classpath file - so I don't need to maintain the project's dependencies both in eclipse and in my ant file.
This ant task works great and it makes my compilation ant scripts to be very elegant, short, and the most important thing maintainable.
In Ecli...
Depending on the build exit status, i would like to change the background color to green or red.
How do i achieve this with Apache Ant and windows?
...