ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Loughran <ste...@apache.org>
Subject Re: Ant: URI has an authority component
Date Fri, 27 Apr 2007 11:08:37 GMT
Denis Bessmertnyj wrote:
> Hi All,
> 
> Ant in Anger.
> 
> Here is my simple build.xml
> 
> <project name="main" basedir=".">
>    <task name="main">
>        <echo>Hello, Hello</echo>
>    </task>
> </project>
> 
> I attach the next jars
> ant-1.7.0.jar;ant-launcher-1.7.0.jar;catalina-ant.jar;activation.jar;ant-javamail-1.7.0.jar;junit.jar;ant-junit-1.7.0.jar;

> 
> 
> And I receive
> 
> BUILD FAILED
> java.lang.IllegalArgumentException: URI has an authority component
>        at java.io.File.<init>(Unknown Source)
>        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native 
> Method)
>        at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown 
> Source)
>        at 
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
>        at java.lang.reflect.Constructor.newInstance(Unknown Source)
>        at org.apache.tools.ant.launch.Locator.fromURI(Locator.java:165)
>        at 
> org.apache.tools.ant.launch.Locator.getResourceSource(Locator.java:119)
>        at 
> org.apache.tools.ant.launch.Locator.getClassSource(Locator.java:90)
>        at org.apache.tools.ant.Project.setAntLib(Project.java:313)
>        at org.apache.tools.ant.Project.initProperties(Project.java:309)
>        at org.apache.tools.ant.Project.init(Project.java:295)
>        at org.apache.tools.ant.Main.runBuild(Main.java:663)
>        at org.apache.tools.ant.Main.startAnt(Main.java:199)
>        at org.apache.tools.ant.Main.start(Main.java:161)
>        at org.apache.tools.ant.Main.main(Main.java:250)

     private void setAntLib() {
         File antlib = org.apache.tools.ant.launch.Locator.getClassSource(
             Project.class);
         if (antlib != null) {
             setPropertyInternal(MagicNames.ANT_LIB, 
antlib.getAbsolutePath());
         }
     }

Ant is failing to extract the base directory of where the classes are 
running from, which implies that it cannot create a URL/URI from: 
%JCLASSES_LIB_DIR%\ant-1.7.0.jar

What is %ANT_CLASSPATH% ? And please, replies to the group, not me direct.

-steve

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message