You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@turbine.apache.org by "Henning P. Schmiedehausen" <hp...@intermeta.de> on 2002/06/03 21:29:56 UTC

Maven and Turbine-2 -- Is it usable at all?

Hi,

after an unsuccessful try to compile Maven myself on Linux, I fetched
the version for download from the web pages. BTW:

http://jakarta.apache.org/turbine/maven/download.html:		maven-install-b3.jar
http://jakarta.apache.org/turbine/maven/start/download.html:	maven-install-1.0-b4.jar

(Great. Quick, what was this tool for? :-) )

As the main problem with the b3 seems to be that it is imcomplete, I
decided to go with b4. Setting it up went smooth.

Now I fetched the current Turbine snapshot (from nightly/2002-06-03).

According to the docs, running simply "ant" in the root directory
should build the jar.

% ant
--- cut ---
Buildfile: build.xml

maven:jar:

update-pom-check:
fromVersion -> 1
  toVersion -> 3

[...]

checkUpdateDescriptor:
     [echo] 
    +------------------------------------------------------------------------------
    |
    | ERROR: The specified update cannot be performed, please check your
    |        maven.toVersion and maven.fromVersion and try again. You can also use the
    |        'maven:available-updates' target to see which migration paths
    |        are available.
    |
    +------------------------------------------------------------------------------
--- cut ---

Hm. Aha. So It does not. Maybe the update can be performed. Let's try the suggestion:

--- cut ---
henning@forge 18:50 ~/jakarta-turbine-2 > ant maven:available-updates
Buildfile: build.xml

BUILD FAILED

Target `maven:available-updates' does not exist in this project. 

Total time: 1 second
--- cut ---

Seems to be "early advertising". :-)

According to the maven docs (and the update sub directory, it should
be possible to upgrade the POM from v1 to v2 and from v2 to v3. At
least the v1-v2 and v2-v3 subdirectories seem to suggest this.

According to the plugins/core/build.xml, this should be possible:

v1 to v2 -> ant -Dmaven.fromVersion=1 -Dmaven.toVersion=2 maven:update-descriptor 

--- cut ---
% ant -Dmaven.fromVersion=1 -Dmaven.toVersion=2 maven:update-descriptor
Buildfile: build.xml

BUILD FAILED

Target `maven:update-descriptor' does not exist in this project. 
--- cut ---

adding this to the build.xml File in jakarta-turbine-2-src-20020603 :

--- cut ---
--- jakarta-turbine-2-src-20020603/build.xml~   Tue May 28 21:35:40 2002
+++ jakarta-turbine-2-src-20020603/build.xml    Mon Jun  3 21:20:45 2002
@@ -30,6 +30,10 @@
       <ant antfile="${maven.home}/plugins/core/build.xml" target="update-jars"/>
     </target>
 
+    <target name="maven:update-descriptor">
+      <ant antfile="${maven.home}/plugins/core/build.xml" target="update-descriptor"/>
+    </target>
+
     <target name="maven:jar">
       <ant antfile="${maven.home}/plugins/core/build.xml" target="jar"/>
     </target>
--- cut ---

again:

--- cut ---
ant -Dmaven.fromVersion=1 -Dmaven.toVersion=2 maven:update-descriptor
Buildfile: build.xml

[...]
update-descriptor:
     [echo] 
    +------------------------------------------------------------------------------
    | N O T I C E 
    +------------------------------------------------------------------------------
    |
    | Updating project descriptor from version ${fromVersion} to version ${toVersion}
    |
    +------------------------------------------------------------------------------
    
     [copy] Copying 1 file to /home/henning.stand/java/jakarta-turbine-2-src-20020603
     [dvsl] Loading stylesheet /home/henning/java/maven/update/v1-v2/update-descriptor.dvsl
     [dvsl]  [error] ResourceManager : unable to find resource 'VM_global_library.vm' in any resource loader.
     [dvsl] Processing /home/henning.stand/java/jakarta-turbine-2-src-20020603/project.xml to /home/henning.stand/java/jakarta-turbine-2-src-20020603/project.xml.2
     [copy] Could not find file /home/henning.stand/java/jakarta-turbine-2-src-20020603/project.xml.${toVersion} to copy.

BUILD FAILED

/home/henning/java/maven/plugins/core/build.xml:345: Could not find file /home/henning.stand/java/jakarta-turbine-2-src-20020603/project.xml.${toVersion} to copy.
--- cut ---

Hm. Looks completely untested...

More patches:

--- cut ---
--- maven/plugins/core/build.xml~       Mon Jun  3 21:11:35 2002
+++ maven/plugins/core/build.xml        Mon Jun  3 21:23:23 2002
@@ -307,7 +307,7 @@
     | N O T I C E 
     +------------------------------------------------------------------------------
     |
-    | Updating project descriptor from version ${fromVersion} to version ${toVersion}
+    | Updating project descriptor from version ${maven.fromVersion} to version ${maven.toVersion}
     |
     +------------------------------------------------------------------------------
     </echo>
@@ -340,12 +340,12 @@
     <!-- Give our new project descriptor its proper name -->
     <copy 
       tofile="project.xml" 
-      file="project.xml.${toVersion}"
+      file="project.xml.${maven.toVersion}"
       overwrite="true"
     />
     
     <!-- Get rid of the temporary copy -->    
-    <delete file="project.xml.${toVersion}"/>
+    <delete file="project.xml.${maven.toVersion}"/>
     
   </target>
--- cut ---
 
again:

--- cut ---
ant -Dmaven.fromVersion=1 -Dmaven.toVersion=2 maven:update-descriptor
Buildfile: build.xml
[...]
BUILD SUCCESSFUL

Total time: 3 seconds
--- cut --

Step one successful. Step two:

--- cut ---
ant -Dmaven.fromVersion=2 -Dmaven.toVersion=3 maven:update-descriptor

[...]
     [echo] 
    +------------------------------------------------------------------------------
    | N O T I C E 
    +------------------------------------------------------------------------------
    |
    | Updating project descriptor from version 2 to version 3
    |
    +------------------------------------------------------------------------------
    
     [copy] Copying 1 file to /home/henning.stand/java/jakarta-turbine-2-src-20020603
     [dvsl] Loading stylesheet /home/henning/java/maven/update/v2-v3/update-descriptor.dvsl
     [dvsl]  [error] ResourceManager : unable to find resource 'VM_global_library.vm' in any resource loader.
     [dvsl]  [error] Parser Exception: DVSL:stylesheet : org.apache.velocity.runtime.parser.ParseException: Encountered "null" at line 36, column 31.
Was expecting one of:
    "[" ...
    "(" ...
    <STRING_LITERAL> ...
    "true" ...
    "false" ...
    <NUMBER_LITERAL> ...
    <IDENTIFIER> ...
    "{" ...
    "!" ...
    
        at org.apache.velocity.runtime.parser.Parser.generateParseException(Parser.java:3409)
        at org.apache.velocity.runtime.parser.Parser.jj_consume_token(Parser.java:3293)
        at org.apache.velocity.runtime.parser.Parser.PrimaryExpression(Parser.java:2209)
        at org.apache.velocity.runtime.parser.Parser.UnaryExpression(Parser.java:2157)
        at org.apache.velocity.runtime.parser.Parser.MultiplicativeExpression(Parser.java:2008)
        at org.apache.velocity.runtime.parser.Parser.AdditiveExpression(Parser.java:1932)
        at org.apache.velocity.runtime.parser.Parser.RelationalExpression(Parser.java:1800)
        at org.apache.velocity.runtime.parser.Parser.EqualityExpression(Parser.java:1770)
        at org.apache.velocity.runtime.parser.Parser.ConditionalAndExpression(Parser.java:1684)
        at org.apache.velocity.runtime.parser.Parser.ConditionalOrExpression(Parser.java:1644)
        at org.apache.velocity.runtime.parser.Parser.Expression(Parser.java:1584)
        at org.apache.velocity.runtime.parser.Parser.IfStatement(Parser.java:1217)
        at org.apache.velocity.runtime.parser.Parser.Statement(Parser.java:283)
        at org.apache.velocity.runtime.parser.Parser.Directive(Parser.java:672)
        at org.apache.velocity.runtime.parser.Parser.Statement(Parser.java:309)
        at org.apache.velocity.runtime.parser.Parser.process(Parser.java:248)
        at org.apache.velocity.runtime.parser.Parser.parse(Parser.java:103)
        at org.apache.velocity.runtime.RuntimeInstance.parse(RuntimeInstance.java:757)
        at org.apache.velocity.runtime.RuntimeInstance.parse(RuntimeInstance.java:701)
        at org.apache.velocity.app.VelocityEngine.evaluate(VelocityEngine.java:324)
        at org.apache.tools.dvsl.DVSL.setStylesheet(DVSL.java:399)
        at org.apache.tools.dvsl.DVSL.setStylesheet(DVSL.java:330)
        at org.apache.tools.dvsl.DVSLTask.execute(DVSLTask.java:285)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:104)
        at org.apache.tools.ant.Task.perform(Task.java:217)
        at org.apache.tools.ant.Target.execute(Target.java:184)
        at org.apache.tools.ant.Target.performTasks(Target.java:202)
        at org.apache.tools.ant.Project.executeTarget(Project.java:601)
        at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:266)
        at org.apache.tools.ant.Task.perform(Task.java:217)
        at org.apache.tools.ant.Target.execute(Target.java:184)
        at org.apache.tools.ant.Target.performTasks(Target.java:202)
        at org.apache.tools.ant.Project.executeTarget(Project.java:601)
        at org.apache.tools.ant.Project.executeTargets(Project.java:560)
        at org.apache.tools.ant.Main.runBuild(Main.java:454)
        at org.apache.tools.ant.Main.start(Main.java:153)
        at org.apache.tools.ant.Main.main(Main.java:176)

     [dvsl] Failed to read stylesheet /home/henning/java/maven/update/v2-v3/update-descriptor.dvsl
BUILD FAILED

/home/henning/java/maven/plugins/core/build.xml:338: org.apache.velocity.exception.ParseErrorException: Encountered "null" at line 36, column 31.
Was expecting one of:
    "[" ...
    "(" ...
    <STRING_LITERAL> ...
    "true" ...
    "false" ...
    <NUMBER_LITERAL> ...
    <IDENTIFIER> ...
    "{" ...
    "!" ...

--- cut ---

Ok, at this point I give up. I'll rip out the maven stuff from my
personal turbine builds and go back to the legacy build system. What
use is the new, shiny maven if you can't use it with the _actual_
current code from jakarta. There are no alphas, no betas. Just
Snapshots and CVS. :-(

I'd be really happy to use maven myself; it really looks
promising. But instead of adding it to more and more projects, it
might be nice to get it to work with the current projects first. :-)

	Regards
		Henning

-- 
Dipl.-Inf. (Univ.) Henning P. Schmiedehausen       -- Geschaeftsfuehrer
INTERMETA - Gesellschaft fuer Mehrwertdienste mbH     hps@intermeta.de

Am Schwabachgrund 22  Fon.: 09131 / 50654-0   info@intermeta.de
D-91054 Buckenhof     Fax.: 09131 / 50654-20   

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>