[ 
http://jira.codehaus.org/browse/MEAR-113?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=235488#action_235488
 ] 
Jeroen Ruijgers commented on MEAR-113:
--------------------------------------

It is not possible or very difficult to get the declared final name, because 
maven installs artifacts by there original name and not by there final name.
The project (with the final name) of a artifact is propagated to the current 
building project, but as a private property of the artifact without a getter 
(org.apache.maven.artifact.ActiveProjectArtifact class).

Maybe it is better to look for the declared contextRoot in the web.xml and use 
that one if present.

> The default contextRoot should match the default bundleFileName
> ---------------------------------------------------------------
>
>                 Key: MEAR-113
>                 URL: http://jira.codehaus.org/browse/MEAR-113
>             Project: Maven 2.x Ear Plugin
>          Issue Type: Improvement
>    Affects Versions: 2.3.2
>            Reporter: Michael Semb Wever
>             Fix For: 2.5
>
>         Attachments: MEAR-113.patch, MEAR-113.patch
>
>
> In a webModule the contextRoot defaults to 
>  "/" + a.getArtifactId()
> There is no way AFAIK to have a contextRoot that honours the webModule 
> artifact's finalName, necessary if it was dynamically set via profiles.
> (The only way i see here is to duplicate all the profile information and put 
> the maven-ear-plugin configuration into each profile, just to insert the 
> various contextRoot values).
> By making the contextRoot instead default to 
>  "/" + getBundleFileName()
> this scenario is solved. 
> The webModule's contextRoot defaults to the build name of the artifact if it 
> were customised. If that artifact's finalName was not customised then it 
> defaults back to the artifactId therefore maintaining today's behavior and 
> not breaking any compatibility.
> Patch attached.

-- 
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

        

Reply via email to