[ http://jira.codehaus.org/browse/MNG-4322?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=188536#action_188536 ]
Magno Machado Paulo commented on MNG-4322: ------------------------------------------ Sorry, I think I wasn't clear... Let's try again.. I'm going to attach a project on this issue where you can see what I'm saying. First, do a "mvn package" on the project. Then, go to TestMaven/target/TestMaven/WEB-INF/lib Among other files, there's a "mentawai-1.14.1.jar" there. What I want is force Maven to rename this jar. To understand why do I whant this, look at the "TestMaven/src/main/webapp/index.jsp" file. The first line on thie file is: <%@ taglib uri="/WEB-INF/lib/mentawai-1.14.1.jar" prefix="mtw" %> Now imagine I have this line on a lot of source files, and I decide to use a new version of the library. I would have to go on any source file and correct the references. Now, imagine Maven had renamed this jar to, say, "mentawai.jar". What I'd have on my index.jsp would be: <%@ taglib uri="/WEB-INF/lib/mentawai.jar" prefix="mtw" %> And if I decide to move to a different version, I don't have to correct any references. I think we could have an addicional tag on the dependency declaration, something like this: <dependency> <groupId>org.mentaframework</groupId> <artifactId>mentawai</artifactId> <version>1.14.1</version> <scope>compile</scope> <finalName>mentarai.jar<finalName> <- This is a new tag </dependency> And, in the case where this new tag isn't used, Maven would use the current pattern, so it would be 100% backward compatible. > Ability to rename a dependency's jar when putting it on the lib folder > ---------------------------------------------------------------------- > > Key: MNG-4322 > URL: http://jira.codehaus.org/browse/MNG-4322 > Project: Maven 2 > Issue Type: New Feature > Components: Artifacts and Repositories > Reporter: Magno Machado Paulo > Attachments: TestMaven.rar > > > Maven put on my 'lib' folder the jars of my project's dependencies named like > <artefactId>-<version>.jar > This is a problem when we need to reference the jar filename from sourcecode, > because if we change the dependency version, we have to track all source code > references to it and correct them. This is the case when importing a taglib > into a jsp page > It would be better if Maven put only <artefactId>.jar on the lib folder. And > even better if it let us use any custom name we want for the dependencies. If > no name is specified, then it could use the current pattern. -- 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