RE: accessing plugin-variables in subprojects

2005-05-09 Thread Jens Zastrow
[sub-projects maven.xml]

postGoal name=test:test

j:set var=xyz value=${pom.getPluginContext('maven-test
plugin').getVariable('maven.test.failure')}/

/postGoal

 

[master maven.xml]

j:forEach var=reactorProject items=${reactorProjects}

echo=${reactorProject.context.getVariable('')}/echo

/j:forEach

 

I tried the code above, but it does not work :-(

I tried different scopes to in the j:set, with the same result.

 

- Jens

 

-Original Message-
From: Brett Porter [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, May 04, 2005 12:34 AM
To: Jens Zastrow
Cc: Maven Users List
Subject: Re: accessing plugin-variables in subprojects

 

unfortunately, yes. Bear in mind that maven.xml is inherited so you

need only do it once if your reactored projects all inherit a common

file.

 

- Brett

 

On 5/3/05, Jens Zastrow [EMAIL PROTECTED] wrote:

 the same happens with the test-plugin... the following code does not

 work.

 

 j:forEach var=reactorProject items=${reactorProjects}

   j:if

 test=${reactorProject.context.getVariable('maven.test.failure')}

  ant:fail message=some junit tests failed./

   /j:if

 /j:forEach

 

 should i have to add a test:test-postgoal to copy the

 'maven.test.failure' from the plugin to the pom-context en every

 sub-project?!

 

 - Jens

 

 -Original Message-

 From: Brett Porter [mailto:[EMAIL PROTECTED]

 Sent: Tuesday, May 03, 2005 12:08 AM

 To: Maven Users List

 Subject: Re: accessing plugin-variables in subprojects

 

 Yes, the plugin contexts are not retained after a project stops

 executing - that was the reason why older versions of Maven leaked a

 lot more memory.

 

 You will need to set it into the project's context at some point

 during the build (you may find that particular value is actually

 there).

 

 Try: ${reactorProject.context.getVariable('...')}, but if not you will

 need to set it specifically.

 

 - Brett

 

 On 5/3/05, Jens Zastrow [EMAIL PROTECTED] wrote:

  maven:reactor ...

  j:forEach var=reactorProject items=${reactorProjects}

 

 


echo${reactorProject.getPluginContext('jiac-aunit-plugin').getVariable

  ('aunit.output') }/echo

  /j:forEach

 

  The output should contain something like

  subproject-basedir/target/xxx.output, but it doesn't.

  It prints for all subprojects the dir parent/target/xxx.output which

 is

  printed out by:

 

 


echo${pom.getPluginContext('jiac-aunit-plugin').getVariable('aunit.rep

  orts')}/echo

 

  Thanks

  Jens Zastrow

 

 
-

  To unsubscribe, e-mail: [EMAIL PROTECTED]

  For additional commands, e-mail: [EMAIL PROTECTED]

 

 

 

 -

 To unsubscribe, e-mail: [EMAIL PROTECTED]

 For additional commands, e-mail: [EMAIL PROTECTED]

 



 



RE: accessing plugin-variables in subprojects

2005-05-03 Thread Jens Zastrow
the same happens with the test-plugin... the following code does not
work.

j:forEach var=reactorProject items=${reactorProjects}
  j:if
test=${reactorProject.context.getVariable('maven.test.failure')}
 ant:fail message=some junit tests failed./
  /j:if
/j:forEach

should i have to add a test:test-postgoal to copy the
'maven.test.failure' from the plugin to the pom-context en every
sub-project?!

- Jens

-Original Message-
From: Brett Porter [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 03, 2005 12:08 AM
To: Maven Users List
Subject: Re: accessing plugin-variables in subprojects

Yes, the plugin contexts are not retained after a project stops
executing - that was the reason why older versions of Maven leaked a
lot more memory.

You will need to set it into the project's context at some point
during the build (you may find that particular value is actually
there).

Try: ${reactorProject.context.getVariable('...')}, but if not you will
need to set it specifically.

- Brett

On 5/3/05, Jens Zastrow [EMAIL PROTECTED] wrote:
 maven:reactor ...
 j:forEach var=reactorProject items=${reactorProjects}
 

echo${reactorProject.getPluginContext('jiac-aunit-plugin').getVariable
 ('aunit.output') }/echo
 /j:forEach
 
 The output should contain something like
 subproject-basedir/target/xxx.output, but it doesn't.
 It prints for all subprojects the dir parent/target/xxx.output which
is
 printed out by:
 

echo${pom.getPluginContext('jiac-aunit-plugin').getVariable('aunit.rep
 orts')}/echo
 
 Thanks
 Jens Zastrow
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: accessing plugin-variables in subprojects

2005-05-03 Thread Brett Porter
unfortunately, yes. Bear in mind that maven.xml is inherited so you
need only do it once if your reactored projects all inherit a common
file.

- Brett

On 5/3/05, Jens Zastrow [EMAIL PROTECTED] wrote:
 the same happens with the test-plugin... the following code does not
 work.
 
 j:forEach var=reactorProject items=${reactorProjects}
   j:if
 test=${reactorProject.context.getVariable('maven.test.failure')}
  ant:fail message=some junit tests failed./
   /j:if
 /j:forEach
 
 should i have to add a test:test-postgoal to copy the
 'maven.test.failure' from the plugin to the pom-context en every
 sub-project?!
 
 - Jens
 
 -Original Message-
 From: Brett Porter [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, May 03, 2005 12:08 AM
 To: Maven Users List
 Subject: Re: accessing plugin-variables in subprojects
 
 Yes, the plugin contexts are not retained after a project stops
 executing - that was the reason why older versions of Maven leaked a
 lot more memory.
 
 You will need to set it into the project's context at some point
 during the build (you may find that particular value is actually
 there).
 
 Try: ${reactorProject.context.getVariable('...')}, but if not you will
 need to set it specifically.
 
 - Brett
 
 On 5/3/05, Jens Zastrow [EMAIL PROTECTED] wrote:
  maven:reactor ...
  j:forEach var=reactorProject items=${reactorProjects}
 
 
 echo${reactorProject.getPluginContext('jiac-aunit-plugin').getVariable
  ('aunit.output') }/echo
  /j:forEach
 
  The output should contain something like
  subproject-basedir/target/xxx.output, but it doesn't.
  It prints for all subprojects the dir parent/target/xxx.output which
 is
  printed out by:
 
 
 echo${pom.getPluginContext('jiac-aunit-plugin').getVariable('aunit.rep
  orts')}/echo
 
  Thanks
  Jens Zastrow
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: accessing plugin-variables in subprojects

2005-05-02 Thread Brett Porter
Yes, the plugin contexts are not retained after a project stops
executing - that was the reason why older versions of Maven leaked a
lot more memory.

You will need to set it into the project's context at some point
during the build (you may find that particular value is actually
there).

Try: ${reactorProject.context.getVariable('...')}, but if not you will
need to set it specifically.

- Brett

On 5/3/05, Jens Zastrow [EMAIL PROTECTED] wrote:
 maven:reactor ...
 j:forEach var=reactorProject items=${reactorProjects}
 
 echo${reactorProject.getPluginContext('jiac-aunit-plugin').getVariable
 ('aunit.output') }/echo
 /j:forEach
 
 The output should contain something like
 subproject-basedir/target/xxx.output, but it doesn't.
 It prints for all subprojects the dir parent/target/xxx.output which is
 printed out by:
 
 echo${pom.getPluginContext('jiac-aunit-plugin').getVariable('aunit.rep
 orts')}/echo
 
 Thanks
 Jens Zastrow
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]