0

If I have a war configuration which builds a standard war file with a WEB-INF/lib directory. The jar files come out as spring-core.jar. Is it possible to include the version number that are listed in the dependency list, e.g. I want to have a war with version numbers,

WEB-INF/lib/spring-4.3.8.RElEASE.jar

Instead of:

WEB-INF/lib/spring.jar

 <plugin>
                <artifactId>maven-war-plugin</artifactId>
                <configuration>
                    <outputFileNameMapping>@{artifactId}@.@{extension}@</outputFileNameMapping>
                    <webResources>
                        <resource>
                            <directory>WebContent</directory>
                        </resource>
                    </webResources>
                </configuration>
            </plugin> 
Berlin Brown
  • 11,504
  • 37
  • 135
  • 203

1 Answers1

0

The default name is whatever it's called in the repository. You may have a configuration overriding this feature (such as stripVersion from the maven-dependency-plugin).

This question describes the process of renaming a single dependency: Renaming Maven dependency in WAR's WEB-INF/lib folder.

Community
  • 1
  • 1
TooSerious
  • 409
  • 4
  • 13
  • The repository is maven2 or the default maven. If I build those projects separately as a jar, they have the version number. But in the war, it does not have the version in the name of the file. It looks like the maven-dependency manager is OK but do you have an example where I can parameterize the names of my jar files globally. – Berlin Brown May 19 '17 at 15:49