The upcoming versions of the site-plugin and project-info-reports-plugin has a minimum requirement of Maven 2.0.6 for this reason.

Hervé BOUTEMY wrote:
it is a known limitation that before Maven 2.0.6, plexus-utils version was tied to Maven Core and could not be changed by plugins launched: it has been fixed in Maven 2.0.6 with MNG-2892 that perfectly explains why you have problems when using Maven 2.0.4 but not when using Maven 2.0.6

Hervé

Le jeudi 25 octobre 2007, Jon Card a écrit :
I put this line in the code before it broke:

System.out.println("URL: " +
this.getClass().getClassLoader().getResource("org/codehaus/plexus/util")
);

and it printed:

URL:
jar:file:/c:/opt/maven-2.0.4/core/plexus-utils-1.1.jar!/org/codehaus/ple
xus/util

I've upgraded my maven installation to 2.0.7 and it works. This doesn't
explain why it worked when it was retrieved from the Maven repository
(there was only one version of doxia in the repository), but it solves
my problem. If you want me to run more tests, let me know.

Jonathan Card

-----Original Message-----
From: Jon Card [mailto:[EMAIL PROTECTED]
Sent: Wednesday, October 24, 2007 6:49 PM
To: Maven Developers List
Subject: RE: Building old versions

Forget the question at the end of my last email. The call:

ReaderFactory.newXmlReader(bookDescriptor);

in DefaultBookIo#readBook(File) produces a NoClassDefFoundError:
org/codehaus/plexus/util/ReaderFactory. I don't think it can find that
jar at all when I build the plugin.

I'm simple running "mvn clean install" from either the project directory
(the parent directory of "doxia-book") or from "doxia-book". Is that the
correct thing to do?

Jonathan Card

-----Original Message-----
From: Jon Card [mailto:[EMAIL PROTECTED]
Sent: Wednesday, October 24, 2007 6:34 PM
To: Maven Developers List
Subject: RE: Building old versions

I'm afraid I'm getting the same exception, although the Maven2 plugin
for Eclipse is no longer showing me plexus-utils:1.0.2 and
plexus-utils:1.4.5.

The unit tests are running and I'm getting the output for an APT source
to docbook target book rendering, which is what I'm trying to do in my
application, but when I run "mvn clean pre-site" in my app, I still get:

[INFO] Trace
java.lang.NoClassDefFoundError:
org/codehaus/plexus/util/xml/XmlStreamReader
        at
org.apache.maven.doxia.book.services.io.DefaultBookIo.readBook(DefaultBo
okIo.java:65)
        at
org.apache.maven.doxia.book.DefaultBookDoxia.loadBook(DefaultBookDoxia.j
ava:75)
        at
org.apache.maven.doxia.plugin.DoxiaRenderBooksMojo.execute(DoxiaRenderBo
oksMojo.java:189)
        at
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginMa
nager.java:412)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Default
LifecycleExecutor.java:534)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifec
ycle(DefaultLifecycleExecutor.java:475)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultL
ifecycleExecutor.java:454)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandle
Failures(DefaultLifecycleExecutor.java:306)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(
DefaultLifecycleExecutor.java:273)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifec
ycleExecutor.java:140)
        at
org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:256)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at
org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
        at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
        at
org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)

        at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
[INFO]
------------------------------------------------------------------------

Line 65 in DefaultBookIo, the site of the exception, reads:

return new BookModelXpp3Reader().read( new FileReader( bookDescriptor ),
true);

When I refactory that to:

BookModelXpp3Reader bookReader = new BookModelXpp3Reader();
FileReader fileReader = new FileReader( bookDescriptor );
return bookReader.read( fileReader, true );

the exception is thrown in the first line (I shifted the lines about to
make sure I was using what I built, not the old build).

The only time I can see that it would try to load the class
XmlStreamReader is because BookModelXpp3Reader imports
"org.codehaus.plexus.util.ReaderFactory", which has static methods that
reference "XmlStreamReader". It doesn't make a lot of sense to me that
it would try to load "XmlStreamReader" in order to instantiate
BookModelXpp3Reader without at least a "static {}" block in
"ReaderFactory", but I can't figure anything else out. The problem is,
"ReaderFactory" is in the same jar as "XmlStreamReader", so if it finds
out it needs "XmlStreamReader", it has loaded "ReaderFactory" and should
be able to find "XmlStreamReader", right?

Jonathan Card

-----Original Message-----
From: Dennis Lundberg [mailto:[EMAIL PROTECTED]
Sent: Wednesday, October 24, 2007 3:11 PM
To: Maven Developers List
Subject: Re: Building old versions

Unfortunately there was a problem with the dependencies specified in
1.0-alpha-9. I'm working on getting a quick 1.0-alpha-10 out the door
that fixes these problems. It would be really helpful if you could try
the latest 1.0-alpha-10-SNAPSHOT to see if that solves your problems.

Jon Card wrote:
I'm trying to add something to the most recent release of
org.apache.maven.doxia:doxia, 1.0-alpha-9. My POM works find when I
get

the plugin from the repository, but when I check out the code tagged
as

1.0-alpha-9, build it, and install it, I get an exception:



[INFO] Trace

java.lang.NoClassDefFoundError:
org/codehaus/plexus/util/xml/XmlStreamReader

        at
org.apache.maven.doxia.book.services.io.DefaultBookIo.readBook(DefaultBo
okIo.java:65)

        at
org.apache.maven.doxia.book.DefaultBookDoxia.loadBook(DefaultBookDoxia.j
ava:75)

        at
org.apache.maven.doxia.plugin.DoxiaRenderBooksMojo.execute(DoxiaRenderBo
oksMojo.java:189)

        at
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginMa
nager.java:412)

        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Default
LifecycleExecutor.java:534)

        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifec
ycle(DefaultLifecycleExecutor.java:475)

        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultL
ifecycleExecutor.java:454)

        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandle
Failures(DefaultLifecycleExecutor.java:306)

        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(
DefaultLifecycleExecutor.java:273)

        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifec
ycleExecutor.java:140)

        at
org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)

        at
org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)

        at org.apache.maven.cli.MavenCli.main(MavenCli.java:256)

        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)

        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)

        at java.lang.reflect.Method.invoke(Method.java:585)

        at
org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)

        at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)

        at
org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)



        at org.codehaus.classworlds.Launcher.main(Launcher.java:375)

[INFO]
------------------------------------------------------------------------

The only reference I've found to such an exception in the past is to
more recent builds, where a dependency had to be added. This has a
different stack trace and the plugin works in the released version. Am
I

not building it right? The exception happens when I check out the
HEAD,

as well, and with a clean check-out (without my changes, which are in
a

different part of the code).





Jon Card
Crown Partners
O 303.350.1115
M 303.916.3966
F 303.770.9054
[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>











Crown Partners is pleased to announce the acquisition of Phoenix
Systems, Platform Dynamics US, and Platform Dynamics Europe
(www.platformdynamics.net <http://www.platformdynamics.net/>). This
integration reiterates our commitment to Enterprise Content Management

software products, premier services and global expansion.

Crown is also identified as America's 101^st fastest growing,
privately

held, software company in 2007 by Inc Magazine's Inc500 list.  See us
at

www.crownpartners.com <http://www.crownpartners.com/>. This is the
second year in a row that Crown has been identified in the prestigious

Inc500 list.



This communication and all accompanying attachments and related
information and data is confidential and proprietary information of
Crown Partners, LLC.  This communication is intended solely for
receipt

by the intended recipient. If you are not the intended recipient, you
are strictly prohibited from disclosing, copying, distributing or
using

any of this information. If you received this communication in error,
please contact the sender immediately and destroy the material in its
entirety, whether electronic or hard copy.  This communication may
contain nonpublic information about individuals and businesses subject

to the restrictions of the Gramm-Leach-Bliley Act.  You may not
directly

or indirectly reuse or redisclose such information for any purpose
other

than to provide the services for which you are receiving the
information. 7750 Paragon Rd., Dayton OH 45459.



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




--
Dennis Lundberg


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

Reply via email to