[ http://jira.codehaus.org/browse/MPWAR-61?page=comments#action_69021 ]
Arnaud Heritier commented on MPWAR-61:
--------------------------------------
I would prefer a property like war.target.filename to be more coherent with
some others plugins.
The code could be :
{code:xml}
<j:set var="targetPath" value="${dep.getProperty('war.target.path')}"/>
<j:set var="targetFileName" value="${dep.getProperty('war.target.filename')}"/>
<j:choose>
<j:when test="${!empty(targetPath) and empty(targetFileName)}">
<ant:copy todir="${maven.war.webapp.dir}/${targetPath}" file="${lib.path}"/>
</j:when>
<j:when test="${!empty(targetPath) and !empty(targetFileName)}">
<ant:copy tofile="${maven.war.webapp.dir}/${targetFileName}"
file="${lib.path}"/>
</j:when>
</j:choose>
{code}
And the settings :
{code:xml}
<war.target.path>lib/</war.target.path>
<war.target.filename>applet.jet</war.target.filename>
{code}
> Renaming jar file with war.target.pathfile
> ------------------------------------------
>
> Key: MPWAR-61
> URL: http://jira.codehaus.org/browse/MPWAR-61
> Project: maven-war-plugin
> Type: Improvement
> Versions: 1.6.1
> Environment: maven 1.x
> eclipse 3.1.2
> Reporter: hugo lassiege
> Priority: Trivial
> Attachments: plugin.jelly
>
>
> Hi,
> I had a little problem during the creation of a war file.
> Here is an example :
> I add a applet-1.0.0.jar in the dependencies
> I don't put the applet in WEB-INF/lib so I use the property : war.target.path
> <war.target.path>lib/</war.target.path>
> But, this applet have a version number and I don't want to change my jsp each
> time I change the dependencies.
> I modify the plugin to add the rename of the file :
> I add a option (line 172 of plugin.jelly) :
> <j:set var="targetPathFile"
> value="${dep.getProperty('war.target.pathfile')}"/>
> <j:if test="${!empty(targetPathFile)}">
> <ant:copy tofile="${maven.war.webapp.dir}/${targetPathFile}"
> file="${lib.path}"/>
> </j:if>
> So I can use :
> <war.target.pathfile>lib/applet.jar</war.target.pathfile>
> and now I can just change the dependencies and not the jsp file.
> Is it a wrong way or can you add this options in the plugin ?
--
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