Hallo,
ich versuche mein Projekt mit ant bauen zu lassen.
Altenativ hatte ich für das Classpath Tag auch probiert:
Mein Verzeichnis sieht so aus:
./
build.xml
src/*.java
build/
lib/log4j-1.2.14.jar
lib/itext-1.3.1.jar
ant -v liefert den unten stehenden classpath and dann viele Fehler der Art
3: package org.apache.log4j does not exist
[javac] import org.apache.log4j.*;
-
[javac] '-classpath'
[javac] '
C:\project\build;
C:\Program Files\eclipse\plugins\org.apache.ant_1.6.5\lib\ant.jar;C:\Program Files\eclipse\plugins\org.apache.ant_1.6.5\lib\ant-antlr.jar;C:\Program Files\eclipse\plugins\org.apache.ant_1.6.5\lib\ant-apache-bcel.jar;C:\Program Files\eclipse\plugins\org.apache.ant_1.6.5\lib\ant-apache-bsf.jar;C:\Program Files\eclipse\plugins\org.apache.ant_1.6.5\lib\ant-apache-log4j.jar;C:\Program Files\eclipse\plugins\org.apache.ant_1.6.5\lib\ant-apache-oro.jar;C:\Program Files\eclipse\plugins\org.apache.ant_1.6.5\lib\ant-apache-regexp.jar;C:\Program Files\eclipse\plugins\org.apache.ant_1.6.5\lib\ant-apache-resolver.jar;C:\Program Files\eclipse\plugins\org.apache.ant_1.6.5\lib\ant-commons-logging.jar;C:\Program Files\eclipse\plugins\org.apache.ant_1.6.5\lib\ant-commons-net.jar;C:\Program Files\eclipse\plugins\org.apache.ant_1.6.5\lib\ant-icontract.jar;C:\Program Files\eclipse\plugins\org.apache.ant_1.6.5\lib\ant-jai.jar;C:\Program Files\eclipse\plugins\org.apache.ant_1.6.5\lib\ant-javamail.jar;C:\Program Files\eclipse\plugins\org.apache.ant_1.6.5\lib\ant-jdepend.jar;C:\Program Files\eclipse\plugins\org.apache.ant_1.6.5\lib\ant-jmf.jar;C:\Program Files\eclipse\plugins\org.apache.ant_1.6.5\lib\ant-jsch.jar;C:\Program Files\eclipse\plugins\org.apache.ant_1.6.5\lib\ant-junit.jar;C:\Program Files\eclipse\plugins\org.apache.ant_1.6.5\lib\ant-launcher.jar;C:\Program Files\eclipse\plugins\org.apache.ant_1.6.5\lib\ant-netrexx.jar;C:\Program Files\eclipse\plugins\org.apache.ant_1.6.5\lib\ant-nodeps.jar;C:\Program Files\eclipse\plugins\org.apache.ant_1.6.5\lib\ant-starteam.jar;C:\Program Files\eclipse\plugins\org.apache.ant_1.6.5\lib\ant-stylebook.jar;C:\Program Files\eclipse\plugins\org.apache.ant_1.6.5\lib\ant-swing.jar;C:\Program Files\eclipse\plugins\org.apache.ant_1.6.5\lib\ant-trax.jar;C:\Program Files\eclipse\plugins\org.apache.ant_1.6.5\lib\ant-vaj.jar;C:\Program Files\eclipse\plugins\org.apache.ant_1.6.5\lib\ant-weblogic.jar;C:\Program Files\eclipse\plugins\org.apache.ant_1.6.5\lib\ant-xalan1.jar;C:\Program Files\eclipse\plugins\org.apache.ant_1.6.5\lib\ant-xslp.jar;C:\Program Files\eclipse\configuration\org.eclipse.osgi\bundles\10\1\.cp\lib\remoteAnt.jar;C:\Program Files\Java\jdk1.6.0\lib\tools.jar;C:\Program Files\eclipse\plugins\org.eclipse.swt.win32.win32.x86_3.2.2.v3235a.jar'
Offensichtlich nicht mein classpath den ich gerne vorgeben würde.
Was mache ich falsch?
Viele Grüße, Lars
ich versuche mein Projekt mit ant bauen zu lassen.
Code:
<?xml version="1.0"?>
<project name="compile" default="run" basedir=".">
<property name="src" value="src" />
<property name="build" value="build" />
<property name="dist" value="dist" />
<property name="lib" value="lib" />
<target name="compile" >
<echo> Compile the java code </echo>
<javac srcdir="${src}" destdir="${build}" includes="**/*.java" />
<classpath>
<pathelement location="${lib}/"/>
</classpath>
</target>
Altenativ hatte ich für das Classpath Tag auch probiert:
Code:
<classpath>
<pathelement path = "${lib}/log4j-1.2.14.jar:${lib}/itext-1.3.1.jar"/>
</classpath>
Mein Verzeichnis sieht so aus:
./
build.xml
src/*.java
build/
lib/log4j-1.2.14.jar
lib/itext-1.3.1.jar
ant -v liefert den unten stehenden classpath and dann viele Fehler der Art
3: package org.apache.log4j does not exist
[javac] import org.apache.log4j.*;
-
[javac] '-classpath'
[javac] '
C:\project\build;
C:\Program Files\eclipse\plugins\org.apache.ant_1.6.5\lib\ant.jar;C:\Program Files\eclipse\plugins\org.apache.ant_1.6.5\lib\ant-antlr.jar;C:\Program Files\eclipse\plugins\org.apache.ant_1.6.5\lib\ant-apache-bcel.jar;C:\Program Files\eclipse\plugins\org.apache.ant_1.6.5\lib\ant-apache-bsf.jar;C:\Program Files\eclipse\plugins\org.apache.ant_1.6.5\lib\ant-apache-log4j.jar;C:\Program Files\eclipse\plugins\org.apache.ant_1.6.5\lib\ant-apache-oro.jar;C:\Program Files\eclipse\plugins\org.apache.ant_1.6.5\lib\ant-apache-regexp.jar;C:\Program Files\eclipse\plugins\org.apache.ant_1.6.5\lib\ant-apache-resolver.jar;C:\Program Files\eclipse\plugins\org.apache.ant_1.6.5\lib\ant-commons-logging.jar;C:\Program Files\eclipse\plugins\org.apache.ant_1.6.5\lib\ant-commons-net.jar;C:\Program Files\eclipse\plugins\org.apache.ant_1.6.5\lib\ant-icontract.jar;C:\Program Files\eclipse\plugins\org.apache.ant_1.6.5\lib\ant-jai.jar;C:\Program Files\eclipse\plugins\org.apache.ant_1.6.5\lib\ant-javamail.jar;C:\Program Files\eclipse\plugins\org.apache.ant_1.6.5\lib\ant-jdepend.jar;C:\Program Files\eclipse\plugins\org.apache.ant_1.6.5\lib\ant-jmf.jar;C:\Program Files\eclipse\plugins\org.apache.ant_1.6.5\lib\ant-jsch.jar;C:\Program Files\eclipse\plugins\org.apache.ant_1.6.5\lib\ant-junit.jar;C:\Program Files\eclipse\plugins\org.apache.ant_1.6.5\lib\ant-launcher.jar;C:\Program Files\eclipse\plugins\org.apache.ant_1.6.5\lib\ant-netrexx.jar;C:\Program Files\eclipse\plugins\org.apache.ant_1.6.5\lib\ant-nodeps.jar;C:\Program Files\eclipse\plugins\org.apache.ant_1.6.5\lib\ant-starteam.jar;C:\Program Files\eclipse\plugins\org.apache.ant_1.6.5\lib\ant-stylebook.jar;C:\Program Files\eclipse\plugins\org.apache.ant_1.6.5\lib\ant-swing.jar;C:\Program Files\eclipse\plugins\org.apache.ant_1.6.5\lib\ant-trax.jar;C:\Program Files\eclipse\plugins\org.apache.ant_1.6.5\lib\ant-vaj.jar;C:\Program Files\eclipse\plugins\org.apache.ant_1.6.5\lib\ant-weblogic.jar;C:\Program Files\eclipse\plugins\org.apache.ant_1.6.5\lib\ant-xalan1.jar;C:\Program Files\eclipse\plugins\org.apache.ant_1.6.5\lib\ant-xslp.jar;C:\Program Files\eclipse\configuration\org.eclipse.osgi\bundles\10\1\.cp\lib\remoteAnt.jar;C:\Program Files\Java\jdk1.6.0\lib\tools.jar;C:\Program Files\eclipse\plugins\org.eclipse.swt.win32.win32.x86_3.2.2.v3235a.jar'
Offensichtlich nicht mein classpath den ich gerne vorgeben würde.
Was mache ich falsch?
Viele Grüße, Lars