Folks,

This is another error which adds to the heap of "reasons why I hate Maven" - Maven is one of the worst systems I have ever dealt with when things go wrong.


- it's a dependency problem - dependencies of the velocity package, which I believe is brought in by one of the Maven plugins

- why its dependencies aren't automatically handled I have no idea - they are clearly pointed at in the velocity POM

- I fixed the problem by explicitly adding dependencies for commons-collections and for log4j to the POM for the itest-databindings

Why this fix works, I'd be very happy for someone to explain.

I'll be happy to commit this change should no-one object - it's a hack but it 
does fix the build.


Yours,  Mike.

Simon Nash wrote:
I ran mvn -e and got a stack trace as follows.  It looks like the
class org/apache/commons/collections/ExtendedProperties was not
found.  Any ideas?

  Simon

[INFO] [exec:java {execution: generate-test-sdo-source}]
>> Building project from dir: F:\tuscany69\sca\itest\databindings\sdogen\target [INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] An exception occured while executing the Java class. null

org/apache/commons/collections/ExtendedProperties
[INFO] ------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: An exception occured whi
le executing the Java class. null
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
ultLifecycleExecutor.java:564)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLi
fecycle(DefaultLifecycleExecutor.java:480)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau
ltLifecycleExecutor.java:459)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan
dleFailures(DefaultLifecycleExecutor.java:311)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen
ts(DefaultLifecycleExecutor.java:278)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi
fecycleExecutor.java:143)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:333)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:126)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:282)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.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)
Caused by: org.apache.maven.plugin.MojoExecutionException: An exception occured
while executing the Java class. null
at org.codehaus.mojo.exec.ExecJavaMojo.execute(ExecJavaMojo.java:324) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi
nManager.java:447)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
ultLifecycleExecutor.java:539)
        ... 16 more
Caused by: java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:273)
        at java.lang.Thread.run(Thread.java:595)
Caused by: java.lang.NoClassDefFoundError: org/apache/commons/collections/Extend
edProperties
at org.apache.velocity.runtime.RuntimeInstance.<init>(RuntimeInstance.ja
va:160)
at org.apache.velocity.runtime.RuntimeSingleton.<clinit>(RuntimeSingleto
n.java:95)
        at org.apache.velocity.app.Velocity.init(Velocity.java:106)
at org.apache.tuscany.sca.itest.generate.Generate.generate(Generate.java
:90)
at org.apache.tuscany.sca.itest.generate.Generate.main(Generate.java:174
)
        ... 6 more


Simon Nash wrote:
The SDO databindings itest is failing as well.  The error is quite
cryptic.  See below.

  Simon

[INFO] ------------------------------------------------------------------------
[INFO] Building Apache Tuscany SCA SDO Databinding Integration Tests
[INFO]    task-segment: [install]
[INFO] ------------------------------------------------------------------------ [INFO] artifact org.apache.maven.plugins:maven-dependency-plugin: checking for u
pdates from java.net
[INFO] artifact org.codehaus.mojo:exec-maven-plugin: checking for updates from j
ava.net
[INFO] artifact org.codehaus.mojo:exec-maven-plugin: checking for updates from a
pache.incubator
[INFO] artifact org.codehaus.mojo:exec-maven-plugin: checking for updates from c
odehaus-snapshot
[INFO] snapshot org.codehaus.mojo:exec-maven-plugin:1.1-beta-2-SNAPSHOT: checkin
g for updates from java.net
[INFO] snapshot org.codehaus.mojo:exec-maven-plugin:1.1-beta-2-SNAPSHOT: checkin
g for updates from apache.snapshots
[INFO] snapshot org.codehaus.mojo:exec-maven-plugin:1.1-beta-2-SNAPSHOT: checkin
g for updates from codehaus-snapshot
Downloading: http://snapshots.repository.codehaus.org/org/codehaus/mojo/exec-mav en-plugin/1.1-beta-2-SNAPSHOT/exec-maven-plugin-1.1-beta-2-20080507.214920-4.pom

2K downloaded
[INFO] snapshot org.codehaus.mojo:mojo:17-SNAPSHOT: checking for updates from ja
va.net
[INFO] snapshot org.codehaus.mojo:mojo:17-SNAPSHOT: checking for updates from ap
ache.snapshots
[INFO] snapshot org.codehaus.mojo:mojo:17-SNAPSHOT: checking for updates from co
dehaus-snapshot
Downloading: http://snapshots.repository.codehaus.org/org/codehaus/mojo/mojo/17-
SNAPSHOT/mojo-17-20080411.161110-1.pom
15K downloaded
Downloading: http://download.java.net/maven/1/org.codehaus.mojo/maven-plugins/ex
ec-maven-plugin-1.1-beta-2-20080507.214920-4.jar
Downloading: http://people.apache.org/repo/m2-snapshot-repository/org/codehaus/m ojo/exec-maven-plugin/1.1-beta-2-SNAPSHOT/exec-maven-plugin-1.1-beta-2-20080507.
214920-4.jar
Downloading: http://snapshots.repository.codehaus.org/org/codehaus/mojo/exec-mav en-plugin/1.1-beta-2-SNAPSHOT/exec-maven-plugin-1.1-beta-2-20080507.214920-4.jar

27K downloaded
[INFO] [dependency:unpack {execution: default}]
[INFO] Configured Artifact: org.apache.tuscany.sca:itest-databindings-common:2.0
-incubating-SNAPSHOT:jar
[INFO] snapshot org.apache.tuscany.sca:itest-databindings-common:2.0-incubating-
SNAPSHOT: checking for updates from java.net
[INFO] snapshot org.apache.tuscany.sca:itest-databindings-common:2.0-incubating-
SNAPSHOT: checking for updates from apache.incubator
[INFO] snapshot org.apache.tuscany.sca:itest-databindings-common:2.0-incubating-
SNAPSHOT: checking for updates from apache.snapshots
[INFO] Unpacking C:\Users\nash\.m2\repository\org\apache\tuscany\sca\itest-datab indings-common\2.0-incubating-SNAPSHOT\itest-databindings-common-2.0-incubating-
SNAPSHOT.jarto
 F:\tuscany69\sca\itest\databindings\sdogen\target\classes
with Includes null and excludes:null
[INFO] [build-helper:add-test-source {execution: add-test-source}]
[INFO] Test Source directory: F:\tuscany69\sca\itest\databindings\sdogen\target\
sdo-source added.
[INFO] [resources:resources]
[INFO] Using default encoding to copy filtered resources.
[INFO] Preparing exec:java
[WARNING] Removing: java from forked lifecycle, to prevent recursive invocation.

[INFO] No goals needed for project - skipping
[INFO] snapshot org.apache.tuscany.sca:tuscany-host-jetty:2.0-incubating-SNAPSHO
T: checking for updates from java.net
[INFO] [exec:java {execution: generate-test-sdo-source}]
>> Building project from dir: F:\tuscany69\sca\itest\databindings\sdogen\target [INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] An exception occured while executing the Java class. null

org/apache/commons/collections/ExtendedProperties
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3 minutes 39 seconds
[INFO] Finished at: Thu May 08 12:24:35 BST 2008
[INFO] Final Memory: 79M/265M
[INFO] ------------------------------------------------------------------------




Reply via email to