I solved the problem. It's a bug.

jakarta-turbine-maven/project.xml and
jakarta-turbine-maven/src/bin/forehead.conf refer to a different xerces.
project.xml says 2.0.2 (so 2.0.2 is downloaded), but forehead.conf says
2.2.1 which isn't found, and Forehead tries to make a URL out of it and
crashes on the line where it tries to do a new URL( line ).

    protected void loadFileOrUrl(String line,
                                 ForeheadClassLoader loader) throws
MalformedURLException
    {
        URL url = null;

        File file = new File( line );

        if ( file.exists() )
        {
            url = file.toURL();
        }
        else
        {
            url = new URL( line );
        }

        loader.addURL( url );
    }

The line variable has the value of a non-existant file (xerces-2.2.1.jar).

Updating project.xml to use xerces 2.2.1 fixes this bug.

Jason, would it be fair to assume that you couldn't reproduce this because
you hadn't done a clean build, and therefore (maybe) had both xerces jars in
place? ;-)

Cheers,
Aslak

> -----Original Message-----
> From: Aslak Helles�y [mailto:[EMAIL PROTECTED]]
> Sent: 29. november 2002 13:06
> To: Turbine Maven Users List
> Subject: RE: Problem running maven from CVS HEAD
>
>
> I tried to build on a Linux box, and get a similar error:
>
> clean-maven-home:
>    [delete] Deleting directory /usr/maven/bin
>     [mkdir] Created dir: /usr/maven/bin
>    [delete] Deleting directory /usr/maven/lib
>     [mkdir] Created dir: /usr/maven/lib
>    [delete] Deleting directory /usr/maven/plugins
>     [mkdir] Created dir: /usr/maven/plugins
>      [copy] Copying 49 files to /usr/maven
>      [copy] Copied 4 empty directories to /usr/maven
>      [echo]
>      [echo]
> +------------------------------------------------------------------+
>      [echo] |
> |
>      [echo] | B U I L D I N G  T H E  P L U G I N S
> |
>      [echo] |
> |
>      [echo]
> +------------------------------------------------------------------+
>      [echo]
>      [exec] java.net.MalformedURLException: no protocol:
> /usr/maven/lib/xerces-2.2.1.jar
>      [exec]     at java.net.URL.<init>(URL.java:579)
>      [exec]     at java.net.URL.<init>(URL.java:476)
>      [exec]     at java.net.URL.<init>(URL.java:425)
>      [exec]     at
> com.werken.forehead.Forehead.loadFileOrUrl(Forehead.java:401)
>      [exec]     at com.werken.forehead.Forehead.load(Forehead.java:322)
>      [exec]     at com.werken.forehead.Forehead.config(Forehead.java:245)
>      [exec]     at com.werken.forehead.Forehead.config(Forehead.java:131)
>      [exec]     at com.werken.forehead.Forehead.main(Forehead.java:571)
>      [echo]
>      [echo]
> +------------------------------------------------------------------+
>      [echo] |
> |
>      [echo] | I N S T A L L I N G  T H E  P L U G I N S
> |
>      [echo] |
> |
>      [echo]
> +------------------------------------------------------------------+
>      [echo]
>    [delete] Deleting directory
> /home/boss/jakarta-turbine-maven/bootstrap/install-phase1/plugins
>     [mkdir] Created dir:
> /home/boss/jakarta-turbine-maven/bootstrap/install-phase1/plugins
>      [echo]
>      [echo]
> +------------------------------------------------------------------+
>      [echo] |
> |
>      [echo] | B U I L D I N G  M A V E N  W I T H  I T S E L F
> |
>      [echo] |
> |
>      [echo]
> +------------------------------------------------------------------+
>      [echo]
>      [exec] java.net.MalformedURLException: no protocol:
> /usr/maven/lib/xerces-2.2.1.jar
>      [exec]     at java.net.URL.<init>(URL.java:579)
>      [exec]     at java.net.URL.<init>(URL.java:476)
>      [exec]     at java.net.URL.<init>(URL.java:425)
>      [exec]     at
> com.werken.forehead.Forehead.loadFileOrUrl(Forehead.java:401)
>      [exec]     at com.werken.forehead.Forehead.load(Forehead.java:322)
>      [exec]     at com.werken.forehead.Forehead.config(Forehead.java:245)
>      [exec]     at com.werken.forehead.Forehead.config(Forehead.java:131)
>      [exec]     at com.werken.forehead.Forehead.main(Forehead.java:571)
>
> clean-maven-home:
>    [delete] Deleting directory /usr/maven/bin
>     [mkdir] Created dir: /usr/maven/bin
>    [delete] Deleting directory /usr/maven/lib
>     [mkdir] Created dir: /usr/maven/lib
>    [delete] Deleting directory /usr/maven/plugins
>     [mkdir] Created dir: /usr/maven/plugins
>
> BUILD FAILED
> file:/home/boss/jakarta-turbine-maven/build-bootstrap.xml:284: Warning:
> Could not find file /home/boss/jakarta-turbine-maven/target/maven.jar to
> copy.
>
> The problem doesn't seem to be OS specific. Am I the only one??
>
> Aslak
>
> > -----Original Message-----
> > From: Jason van Zyl [mailto:[EMAIL PROTECTED]]
> > Sent: 29. november 2002 02:57
> > To: Turbine Maven Users List
> > Subject: Re: Problem running maven from CVS HEAD
> >
> >
> > On Thu, 2002-11-28 at 20:16, Aslak Helles�y wrote:
> > > I updated Maven from CVS HEAD on nov on nov. 29 GMT 01:00.
> > > I built it from scratch with ant -f build-bootstrap.xml.
> > >
> > > When I execute maven I get:
> > >
> > > java.net.MalformedURLException: unknown protocol: f
> > >         at java.net.URL.<init>(URL.java:586)
> > >         at java.net.URL.<init>(URL.java:476)
> > >         at java.net.URL.<init>(URL.java:425)
> > >         at
> com.werken.forehead.Forehead.loadFileOrUrl(Forehead.java:401)
> > >         at com.werken.forehead.Forehead.load(Forehead.java:322)
> > >         at com.werken.forehead.Forehead.config(Forehead.java:245)
> > >         at com.werken.forehead.Forehead.config(Forehead.java:131)
> > >         at com.werken.forehead.Forehead.main(Forehead.java:571)
> > >
> > > My environment:
> > > j2sdk1.4.1_01
> > > Win 2000
> > > MAVEN_HOME=F:\Maven
> > > JAVA_HOME=E:\Apps\j2sdk1.4.1_01
> > > PATH=F:\Maven\bin;E:\Apps\j2sdk1.4.1_01\bin;D:\WINNT\system32;D:\WINNT
> > >
> > > I have tried both the maven.bat (from a command prompt) and
> > maven (from a
> > > cygwin/bash prompt), so I guess the problem is somewhere else.
> > >
> > > Everything worked fine a couple of days ago. Does anybody have
> > an idea what
> > > might be wrong?
> >
> > I can't really help for anything from windows but I haven't had any
> > difficulty from Linux for the past few days. When I get the next round
> > of refactoring in I'll try to help you at that point.
> >
> > Dion, you having problems bootstrapping?
> >
> > > Cheers,
> > > Aslak
> > >
> > >
> > > --
> > > To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
> --
> jvz.
>
> Jason van Zyl
> [EMAIL PROTECTED]
> http://tambora.zenplex.org
>
> In short, man creates for himself a new religion of a rational
> and technical order to justify his work and to be justified in it.
>
>   -- Jacques Ellul, The Technological Society
>
>
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to