Hi.
I'm trying why HEAD Maven is failing so badly on my machine
(Linux + JDK 1.4.1_01).
AFAICT execution of any goal that has <attainGoal> invocation
uncodintionaly fails with the following stacktrace:
[ERROR] java.lang.reflect.InvocationTargetException
[ERROR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
[ERROR] at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[ERROR] at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[ERROR] at java.lang.reflect.Method.invoke(Method.java:324)
[ERROR] at com.werken.forehead.Forehead.run(Forehead.java:543)
[ERROR] at com.werken.forehead.Forehead.main(Forehead.java:573)
[ERROR] Caused by: javax.xml.parsers.FactoryConfigurationError: Provider
org.apache.xerces.jaxp.SAXParserFactoryImpl not found
[ERROR] at
javax.xml.parsers.SAXParserFactory.newInstance(SAXParserFactory.java:93)
[ERROR] at
org.apache.maven.jelly.JellyUtils.compileScript(JellyUtils.java:193)
[ERROR] at
org.apache.maven.MavenUtils.getJellyProject(MavenUtils.java:207)
[ERROR] at
org.apache.maven.MavenUtils.getProject(MavenUtils.java:169)
[ERROR] at
org.apache.maven.MavenUtils.getProject(MavenUtils.java:143)
[ERROR] at
org.apache.maven.plugin.PluginManager.loadPlugin(PluginManager.java:887)
[ERROR] at
org.apache.maven.plugin.PluginManager.prepForGoal(PluginManager.java:663)
[ERROR] at
org.apache.maven.jelly.tags.LazyAttainGoalTag.doTag(LazyAttainGoalTag.java:105)
[ERROR] at
org.apache.commons.jelly.impl.TagScript.run(TagScript.java:277)
Commenting out the <attainGoal> tags fixes the problem. I found the
following comment preceeding a Xerces depencency declaration in Cactus
plugin's project.xml that seems to be related to this problem:
<!-- Should not be needed but it seems there is a bug with Maven when
junit dependency is added -->
Alas, adding it to the site plugin's project.xml (where I've performed
my tests) didn't help at all. Tweaking the <classloader> property din't
help either (OK, I'dont really know if it had a chance of changing
anything...)
I was also trying to make activity plugin work. I noticed the following
problems:
1) activity plugin uses ChangeLog class that is contained in the
changelog plugin. When trying to define a jellybean
(plugins-build/activity/plugin.jelly #28) it's not able to load the
class and therefore blows up with:
ERROR] com.werken.werkz.UnattainableGoalException: Unable to obtain goal
[activity:generate] -- Could not find class:
org.apache.maven.changelog.ChangeLog using ClassLoader: null File: null
At tag <define:jellybean>: line: 32 column: 13
[ERROR] at com.werken.werkz.Goal.fire(Goal.java:639)
[ERROR] at com.werken.werkz.Goal.attain(Goal.java:568)
[ERROR] at com.werken.werkz.Goal.attainPrecursors(Goal.java:481)
[ERROR] at com.werken.werkz.Goal.attain(Goal.java:566)
[ERROR] at org.apache.maven.Maven.runGoals(Maven.java:467)
[ERROR] at org.apache.maven.Maven.attainGoals(Maven.java:381)
[ERROR] at org.apache.maven.cli.App.doMain(App.java:551)
[ERROR] at org.apache.maven.cli.App.main(App.java:1096)
[ERROR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
[ERROR] at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[ERROR] at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[ERROR] at java.lang.reflect.Method.invoke(Method.java:324)
[ERROR] at com.werken.forehead.Forehead.run(Forehead.java:543)
[ERROR] at com.werken.forehead.Forehead.main(Forehead.java:573)
[ERROR] org.apache.commons.jelly.JellyException: Could not find class:
org.apache.maven.changelog.ChangeLog using ClassLoader: null File: null
At tag <define:jellybean>: line: 32 column: 13
[ERROR] at
org.apache.commons.jelly.tags.define.BeanTag.doTag(BeanTag.java:149)
I solved it by adding a dependency on changelog plugin and
commons-logging, which changelg itself depends on:
--8<-----------------------------------------------------------------
--- project.xml.orig 2002-12-05 15:13:54.000000000 +0100
+++ project.xml 2002-12-05 15:11:21.000000000 +0100
@@ -64,6 +64,23 @@
</roles>
</developer>
</developers>
+
+ <dependencies>
+
+ <dependency>
+ <id>maven+changelog-plugin</id>
+ <version>1.2-SNAPSHOT</version>
+ <properties>
+ <classloader>root.maven</classloader>
+ </properties>
+ </dependency>
+
+ <dependency>
+ <id>commons-logging</id>
+ <version>1.0.1</version>
+ </dependency>
+
+ </dependencies>
<build/>
--8<-----------------------------------------------------------------
This got me a step further, but then again:
Warning: Caught exception attempting to use SAX to load a SAX XMLReader
Warning: Exception was: org.xml.sax.SAXException: System property
org.xml.sax.driver not specified
Warning: I will print the stack trace then carry on using the default
SAX parser
[ERROR] org.xml.sax.SAXException: System property org.xml.sax.driver not
specified
[ERROR] at
org.xml.sax.helpers.XMLReaderFactory.createXMLReader(XMLReaderFactory.java:90)
I checked $MAVEN_HOME/bin/maven script and indeed, no such property is
defined there. I also took a look at maven.bat and I spotted
org.xml.sax.driver property being set on a commented out line #59 (?!)
I added the property to bin/maven script reading:
-Dorg.xml.sax.driver=org.apache.xerces.parsers.SAXParser
But it dint't help at all: still exactly the same error message. This is
how far I got today...
Thanks everybody, and happy hacking....
Rafal
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>