Stephen McConnell wrote on Friday, December 12, 2003 2:12 PM:
[snip]
> J�rg Schaible wrote:
>> I am currently on my way to build maven from scratch to test the
>> modifications. Unfortunately the build stops in meta:
>
> Fixed.
> Have just tweeked maven.xml in avalon/meta to only deal with
> */project.xml instead of **/project.xml.
OK, after updating the complete CVS avalon repo, now the build stops at ther
MerlinTestCase:
========= snip ===========
test:test:
[junit] dir attribute ignored if running in the same VM
[junit] Running org.apache.avalon.merlin.unit.test.MerlinTestCaseTest
---- exception report ----------------------------------------------------------
Exception: org.apache.avalon.repository.RepositoryException
Message: Unable to establish a factory for the supplied artifact:
artifact: [jar: avalon-repository:avalon-repository-impl;1.2-dev]
build: 20031212.132743
factory: org.apache.avalon.repository.impl.DefaultFactory
source: file:/c:/Programme/Apache Software Foundation/Maven
1.0-rc1/lib/ant-1.5.3-1.jar
cache: C:\Dokumente und Einstellungen\jos\.maven\repository
---- cause ---------------------------------------------------------------------
Exception: java.lang.NoClassDefFoundError
Message: org/apache/avalon/defaults/Defaults
---- stack trace ---------------------------------------------------------------
java.lang.NoClassDefFoundError: org/apache/avalon/defaults/Defaults
java.lang.Class.getDeclaredConstructors0(Native Method)
java.lang.Class.privateGetDeclaredConstructors(Class.java:1610)
java.lang.Class.getConstructor0(Class.java:1922)
java.lang.Class.getConstructor(Class.java:1019)
org.apache.avalon.repository.main.AbstractBuilder.createDelegate(AbstractBuilder.java:140)
org.apache.avalon.repository.main.DefaultInitialContext.<init>(DefaultInitialContext.java:298)
org.apache.avalon.repository.main.DefaultInitialContext.<init>(DefaultInitialContext.java:219)
org.apache.avalon.repository.main.DefaultInitialContext.<init>(DefaultInitialContext.java:204)
org.apache.avalon.repository.main.DefaultInitialContext.<init>(DefaultInitialContext.java:179)
org.apache.avalon.merlin.unit.AbstractMerlinTestCase.setUp(AbstractMerlinTestCase.java:127)
junit.framework.TestCase.runBare(TestCase.java:125)
junit.framework.TestResult$1.protect(TestResult.java:106)
junit.framework.TestResult.runProtected(TestResult.java:124)
junit.framework.TestResult.run(TestResult.java:109)
junit.framework.TestCase.run(TestCase.java:118)
junit.framework.TestSuite.runTest(TestSuite.java:208)
junit.framework.TestSuite.run(TestSuite.java:203)
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:325)
org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.executeInVM(JUnitTask.java:848)
org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.execute(JUnitTask.java:556)
org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.execute(JUnitTask.java:532)
org.apache.tools.ant.Task.perform(Task.java:341)
org.apache.commons.jelly.tags.ant.AntTag.doTag(AntTag.java:232)
org.apache.commons.jelly.impl.TagScript.run(TagScript.java:279)
org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:135)
org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:233)
org.apache.commons.jelly.tags.core.IfTag.doTag(IfTag.java:88)
org.apache.commons.jelly.impl.TagScript.run(TagScript.java:279)
org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:135)
org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:233)
com.werken.werkz.jelly.GoalTag$1.performAction(GoalTag.java:128)
com.werken.werkz.Goal.fire(Goal.java:639)
com.werken.werkz.Goal.attain(Goal.java:575)
com.werken.werkz.Goal.attainPrecursors(Goal.java:488)
com.werken.werkz.Goal.attain(Goal.java:573)
com.werken.werkz.Goal.attainPrecursors(Goal.java:488)
com.werken.werkz.Goal.attain(Goal.java:573)
org.apache.maven.plugin.PluginManager.attainGoals(PluginManager.java:448)
org.apache.maven.MavenSession.attainGoals(MavenSession.java:360)
org.apache.maven.jelly.tags.maven.ReactorTag.doTag(ReactorTag.java:378)
org.apache.commons.jelly.impl.TagScript.run(TagScript.java:279)
org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:135)
org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:233)
com.werken.werkz.jelly.GoalTag$1.performAction(GoalTag.java:128)
com.werken.werkz.Goal.fire(Goal.java:639)
com.werken.werkz.Goal.attain(Goal.java:575)
com.werken.werkz.Goal.attainPrecursors(Goal.java:488)
com.werken.werkz.Goal.attain(Goal.java:573)
org.apache.maven.plugin.PluginManager.attainGoals(PluginManager.java:448)
org.apache.maven.MavenSession.attainGoals(MavenSession.java:348)
org.apache.maven.cli.App.doMain(App.java:543)
org.apache.maven.cli.App.main(App.java:1109)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:324)
com.werken.forehead.Forehead.run(Forehead.java:551)
com.werken.forehead.Forehead.main(Forehead.java:581)
--------------------------------------------------------------------------------
[junit] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 0,08 sec
[junit] [ERROR] TEST org.apache.avalon.merlin.unit.test.MerlinTestCaseTest FAILED
BUILD FAILED
File...... file:/C:/Work/Apps/Avalon/avalon/merlin/
Element... maven:reactor
Line...... 81
Column.... 32
Unable to obtain goal [test:test] -- file:/C:/Dokumente und
Einstellungen/jos/.maven/plugins/maven-test-plugin-1.4/:129:54: <fail> There were test
failures.
Total time: 51 seconds
Finished at: Fri Dec 12 14:28:38 CET 2003
========= snap ===========
> My feeling is that we should kill the references to Cygwin - it
> certainly is not needed for building or running merlin.
Cygwin will now just detected and the script exists with a hint. I would keep this in,
since it will clarify the status of the script clearly to all Cygwin users.
> Yep - send them through.
> What are the changes?
Basically I've addressed two things:
1) necessary path conversions
2) start of java
3) spaces in paths
1) Cygwin provides a a quite complete *nix environment in Windows. Since now Cygwin
version of a JVM exist, any JVM is still a Windows app and therefroe not capable to
handle *nix paths. Therefore the scripts detect now if they're running in a Cagin
environment and convert special environment entries to *nix by default to have a
defined format for a section modifying or creating enviroment variables. Later on all
environment variables, that have meaning for the JVM, will be converted again back
into DOSish format. You might wonder why I've added a conversion for CLASSPATH, but
you will not know in what kind of format the variable is kept by the user, but you
have to convert into DOSish format in any case. Unfortunately an already DOSish
CLASSPATH will be destroyed by this action, because of the colon after the drive.
Therefore CLASSPATH is converted to *nix first in any case.
2) For the start of Java I have created a variable, since you must have JAVA_HOME in
DOSish format, but to start the java executable you are still in *nix land (although a
DOSish call is currently still suppoerted for legacy reasons)
3) While normal *nix users do not care much about spaces, they are also hit by this
problem, if they have some. In Cygwin you will definately have some, because your
default installation of Merlin in Windows might be "c:\Program Files\Apache Software
Foundation\Merlin" or the local Maven repository resides in "c:\documents and
settings\user\.maven". Therefore I've added quotes around all arguments in RUN_CMD and
ensured that even the arguments to the script are quoted to supply something like:
$ merlin -title "Title with spaces"
Scripts attached.
Regards,
J�rg
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]