You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by vm...@apache.org on 2003/11/16 14:01:08 UTC

cvs commit: maven-plugins/caller/xdocs changes.xml navigation.xml

vmassol     2003/11/16 05:01:08

  Modified:    caller   plugin.jelly project.xml
               caller/xdocs changes.xml navigation.xml
  Log:
  - Fixed bug apparently due to some changes in maven core. ${plugin} seems to now reference the calling plugin and not this plugin.
  - Prepare for 1.0 release
  
  Revision  Changes    Path
  1.3       +9 -1      maven-plugins/caller/plugin.jelly
  
  Index: plugin.jelly
  ===================================================================
  RCS file: /home/cvs/maven-plugins/caller/plugin.jelly,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- plugin.jelly	28 Oct 2003 18:17:59 -0000	1.2
  +++ plugin.jelly	16 Nov 2003 13:01:08 -0000	1.3
  @@ -11,19 +11,27 @@
            <caller:call goalInterface="compile-java"/>
       -->       
       <define:tag name="call">                  
  +
         <j:set var="callProperty" value="maven.caller.call.${goalInterface}"/>
  +
         <!-- Search first in the caller's context -->
         <j:set var="goalName" 
           value="${context.findVariable(callProperty)}"/>
  +
         <j:if test="${goalName == null}">
  +
           <!-- Search in this plugin context -->
           <j:set var="goalName" 
  -          value="${plugin.context.findVariable(callProperty)}"/>
  +          value="${pom.getPluginContext('maven-caller-plugin').findVariable(callProperty)}"/>
  +
         </j:if>
  +
         <j:if test="${goalName == null}">
           <ant:fail message="Property [maven.caller.call.${goalInterface}] is not defined"/>
         </j:if>
  +
         <attainGoal name="${goalName}"/>
  +
       </define:tag>
   
       <!-- Example of usage:
  
  
  
  1.2       +3 -3      maven-plugins/caller/project.xml
  
  Index: project.xml
  ===================================================================
  RCS file: /home/cvs/maven-plugins/caller/project.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- project.xml	29 Sep 2003 13:08:57 -0000	1.1
  +++ project.xml	16 Nov 2003 13:01:08 -0000	1.2
  @@ -5,14 +5,14 @@
     <pomVersion>3</pomVersion>
     <id>maven-caller-plugin</id>
     <name>Maven Caller Plugin</name>
  -  <currentVersion>1.0-SNAPSHOT</currentVersion>
  +  <currentVersion>1.0</currentVersion>
     <description>Interface to isolate calls between plugins</description>
     <shortDescription>Maven Caller plugin</shortDescription>
     <url>http://maven.apache.org/reference/plugins/caller/</url>
     <siteDirectory>/www/maven.apache.org/reference/plugins/caller/</siteDirectory>
     <repository>
  -    <connection>scm:cvs:pserver:anoncvs@cvs.apache.org:/home/cvspublic:maven/src/plugins-build/caller/</connection>
  -    <url>http://cvs.apache.org/viewcvs/maven/src/plugins-build/caller/</url>
  +    <connection>scm:cvs:pserver:anoncvs@cvs.apache.org:/home/cvspublic:maven-plugins/caller/</connection>
  +    <url>http://cvs.apache.org/viewcvs/maven-plugins/caller/</url>
     </repository>
     <developers>
       <developer>
  
  
  
  1.2       +1 -1      maven-plugins/caller/xdocs/changes.xml
  
  Index: changes.xml
  ===================================================================
  RCS file: /home/cvs/maven-plugins/caller/xdocs/changes.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- changes.xml	29 Sep 2003 13:08:58 -0000	1.1
  +++ changes.xml	16 Nov 2003 13:01:08 -0000	1.2
  @@ -6,7 +6,7 @@
     </properties>
   
     <body>
  -    <release version="1.0" date="in CVS">
  +    <release version="1.0" date="2003-11-16">
         <action dev="vmassol" type="add">
           Initial creation of plugin.
         </action>
  
  
  
  1.2       +3 -0      maven-plugins/caller/xdocs/navigation.xml
  
  Index: navigation.xml
  ===================================================================
  RCS file: /home/cvs/maven-plugins/caller/xdocs/navigation.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- navigation.xml	29 Sep 2003 13:08:58 -0000	1.1
  +++ navigation.xml	16 Nov 2003 13:01:08 -0000	1.2
  @@ -12,6 +12,9 @@
         <item name="Goals"      href="/goals.html" />
         <item name="Properties" href="/properties.html" />
       </menu>
  +    <menu name="Downloads">
  +      <item name="Caller plugin 1.0" href="http://www.ibiblio.org/maven/maven/plugins/maven-caller-plugin-1.0.jar"/>
  +    </menu>
     </body>
   
   </project>
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


RE: cvs commit: maven-plugins/caller/xdocs changes.xml navigation.xml

Posted by di...@multitask.com.au.
"Vincent Massol" <vm...@pivolis.com> wrote on 20/11/2003 06:50:41 PM:

> 
> 
> > -----Original Message-----
> > From: dion@multitask.com.au [mailto:dion@multitask.com.au]
> > Sent: 20 November 2003 04:34
> > To: Maven Developers List
> > Subject: Re: cvs commit: maven-plugins/caller/xdocs changes.xml
> > navigation.xml
> > 
> > vmassol@apache.org wrote on 17/11/2003 12:01:08 AM:
> > 
> > > vmassol     2003/11/16 05:01:08
> > >
> > >   Modified:    caller   plugin.jelly project.xml
> > >                caller/xdocs changes.xml navigation.xml
> > >   Log:
> > >   - Fixed bug apparently due to some changes in maven core.
> > > ${plugin} seems to now reference the calling plugin and not this
> plugin.
> > >
> > [snip]
> > 
> > >   +          value="${pom.getPluginContext('maven-caller-plugin').
> > > findVariable(callProperty)}"/>
> > 
> > Can we please use the pluginVar tag for these sorts of things instead
> of
> > relying on pom.getPluginContext...?
> 
> I would have but for the fact that pluginVar uses getVariable instead of
> findVariable. Are you ok to modify pluginVar to use findVariable
> instead?

Sure, that makes some sense based on how PluginManager constructs the 
plugin context.


> Also, I've found the need for a common pattern: Some properties are
> defined in plugin.properties but users can also override them. I would
> like to either modify the pluginVar tag name (and logic) or create a new
> one that does:
> 
> - look for a property in the pom context first (using findVariable)
> - if not found, look for it in a given plugin context (using
> findvariable)

The above two are what pluginVar should do. Changing it sounds like a good 
idea.

> - if not found, raise an error
That should be isolated into something similar to paramCheck.

[snip]
--
dIon Gillard, Multitask Consulting
Blog:      http://blogs.codehaus.org/people/dion/




---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


RE: cvs commit: maven-plugins/caller/xdocs changes.xml navigation.xml

Posted by Vincent Massol <vm...@pivolis.com>.

> -----Original Message-----
> From: dion@multitask.com.au [mailto:dion@multitask.com.au]
> Sent: 20 November 2003 04:34
> To: Maven Developers List
> Subject: Re: cvs commit: maven-plugins/caller/xdocs changes.xml
> navigation.xml
> 
> vmassol@apache.org wrote on 17/11/2003 12:01:08 AM:
> 
> > vmassol     2003/11/16 05:01:08
> >
> >   Modified:    caller   plugin.jelly project.xml
> >                caller/xdocs changes.xml navigation.xml
> >   Log:
> >   - Fixed bug apparently due to some changes in maven core.
> > ${plugin} seems to now reference the calling plugin and not this
plugin.
> >
> [snip]
> 
> >   +          value="${pom.getPluginContext('maven-caller-plugin').
> > findVariable(callProperty)}"/>
> 
> Can we please use the pluginVar tag for these sorts of things instead
of
> relying on pom.getPluginContext...?

I would have but for the fact that pluginVar uses getVariable instead of
findVariable. Are you ok to modify pluginVar to use findVariable
instead?

Also, I've found the need for a common pattern: Some properties are
defined in plugin.properties but users can also override them. I would
like to either modify the pluginVar tag name (and logic) or create a new
one that does:

- look for a property in the pom context first (using findVariable)
- if not found, look for it in a given plugin context (using
findvariable)
- if not found, raise an error

Basically:

    <define:tag name="property">

      <maven:paramCheck value="${property}" 
          message="Missing 'property' attribute" fail="true"/>
      <maven:paramCheck value="${var}" message="Missing 'var' attribute"

          fail="true"/>
      <maven:paramCheck value="${plugin}" message="Missing 'plugin'
attribute" fail="true"/>

      <j:set var="tmp" value="${context.findVariable(property)}"/>
      <j:if test="${empty(tmp)}">
        <j:set var="tmp"
 
value="${pom.getPluginContext(plugin).findVariable(property)}"/>
      </j:if>
      <j:if test="${empty(tmp)}">
        <ant:fail>Property [${property}] is required and cannot be
found.</ant:fail>
      </j:if>
      <j:set var="${var}" value="${tmp}" scope="parent"/>

    </define:tag>

What do you think?

Thanks
-Vincent


> --
> dIon Gillard, Multitask Consulting
> Blog:      http://blogs.codehaus.org/people/dion/
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: cvs commit: maven-plugins/caller/xdocs changes.xml navigation.xml

Posted by di...@multitask.com.au.
vmassol@apache.org wrote on 17/11/2003 12:01:08 AM:

> vmassol     2003/11/16 05:01:08
> 
>   Modified:    caller   plugin.jelly project.xml
>                caller/xdocs changes.xml navigation.xml
>   Log:
>   - Fixed bug apparently due to some changes in maven core. 
> ${plugin} seems to now reference the calling plugin and not this plugin.
> 
[snip]

>   +          value="${pom.getPluginContext('maven-caller-plugin').
> findVariable(callProperty)}"/>

Can we please use the pluginVar tag for these sorts of things instead of 
relying on pom.getPluginContext...?
--
dIon Gillard, Multitask Consulting
Blog:      http://blogs.codehaus.org/people/dion/




---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org