java - How can I run unit tests with different versions of a library w/o changing it manually? -
java - How can I run unit tests with different versions of a library w/o changing it manually? -
unit test in java, using maven build & run. can utilize either local jars "outside" maven or local maven repository.
however, i'd figure out way automatically somehow, without changing pom.xml->running ->changing pom.xml
is there other way except above or creating pom.xmls differ in specific library version?
(i'm using intellij if that's of use)
you read version of lib property,
<dependency> <groupid>javax.faces</groupid> <artifactid>jsf-api</artifactid> <version>${jsp.api.version}</version> </dependency>
you can set property in several ways, e.g. loading build-specific properties file.
you specify parameter when running build. on command line svn, like
mvn -djsp.api.version=1.8 install
don't know how specify such property when running maven within intellij, i'm sure it's possible....
this approach give total flexibility freely speficy lib version each build. if have limited number of versions want take from, using profiles improve way go. define profile each version number , tell maven profile utilize when run build.
java maven junit libraries pom.xml
Comments
Post a Comment