anthill, jboss, ant and classpath
Leoš Urban <[email protected]> Tue, 10 Jul 2007 18:07:55 +0200
| Newsgroups | gmane.comp.java.anthill |
|---|---|
| Message-ID | <1184083675.28201.23.camel@centrix> |
Hello,
I have some problem and I don't know what is wrong.
I cannot add jar files to classpath of ANT.
<FAQ>
To add your own jar files to the classpath when executing Ant, copy
those jar files into the location pointed to by the "anthill.ant.home"
property.
</FAQ>
My ant.home for anthill:
$ cat /opt/anthill/projects/anthill.registry | grep ant.home
anthill.ant.home = lib/apache-ant-1.7.0
I have required JAR files in ANT directory:
$ ls /opt/anthill/lib/apache-ant-1.7.0/*.jar
/opt/anthill/lib/apache-ant-1.7.0/ejb3-persistence.jar
/opt/anthill/lib/apache-ant-1.7.0/jboss-ejb3x.jar
All files are readable by everyone, for our example is required
ejb3-persistence.jar only.
When I compile my file manually then it works -> file is correct:
$javac -classpath /opt/anthill/lib/apache-ant-1.7.0/ejb3-persistence.jar
Dluznik.java
But anthill fails:
-do-compile:
[javac] Compiling 1 source file
to /opt/anthill/work/Dluznici/Dluznici-ejb/build/ear-module
[javac] /opt/anthill/work/Dluznici/Dluznici-ejb/src/java/cz/qds/dluznici/ebs/Dluznik.java:14: package javax.persistence does not exist
...
Project has two additional parameters:
$cat /opt/anthill/projects/Dluznici.anthill | grep anthill.build
anthill.build.script = build.xml
anthill.build.tag = success
anthill.build.ant.params$1.value = -Dplatforms.JDK6.compiler=modern
anthill.build.ant.params$2.value =
-Dplatforms.JDK6.home=/usr/java/jdk1.6.0_01
One note - anthill runs under jboss, the same copy of library is in
jboss classpath - server/all/lib.
I am using JDK6, jboss 4.2.0.GA and Anthill 1.8.1.303.
There must be some problem with classpath because application without
additional jars are compiled by anthill without problem.
Thank you very much.
Leos