I'm new to ant and maven, so I'm sure this is a silly
question....still, I'm stuck.
I'm using the rpm install of ant/maven/etc for Fedora 16. I'm trying
to build a project that requires ant and maven, and uses maven-ant-tasks
(I have maven-ant-tasks-2.1.1-8.fc16 installed), however, I always
receive the following error:
BUILD FAILED
/opt/devel/test/build.xml:4: Problem: failed to create task or type
antlib:org.apache.maven.artifact.ant:remoteRepository
Cause: The name is undefined.
I'm pretty sure I have some sort of configuration error, but after
several hours crawling the examples and docs, I'm just not making any
progress... I don't have CLASSPATH defined, and have tried using ant
-noclasspath with the same results.
I've linked the /usr/share/java/maven-ant-tasks.jar (from the rpm) into
my ~/.ant/lib directory, and reduced the build.xml file to the following
(this file uses the same syntax as the project I'm trying to build, and
produces the same error):
--- build.xml
<?xml version="1.0" ?>
<project name="Test" default="help" basedir="."
xmlns:artifact="antlib:org.apache.maven.artifact.ant">
<artifact:remoteRepository id="my.repository"
url="http://example.com">
<snapshots updatePolicy="always" />
</artifact:remoteRepository>
<target name="help">
<echo message="Test"/>
</target>
</project>
---- end build.xml
This appears to follow the example on
http://maven.apache.org/ant-tasks/installation.html which has the
following:
<project ... xmlns:artifact="antlib:org.apache.maven.artifact.ant">
...
</project>
The output of ant -diagnostics are:
------- Ant diagnostics report -------
Apache Ant(TM) version 1.8.2 compiled on July 6 2011
-------------------------------------------
Implementation Version
-------------------------------------------
core tasks : 1.8.2 in file:/usr/share/java/ant.jar
-------------------------------------------
ANT PROPERTIES
-------------------------------------------
ant.version: Apache Ant(TM) version 1.8.2 compiled on July 6 2011
ant.java.version: 1.6
Is this the Apache Harmony VM? no
Is this the Kaffe VM? no
Is this gij/gcj? no
ant.core.lib: /usr/share/java/ant.jar
ant.home: /usr/share/ant
-------------------------------------------
ANT_HOME/lib jar listing
-------------------------------------------
ant.home: /usr/share/ant
ant-junit.jar (102000 bytes)
ant.jar (1935105 bytes)
ant-bootstrap.jar (19759 bytes)
ant-launcher.jar (12307 bytes)
-------------------------------------------
USER_HOME/.ant/lib jar listing
-------------------------------------------
user.home: /opt/devel
maven-ant-tasks.jar (61063 bytes)
-------------------------------------------
Tasks availability
-------------------------------------------
p4reopen : Not Available (the implementation class is not present)
...(cut short for simplicity)
ddcreator : Not Available (the implementation class is not present)
A task being missing/unavailable should only matter if you are trying
to use it
-------------------------------------------
org.apache.env.Which diagnostics
-------------------------------------------
Not available.
Download it at http://xml.apache.org/commons/
-------------------------------------------
XML Parser information
-------------------------------------------
XML Parser : org.apache.xerces.jaxp.SAXParserImpl
XML Parser Location: file:/usr/share/java/xerces-j2-2.11.0.jar
Namespace-aware parser :
org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser
Namespace-aware parser Location:
file:/usr/share/java/xerces-j2-2.11.0.jar
-------------------------------------------
XSLT Processor information
-------------------------------------------
XSLT Processor :
com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl
XSLT Processor Location: unknown
-------------------------------------------
System properties
-------------------------------------------
java.runtime.name : OpenJDK Runtime Environment
sun.boot.library.path :
/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/lib/amd64
java.vm.version : 20.0-b11
ant.library.dir : /usr/share/ant/lib
java.vm.vendor : Sun Microsystems Inc.
java.vendor.url : http://java.sun.com/
path.separator : :
java.vm.name : OpenJDK 64-Bit Server VM
file.encoding.pkg : sun.io
user.country : US
sun.java.launcher : SUN_STANDARD
sun.os.patch.level : unknown
java.vm.specification.name : Java Virtual Machine Specification
user.dir : /opt/devel/test
java.runtime.version : 1.6.0_22-b22
java.awt.graphicsenv : sun.awt.X11GraphicsEnvironment
java.endorsed.dirs :
/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/lib/endorsed
os.arch : amd64
java.io.tmpdir : /tmp
line.separator :
java.vm.specification.vendor : Sun Microsystems Inc.
os.name : Linux
ant.home : /usr/share/ant
sun.jnu.encoding : UTF-8
java.library.path :
/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/lib/amd64/server:/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/lib/amd64:/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/../lib/amd64:/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
java.specification.name : Java Platform API Specification
java.class.version : 50.0
sun.management.compiler : HotSpot 64-Bit Tiered Compilers
os.version : 3.1.5-6.fc16.x86_64
user.home : /opt/devel
user.timezone :
java.awt.printerjob : sun.print.PSPrinterJob
file.encoding : UTF-8
java.specification.version : 1.6
user.name : devel
java.class.path :
/usr/share/java/ant.jar:/usr/share/java/ant-launcher.jar:/usr/share/java/jaxp_parser_impl.jar:/usr/share/java/xml-commons-apis.jar:/usr/share/java/ant/ant-contrib.jar:/usr/share/java/cobertura.jar:/usr/share/java/junit4.jar:/usr/share/java/log4j.jar:/usr/share/java/oro.jar:/usr/share/java/xerces-j2.jar:/usr/share/java/jtidy.jar:/usr/share/java/ant/ant-junit.jar:/usr/lib/jvm/java/lib/tools.jar:/opt/devel/.ant/lib/maven-ant-tasks.jar:/usr/share/ant/lib/ant-junit.jar:/usr/share/ant/lib/ant.jar:/usr/share/ant/lib/ant-bootstrap.jar:/usr/share/ant/lib/ant-launcher.jar
java.vm.specification.version : 1.0
sun.arch.data.model : 64
java.home : /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre
sun.java.command : org.apache.tools.ant.launch.Launcher -cp
-diagnostics
java.specification.vendor : Sun Microsystems Inc.
user.language : en
java.vm.info : mixed mode
java.version : 1.6.0_22
java.ext.dirs :
/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/lib/ext:/usr/java/packages/lib/ext
sun.boot.class.path :
/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/lib/resources.jar:/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/lib/rt.jar:/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/lib/sunrsasign.jar:/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/lib/jsse.jar:/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/lib/jce.jar:/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/lib/charsets.jar:/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/lib/netx.jar:/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/lib/plugin.jar:/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/lib/rhino.jar:/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/lib/modules/jdk.boot.jar:/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/classes
java.vendor : Sun Microsystems Inc.
file.separator : /
java.vendor.url.bug : http://java.sun.com/cgi-bin/bugreport.cgi
sun.cpu.endian : little
sun.io.unicode.encoding : UnicodeLittle
sun.cpu.isalist :
-------------------------------------------
Temp dir
-------------------------------------------
Temp dir is /tmp
Temp dir is writeable
Temp dir alignment with system clock is -536 ms
-------------------------------------------
Locale information
-------------------------------------------
Timezone Pacific Standard Time offset=-28800000
-------------------------------------------
Proxy information
-------------------------------------------
Java1.5+ proxy settings:
Direct connection
Any suggestions on debugging this problem? I've tried ant -d -v but
they don't provide any useful insights...
Thanks,
Scott
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org