You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by "Andy Glick (JIRA)" <ji...@codehaus.org> on 2005/08/03 17:54:57 UTC

[jira] Created: (MAVEN-1656) Doco that explains the protocols required to allow maven.xml of any plugin.jelly to inject orm retrieve values from another plugin

Doco that explains the protocols required to allow maven.xml of any plugin.jelly to inject orm retrieve values from another plugin
----------------------------------------------------------------------------------------------------------------------------------

         Key: MAVEN-1656
         URL: http://jira.codehaus.org/browse/MAVEN-1656
     Project: maven
        Type: Bug
  Components: documentation  
    Versions: 1.1-beta-1    
 Environment: All
 Reporter: Andy Glick


Brett recently posted a suggestion to someone who asked how to access the contents of "plugin a" from the context of "plugin b" or from maven.xml. Brett stated that "plugin a" would have to be initialized before it could be accessed, and that from what I could understand he recommended 1 or 2 ways to do that:

1) reference the artifact plugin's namespace in the project tag 

2) specify <j:set target="plugin-name" scope="parent" var="some.plugin.var" value="some.value"/>  (I think that this is the proper syntax, but I'm not sure :-).

Thierry Lach, who asked the question this time around, reported that using the artifact namespace didn't work in his instance, but that setting the scope to parent did. I'm hoping that we can put together a fairly comprehensive explanation about what is going on here, and if that means explaining why the project gave up on Jelly and switched to M2, then so be it.

See http://news.gmane.org/gmane.comp.jakarta.turbine.maven.user for the postings

Given that during the last couple of months Vincent Massol recommended that people use the now deprecated <dependency-handle> mechanism on the mavenbook.org site (see Tip #2), I should think that there ought to be a priority on documenting this issue in an obvious place, probably the FAQ, but also on the Maven Jelly tags get and set entries. 

If this is actually explicitly documented somewhere, I'm sorry to have wasted anyone's time. I have seen several plugins that have successfully used the artifact namespace tag, so there must be some way that people have learned this. I simply wish that I knew how they had done so. ;-) 

I'm willing to write the doco if someone would explain the details.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


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


[jira] Updated: (MAVEN-1656) Doco that explains the protocols required to allow maven.xml or any plugin.jelly to inject values into or retrieve values from another plugin

Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MAVEN-1656?page=all ]

Brett Porter updated MAVEN-1656:
--------------------------------

    Fix Version: 1.1-beta-2

> Doco that explains the protocols required to allow maven.xml or any plugin.jelly to inject values into or retrieve values from another plugin
> ---------------------------------------------------------------------------------------------------------------------------------------------
>
>          Key: MAVEN-1656
>          URL: http://jira.codehaus.org/browse/MAVEN-1656
>      Project: maven
>         Type: Bug
>   Components: documentation
>     Versions: 1.1-beta-1
>  Environment: All
>     Reporter: Andy Glick
>      Fix For: 1.1-beta-2

>
>
> Brett recently posted a suggestion to someone who asked how to access the contents of "plugin a" from the context of "plugin b" or from maven.xml. Brett stated that "plugin a" would have to be initialized before it could be accessed, and that from what I could understand he recommended 1 or 2 ways to do that:
> 1) reference the artifact plugin's namespace in the project tag 
> 2) specify <j:set target="plugin-name" scope="parent" var="some.plugin.var" value="some.value"/>  (I think that this is the proper syntax, but I'm not sure :-).
> Thierry Lach, who asked the question this time around, reported that using the artifact namespace didn't work in his instance, but that setting the scope to parent did. I'm hoping that we can put together a fairly comprehensive explanation about what is going on here, and if that means explaining why the project gave up on Jelly and switched to M2, then so be it.
> See http://news.gmane.org/gmane.comp.jakarta.turbine.maven.user for the postings
> Given that during the last couple of months Vincent Massol recommended that people use the now deprecated <dependency-handle> mechanism on the mavenbook.org site (see Tip #2), I should think that there ought to be a priority on documenting this issue in an obvious place, probably the FAQ, but also on the Maven Jelly tags get and set entries. 
> If this is actually explicitly documented somewhere, I'm sorry to have wasted anyone's time. I have seen several plugins that have successfully used the artifact namespace tag, so there must be some way that people have learned this. I simply wish that I knew how they had done so. ;-) 
> I'm willing to write the doco if someone would explain the details.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


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


[jira] Commented: (MAVEN-1656) Doco that explains the protocols required to allow maven.xml or any plugin.jelly to inject values into or retrieve values from another plugin

Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MAVEN-1656?page=comments#action_43970 ] 

Brett Porter commented on MAVEN-1656:
-------------------------------------

explanation I gave Andy. To date I haven't been able to distill this into a user readable form:

Variables in a plugin are in its own, separate, jelly context.
However, this context is only created when the plugin is first loaded,
which is when it is first used.

Unfortunately, maven:set does not initialise the plugin context. It
was intended to, but caused some other problems that are documented in
the JIRA issue. So, you cannot use maven:set (or get) before the
plugin context is initialised.

When the plugin context is initialised, it uses the variables from the
current context, so anything set with j:set (no scope) is added. So
using this before the plugin gets used works, but not afterwards.
Using scope="parent" always works, as it puts it into the root
context, shared by all - as long as the plugin has not overridden the
variable in its own context.

The plugin is initialised when:
a) the goal you are in has a preGoal on a goal from that plugin
b) attainGoal has been called for that plugin
c) you have a namespace dependency on the plugin (This seems to have
been unreliable and only work if you actually use a tag from the
plugin though - hence the dependency handle)

It is much better to use a or b if possible, then use maven:set/get
exclusively. If you know the plugin has not been initialised and need
to set a var, you must use j:set without a scope. j:set with a scope
of parent is a last resort that will work in most but not all
situations.

It's a mess, and that's why m2 was a rewrite :)

> Doco that explains the protocols required to allow maven.xml or any plugin.jelly to inject values into or retrieve values from another plugin
> ---------------------------------------------------------------------------------------------------------------------------------------------
>
>          Key: MAVEN-1656
>          URL: http://jira.codehaus.org/browse/MAVEN-1656
>      Project: maven
>         Type: Bug
>   Components: documentation
>     Versions: 1.1-beta-1
>  Environment: All
>     Reporter: Andy Glick

>
>
> Brett recently posted a suggestion to someone who asked how to access the contents of "plugin a" from the context of "plugin b" or from maven.xml. Brett stated that "plugin a" would have to be initialized before it could be accessed, and that from what I could understand he recommended 1 or 2 ways to do that:
> 1) reference the artifact plugin's namespace in the project tag 
> 2) specify <j:set target="plugin-name" scope="parent" var="some.plugin.var" value="some.value"/>  (I think that this is the proper syntax, but I'm not sure :-).
> Thierry Lach, who asked the question this time around, reported that using the artifact namespace didn't work in his instance, but that setting the scope to parent did. I'm hoping that we can put together a fairly comprehensive explanation about what is going on here, and if that means explaining why the project gave up on Jelly and switched to M2, then so be it.
> See http://news.gmane.org/gmane.comp.jakarta.turbine.maven.user for the postings
> Given that during the last couple of months Vincent Massol recommended that people use the now deprecated <dependency-handle> mechanism on the mavenbook.org site (see Tip #2), I should think that there ought to be a priority on documenting this issue in an obvious place, probably the FAQ, but also on the Maven Jelly tags get and set entries. 
> If this is actually explicitly documented somewhere, I'm sorry to have wasted anyone's time. I have seen several plugins that have successfully used the artifact namespace tag, so there must be some way that people have learned this. I simply wish that I knew how they had done so. ;-) 
> I'm willing to write the doco if someone would explain the details.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


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


[jira] Updated: (MAVEN-1656) Doco that explains the protocols required to allow maven.xml or any plugin.jelly to inject values into or retrieve values from another plugin

Posted by "Trygve Laugstol (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MAVEN-1656?page=all ]

Trygve Laugstol updated MAVEN-1656:
-----------------------------------

    Summary: Doco that explains the protocols required to allow maven.xml or any plugin.jelly to inject values into or retrieve values from another plugin  (was: Doco that explains the protocols required to allow maven.xml of any plugin.jelly to inject orm retrieve values from another plugin)

> Doco that explains the protocols required to allow maven.xml or any plugin.jelly to inject values into or retrieve values from another plugin
> ---------------------------------------------------------------------------------------------------------------------------------------------
>
>          Key: MAVEN-1656
>          URL: http://jira.codehaus.org/browse/MAVEN-1656
>      Project: maven
>         Type: Bug
>   Components: documentation
>     Versions: 1.1-beta-1
>  Environment: All
>     Reporter: Andy Glick

>
>
> Brett recently posted a suggestion to someone who asked how to access the contents of "plugin a" from the context of "plugin b" or from maven.xml. Brett stated that "plugin a" would have to be initialized before it could be accessed, and that from what I could understand he recommended 1 or 2 ways to do that:
> 1) reference the artifact plugin's namespace in the project tag 
> 2) specify <j:set target="plugin-name" scope="parent" var="some.plugin.var" value="some.value"/>  (I think that this is the proper syntax, but I'm not sure :-).
> Thierry Lach, who asked the question this time around, reported that using the artifact namespace didn't work in his instance, but that setting the scope to parent did. I'm hoping that we can put together a fairly comprehensive explanation about what is going on here, and if that means explaining why the project gave up on Jelly and switched to M2, then so be it.
> See http://news.gmane.org/gmane.comp.jakarta.turbine.maven.user for the postings
> Given that during the last couple of months Vincent Massol recommended that people use the now deprecated <dependency-handle> mechanism on the mavenbook.org site (see Tip #2), I should think that there ought to be a priority on documenting this issue in an obvious place, probably the FAQ, but also on the Maven Jelly tags get and set entries. 
> If this is actually explicitly documented somewhere, I'm sorry to have wasted anyone's time. I have seen several plugins that have successfully used the artifact namespace tag, so there must be some way that people have learned this. I simply wish that I knew how they had done so. ;-) 
> I'm willing to write the doco if someone would explain the details.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


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


[jira] Updated: (MAVEN-1656) Doco that explains the protocols required to allow maven.xml or any plugin.jelly to inject values into or retrieve values from another plugin

Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MAVEN-1656?page=all ]

Brett Porter updated MAVEN-1656:
--------------------------------

    Fix Version:     (was: 1.1-beta-2)
                 1.1-rc1

Andy, sorry I missed this from a while back. If you want a disucssion, it might be easier on te mailing list.

If you are still interested in doing the "Why we rewrote Maven" piece you'll find some material in my SJUG slides under the "Articles" part of the Maven 1.x site.

Hope this helps...

> Doco that explains the protocols required to allow maven.xml or any plugin.jelly to inject values into or retrieve values from another plugin
> ---------------------------------------------------------------------------------------------------------------------------------------------
>
>          Key: MAVEN-1656
>          URL: http://jira.codehaus.org/browse/MAVEN-1656
>      Project: Maven
>         Type: Bug
>   Components: documentation
>     Versions: 1.1-beta-1
>  Environment: All
>     Reporter: Andy Glick
>      Fix For: 1.1-rc1

>
>
> Brett recently posted a suggestion to someone who asked how to access the contents of "plugin a" from the context of "plugin b" or from maven.xml. Brett stated that "plugin a" would have to be initialized before it could be accessed, and that from what I could understand he recommended 1 or 2 ways to do that:
> 1) reference the artifact plugin's namespace in the project tag 
> 2) specify <j:set target="plugin-name" scope="parent" var="some.plugin.var" value="some.value"/>  (I think that this is the proper syntax, but I'm not sure :-).
> Thierry Lach, who asked the question this time around, reported that using the artifact namespace didn't work in his instance, but that setting the scope to parent did. I'm hoping that we can put together a fairly comprehensive explanation about what is going on here, and if that means explaining why the project gave up on Jelly and switched to M2, then so be it.
> See http://news.gmane.org/gmane.comp.jakarta.turbine.maven.user for the postings
> Given that during the last couple of months Vincent Massol recommended that people use the now deprecated <dependency-handle> mechanism on the mavenbook.org site (see Tip #2), I should think that there ought to be a priority on documenting this issue in an obvious place, probably the FAQ, but also on the Maven Jelly tags get and set entries. 
> If this is actually explicitly documented somewhere, I'm sorry to have wasted anyone's time. I have seen several plugins that have successfully used the artifact namespace tag, so there must be some way that people have learned this. I simply wish that I knew how they had done so. ;-) 
> I'm willing to write the doco if someone would explain the details.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


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


[jira] Commented: (MAVEN-1656) Doco that explains the protocols required to allow maven.xml or any plugin.jelly to inject values into or retrieve values from another plugin

Posted by "Andy Glick (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MAVEN-1656?page=comments#action_44407 ] 

Andy Glick commented on MAVEN-1656:
-----------------------------------

OK! I've checked out the Maven 1 code. I've read through faq.fml and I have an idea about what I'd like to say and where I think that it ought to go.

I've looked at the code for the Maven Jelly tags, and I have a partial understanding about the mechanisms by which the Jelly tag documentaion pages are generated.

So, I've got a couple of questions.

I'm tempted to put some substantive comments into the GetTag.java and the SetTag.java files that explain the issues concerning the injection/retrival of values into/from maven plugins via Jelly scripts. At a minimum, I'd like to add a "see such and such reference", BUT either of those ideas seem to be BAD because it binds the documentation of the code to the larger issue of documenting Maven and Maven's use by its progammer customers. An improper separation of concerns if ever there was one.

I see, under the Codehaus Confluence pages, that there is an "Aiding Maven Adoption" page" I've got a bunch of suggestions concerning that topic, but I'll spare you for now. What I would like to know is, is there any intention of adding a "Why We Rewrote Maven" page to the Maven 1 site anytime soon?  Putting the information about the differences between the 2 releases on the Maven 2 pages doesn't help the kind of Maven 1 users that I used to be, before I got religion, that is.

If there were a highlighted link on the Maven 1 page to such a discussion, and possibly a link from the Maven 1 faq to same, then I would feel comfortable leaving the code unmodified; because we would have discharged our documentation obligations to the community. In teh future when someone asks the inevitable ignorant questions on the user list, we could simply respond, "RTFM, look at the 'Why We Rewrote Maven pages.!"

So, after that multi paragraph "rant", I guess that I'm asking whether there is any interest in my writing the documentation about injection/retrieval in the context of a "Why We Rewrote Maven" piece that I would write. I'd be happy to submit it for proper vetting by the appropriate eyes.

I think that bound to the larger context, lets say in a "Tips and Tricks" section at the end of the piece, people would be more likely to read and remember it when it came time for them to make this sort of attempt.

Thanks, waiting for some feedback,

Andy

> Doco that explains the protocols required to allow maven.xml or any plugin.jelly to inject values into or retrieve values from another plugin
> ---------------------------------------------------------------------------------------------------------------------------------------------
>
>          Key: MAVEN-1656
>          URL: http://jira.codehaus.org/browse/MAVEN-1656
>      Project: Maven
>         Type: Bug
>   Components: documentation
>     Versions: 1.1-beta-1
>  Environment: All
>     Reporter: Andy Glick
>      Fix For: 1.1-beta-2

>
>
> Brett recently posted a suggestion to someone who asked how to access the contents of "plugin a" from the context of "plugin b" or from maven.xml. Brett stated that "plugin a" would have to be initialized before it could be accessed, and that from what I could understand he recommended 1 or 2 ways to do that:
> 1) reference the artifact plugin's namespace in the project tag 
> 2) specify <j:set target="plugin-name" scope="parent" var="some.plugin.var" value="some.value"/>  (I think that this is the proper syntax, but I'm not sure :-).
> Thierry Lach, who asked the question this time around, reported that using the artifact namespace didn't work in his instance, but that setting the scope to parent did. I'm hoping that we can put together a fairly comprehensive explanation about what is going on here, and if that means explaining why the project gave up on Jelly and switched to M2, then so be it.
> See http://news.gmane.org/gmane.comp.jakarta.turbine.maven.user for the postings
> Given that during the last couple of months Vincent Massol recommended that people use the now deprecated <dependency-handle> mechanism on the mavenbook.org site (see Tip #2), I should think that there ought to be a priority on documenting this issue in an obvious place, probably the FAQ, but also on the Maven Jelly tags get and set entries. 
> If this is actually explicitly documented somewhere, I'm sorry to have wasted anyone's time. I have seen several plugins that have successfully used the artifact namespace tag, so there must be some way that people have learned this. I simply wish that I knew how they had done so. ;-) 
> I'm willing to write the doco if someone would explain the details.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


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


[jira] Commented: (MAVEN-1656) Doco that explains the protocols required to allow maven.xml of any plugin.jelly to inject orm retrieve values from another plugin

Posted by "Andy Glick (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MAVEN-1656?page=comments#action_43847 ] 

Andy Glick commented on MAVEN-1656:
-----------------------------------

The author can't write too well, and so the title is a bit off - it ought to read: Doco that explains the protocols required to allow maven.xml or any plugin.jelly to inject values into or retrieve values from another plugin

> Doco that explains the protocols required to allow maven.xml of any plugin.jelly to inject orm retrieve values from another plugin
> ----------------------------------------------------------------------------------------------------------------------------------
>
>          Key: MAVEN-1656
>          URL: http://jira.codehaus.org/browse/MAVEN-1656
>      Project: maven
>         Type: Bug
>   Components: documentation
>     Versions: 1.1-beta-1
>  Environment: All
>     Reporter: Andy Glick

>
>
> Brett recently posted a suggestion to someone who asked how to access the contents of "plugin a" from the context of "plugin b" or from maven.xml. Brett stated that "plugin a" would have to be initialized before it could be accessed, and that from what I could understand he recommended 1 or 2 ways to do that:
> 1) reference the artifact plugin's namespace in the project tag 
> 2) specify <j:set target="plugin-name" scope="parent" var="some.plugin.var" value="some.value"/>  (I think that this is the proper syntax, but I'm not sure :-).
> Thierry Lach, who asked the question this time around, reported that using the artifact namespace didn't work in his instance, but that setting the scope to parent did. I'm hoping that we can put together a fairly comprehensive explanation about what is going on here, and if that means explaining why the project gave up on Jelly and switched to M2, then so be it.
> See http://news.gmane.org/gmane.comp.jakarta.turbine.maven.user for the postings
> Given that during the last couple of months Vincent Massol recommended that people use the now deprecated <dependency-handle> mechanism on the mavenbook.org site (see Tip #2), I should think that there ought to be a priority on documenting this issue in an obvious place, probably the FAQ, but also on the Maven Jelly tags get and set entries. 
> If this is actually explicitly documented somewhere, I'm sorry to have wasted anyone's time. I have seen several plugins that have successfully used the artifact namespace tag, so there must be some way that people have learned this. I simply wish that I knew how they had done so. ;-) 
> I'm willing to write the doco if someone would explain the details.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


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