I meant to say "with the directory you're currently executing from".

Chad Brandon wrote:

That won't work, the ${basedir} property is replaced during andromdapp:generate execution with the correctly your're generting from, will this work for you? Works for me:

Does it work ok for you, with just (notice no ${maven.src.dir} or ${basedir})?:

   <goal name="deploy">
       <maven:maven
           descriptor="app/project.xml"
           goals="deploy"/>
   </goal>


Tim Dysinger wrote:

Here is a patch to maven.xml.vsl to fix the problem...

On Thu, 2005-03-31 at 12:59 -0700, Chad Brandon wrote:


Ok I'm on windows, so I guess that's the difference (although I don't know why it would work on windows), I'm not sure why ${maven.src.dir} is being used, it could be because the ${basedir} property was being replaced with the hard coded directory during the andromdapp:generate goal, but anyway, I'll fix the path.

Tim Dysinger wrote:



I was just doing that...  The src directory does not exist.  I am on
Linux and this path doesn't work.  See below:

ls /home/tim/work/test/src/../app/project.xml
ls: /home/tim/work/test/src/../app/project.xml: No such file or directory


but if you take the src/.. off it works fine.  It's because
${basedir}/src doesn't exist not because the project.xml file doesn't
exist.
ls /home/tim/work/test/app/project.xml
/home/tim/work/test/app/project.xml

From my 3.0M3 project [/maven.xml]




Do you mean from 3.0-RC1 project? cause its the same value.



  <goal name="deploy">
      <maven:maven
          descriptor="${maven.src.dir}/../app/project.xml"
          goals="deploy"/>
  </goal>

I am not setting my maven.src.dir anywhere so it is the default
'/home/tim/work/test/src'. It blows up because that directory doesn't
exist in my multiproject setup. My 'test' project's base directory just
has common, core, web, app, etc. This is exactly as it is generated - I
haven't touched a thing.


==============================STACK=============================

BUILD FAILED
org.apache.maven.MavenException: Error parsing project.xml
'/home/tim/work/test/src/../app/project.xml'
at
org.apache.maven.MavenUtils.getNonJellyProject(MavenUtils.java:207)
at org.apache.maven.MavenUtils.getProject(MavenUtils.java:143)
at org.apache.maven.MavenUtils.getProject(MavenUtils.java:122)
at
org.apache.maven.jelly.tags.maven.MavenTag.doTag(MavenTag.java:71)
at
org.apache.commons.jelly.impl.TagScript.run(TagScript.java:279)
at
org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:135)
at
org.apache.maven.jelly.tags.werkz.MavenGoalTag.runBodyTag(MavenGoalTag.java:79)


at org.apache.maven.jelly.tags.werkz.MavenGoalTag
$MavenGoalAction.performAction(MavenGoalTag.java:110)
at com.werken.werkz.Goal.fire(Goal.java:639)
at com.werken.werkz.Goal.attain(Goal.java:575)
at
org.apache.maven.plugin.PluginManager.attainGoals(PluginManager.java:671)


at
org.apache.maven.MavenSession.attainGoals(MavenSession.java:263)
at org.apache.maven.cli.App.doMain(App.java:488)
at org.apache.maven.cli.App.main(App.java:1239)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)


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


at java.lang.reflect.Method.invoke(Method.java:324)
at com.werken.forehead.Forehead.run(Forehead.java:551)
at com.werken.forehead.Forehead.main(Forehead.java:581)
--- Nested Exception ---
java.io.FileNotFoundException: /home/tim/work/test/src/../app/project.xml (No such file or directory)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:106)
at
org.apache.commons.digester.Digester.parse(Digester.java:1525)
at
org.apache.maven.MavenUtils.getNonJellyProject(MavenUtils.java:203)
at org.apache.maven.MavenUtils.getProject(MavenUtils.java:143)
at org.apache.maven.MavenUtils.getProject(MavenUtils.java:122)
at
org.apache.maven.jelly.tags.maven.MavenTag.doTag(MavenTag.java:71)
at
org.apache.commons.jelly.impl.TagScript.run(TagScript.java:279)
at
org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:135)
at
org.apache.maven.jelly.tags.werkz.MavenGoalTag.runBodyTag(MavenGoalTag.java:79)


at org.apache.maven.jelly.tags.werkz.MavenGoalTag
$MavenGoalAction.performAction(MavenGoalTag.java:110)
at com.werken.werkz.Goal.fire(Goal.java:639)
at com.werken.werkz.Goal.attain(Goal.java:575)
at
org.apache.maven.plugin.PluginManager.attainGoals(PluginManager.java:671)


at
org.apache.maven.MavenSession.attainGoals(MavenSession.java:263)
at org.apache.maven.cli.App.doMain(App.java:488)
at org.apache.maven.cli.App.main(App.java:1239)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)


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


      at java.lang.reflect.Method.invoke(Method.java:324)
      at com.werken.forehead.Forehead.run(Forehead.java:551)
      at com.werken.forehead.Forehead.main(Forehead.java:581)
File...... /home/tim/work/test/maven.xml
Element... maven:maven
Line...... 36
Column.... 29
Error parsing project.xml '/home/tim/work/test/src/../app/project.xml'


On Thu, 2005-03-31 at 12:39 -0700, Chad Brandon wrote:




Tim Dysinger wrote:



I don't understand it.  I rebuilt my Maven plugins from CVS this
morning.  My repository is up to date too.  ???

I am using Maven 1.0.2 and JDK 1.4.2_07 with nothing special installed.



Try running deploy with -e and see if it gives you any more useful information.




-Tim








------------------------------------------------------------------------



Index: maven.xml.vsl
===================================================================
RCS file: /cvsroot/andromda/maven/andromdapp/plugin-resources/andromdapp/templates/j2ee-app/maven.xml.vsl,v


retrieving revision 1.8
diff -u -r1.8 maven.xml.vsl
--- maven.xml.vsl 28 Mar 2005 23:36:59 -0000 1.8
+++ maven.xml.vsl 31 Mar 2005 20:06:16 -0000
@@ -32,7 +32,7 @@
================================================================== -->
<goal name="deploy">
<maven:maven
- descriptor="${maven.src.dir}/../app/project.xml"
+ descriptor="${basedir}/app/project.xml"
goals="deploy"/>
</goal>


@@ -41,7 +41,7 @@
================================================================== -->
<goal name="undeploy">
<maven:maven
- descriptor="${maven.src.dir}/../app/project.xml"
+ descriptor="${basedir}/app/project.xml"
goals="undeploy"/>
</goal>


@@ -51,7 +51,7 @@
================================================================== -->
<goal name="web">
<maven:maven
- descriptor="${maven.src.dir}/../web/project.xml"
+ descriptor="${basedir}/web/project.xml"
goals="war:install"/>
</goal>


@@ -61,7 +61,7 @@
================================================================== -->
<goal name="core">
<maven:maven
- descriptor="${maven.src.dir}/../core/project.xml"
+ descriptor="${basedir}/core/project.xml"
goals="ejb:install"/>
</goal>


@@ -70,7 +70,7 @@
================================================================== -->
<goal name="common">
<maven:maven
- descriptor="${maven.src.dir}/../common/project.xml"
+ descriptor="${basedir}/common/project.xml"
goals="jar:install"/>
</goal>


@@ -79,7 +79,7 @@
================================================================== -->
<goal name="mda">
<maven:maven
- descriptor="${maven.src.dir}/../mda/project.xml"
+ descriptor="${basedir}/mda/project.xml"
goals="pom:install"/>
</goal>


@@ -89,7 +89,7 @@
================================================================== -->
<goal name="webservice">
<maven:maven
- descriptor="${maven.src.dir}/../webservice/project.xml"
+ descriptor="${basedir}/webservice/project.xml"
goals="war:install"/>
</goal>








------------------------------------------------------- This SF.net email is sponsored by Demarc: A global provider of Threat Management Solutions. Download our HomeAdmin security software for free today! http://www.demarc.com/Info/Sentarus/hamr30 _______________________________________________ Andromda-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/andromda-user

Reply via email to