THis is a limitation of maven:get/set - the plugin must be initialised
first. Try adding xmlns:artifact="artifact" to your
maven.xml/plugin.jelly.

Alternatively, use j:set scope="parent" var="maven.repo.list" ...

- Brett

On 7/29/05, Lach, Thierry <[EMAIL PROTECTED]> wrote:
> 
> I'm trying to set maven.repo.list in a plugin but it does not seem to
> work.  We are using ear:deploy to copy ear files not only to the maven
> repository, but to pseudo-repositories on our test and production
> application servers to help ensure that all versions on all servers are
> identical.  We use a convention that a production deploy version number
> ends in a -prod.  I'm trying to write my plugin so that maven.repo.list
> is set to the maven repository and the two test servers if not a
> production, and to the maven repository, two test servers, and the three
> production servers if it IS a production version.
> 
> Code follows:
> 
>   <!-- ================================================================
> -->
>   <!-- ===== ear goals                                            =====
> -->
>   <!-- ================================================================
> -->
> 
>   <preGoal name="ear:deploy">
>     <j:set var="repolist" value="REPOSITORY,TEST03,TEST04"/>
>     <j:if test="${pom.currentVersion.endsWith('prod')}">
>       <j:set var="repolist"
> value="REPOSITORY,TEST03,TEST04,PROD05,PROD06,PROD07"/>
>     </j:if>
>     <maven:set plugin="maven-artifact-plugin"
>                property="maven.repo.list"
>                value="${repolist}"/>
>     <echo>maven.repo.list should be set to ${repolist}</echo>
>     <maven:get var="setrepo"
>                property="maven.repo.list"
>                plugin="maven-artifact-plugin"/>
>     <echo>maven.repo.list was set to ${setrepo}</echo>
>   </preGoal>
> 
> 
> When I run ear:deploy, I get the following (without  having
> maven.repo.list set anywhere):
> 
> ear:deploy:
>     [echo] maven.repo.list should be set to REPOSITORY,TEST03,TEST04
>     [echo] maven.repo.list was set to REPOSITORY,TEST03,TEST04
>     [echo] maven.repo.list is not set - using legacy deploy mode
>     [echo] DEPRECATED: use of deploy:artifact tag and the legacy deploy
> method are deprecated
> 
> The first two echo lines are coming from my pre-goal and it appears that
> the value is being set properly but the artifact plugin is not
> respecting the value set using maven:set tag.
> 
> Am I doing something wrong or is this a bug?
> 
> 
> 
> This message and any attachments contain information, which may be 
> confidential or privileged.  If you are not the intended recipient, please 
> refrain from any disclosure, copying, distribution or use of this 
> information.  Please be aware that such actions are prohibited.  If you have 
> received this transmission in error, kindly notify us by calling 
> 1-800-262-4723 or e-mail to [EMAIL PROTECTED] We appreciate your cooperation.
>

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

Reply via email to