Due to continuous integration sometimes it is difficult to control build environment. Someone can wrongly setup Jenkins job and your project won't build. In order to identify such errors much more faster one can use maven-enforcer-plugin. Just add the following xml to the pom and that's it:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>${maven.enforcer.plugin.version}</version>
<executions>
<execution>
<id>enforce-versions</id>
<phase>validate</phase>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<requireMavenVersion>
<!--
Maven 3.0.3 or later. That's the earliest version to enforce
declaration ordering for plugins in the same phase.
-->
<version>[3.0.3,)</version>
</requireMavenVersion>
<requireJavaVersion>
<!-- Java 1.8 or later. -->
<version>[${java.version},)</version>
</requireJavaVersion>
</rules>
</configuration>
</execution>
</executions>
</plugin>
This blog is a collection of minds around linux, java, javascript, etc. Looking for great opportunities.
Показаны сообщения с ярлыком maven. Показать все сообщения
Показаны сообщения с ярлыком maven. Показать все сообщения
четверг, 22 декабря 2016 г.
четверг, 23 апреля 2015 г.
Last read book: Mastering Apache Maven 3
Just have finished reading Mastering Apache Maven 3.
Although this is a step by step guide and contains a lot of examples this book is more a reference guide.
Although this is a step by step guide and contains a lot of examples this book is more a reference guide.
Подписаться на:
Сообщения (Atom)