Category: github

Join the DZone community and get the full member experience. In this part we will take a deeper look how we can define profile(s) for a Maven call to be used.

This can be achieved by using the @MavenProfile annotation like this: This would execute our integration with the following command line (except the things we mentioned in previous parts of the series; Just omitted them for brevity).: In the following example you can see that the @MavenProfile annotation used only on the method first: This will execute all above integration test cases except the first without a profile.

If you would like to have the second test case executed without a profile at all this is not possible.

Apart from that there are cases where it is useful to define several profiles on a Maven build like this: This can also done via using several @MavenProfile annotations on the appropriate test case (or on the class level) like this: So based on the previous parts of the series you could conclude that it is possible to define your own meta annotation to make combinations easier.

Related Articles