mardi 11 juillet 2017

Maven dependency only for testing purposes

I have a maven dependency like this:

<dependency>
    <groupId>org.springframework.data</groupId>
    <artifactId>spring-data-jpa</artifactId>
    <version>${version}</version>
</dependency>

And the thing is that the ${version} property should be replaced by 1.8.1.RELEASE or 1.9.0.RELEASE depending on the profile I choose when installing, but for testing purposes only the 1.9.0.RELEASE should be used, even if I'm using the 1.8.1 profile. Is there a way to do this? I tried using the test scope but it didn't work as I think it would.

Aucun commentaire:

Enregistrer un commentaire