Created
August 11, 2020 10:17
-
-
Save stephenc/4961f40fba9d208bebd811c73387a719 to your computer and use it in GitHub Desktop.
How to allow testing with a different version from the command line
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<project> | |
... | |
<dependencyManagement> | |
<dependencies> | |
... | |
<dependency> | |
<groupId>com.example.foo</groupId> | |
<artifactId>bar</artifactId> | |
<version>1.2.3</version> | |
</dependency> | |
... | |
</dependencies> | |
</dependencyManagement> | |
... | |
<profiles> | |
<profile> | |
<id>foo-bar-version</id> | |
<!-- support testing with a different version of foo-bar --> | |
<activation> | |
<property> | |
<name>foo-bar-version</name> <!-- remember folks, properties with . can cause surprise issues --> | |
</property> | |
</activation> | |
<dependencyManagement> | |
<dependencies> | |
<dependency> | |
<groupId>com.example.foo</groupId> | |
<artifactId>bar</artifactId> | |
<version>${foo-bar-version}</version> | |
</dependency> | |
</dependencies> | |
</dependencyManagement> | |
</profile> | |
</profiles> | |
</project> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment