#787 Enhance readme to use maven-compiler-plugin and add some badges.

This commit is contained in:
Andreas Gudian 2016-08-29 21:07:05 +02:00
parent fd17681674
commit d99590306e

View File

@ -1,6 +1,7 @@
# MapStruct - Java bean mappings, the easy way! # MapStruct - Java bean mappings, the easy way!
_Version: 1.0.0.Final, November 25th 2015_ [![Latest Stable Version](https://img.shields.io/badge/Latest%20Stable%20Version-1.0.0.Final-blue.svg)](http://search.maven.org/#search%7Cga%7C1%7Cg%3Aorg.mapstruct%20AND%20v%3A1.*.Final)
[![Latest Version](https://img.shields.io/maven-central/v/org.mapstruct/mapstruct-processor.svg?maxAge=2592000&label=Latest%20Release)](http://search.maven.org/#search%7Cga%7C1%7Cg%3Aorg.mapstruct)
## What is MapStruct? ## What is MapStruct?
@ -35,7 +36,6 @@ MapStruct is a Java annotation processor based on [JSR 269](jcp.org/en/jsr/detai
For Maven based projects add the following to your POM file in order to use MapStruct (the dependencies can be obtained from Maven Central): For Maven based projects add the following to your POM file in order to use MapStruct (the dependencies can be obtained from Maven Central):
```xml ```xml
... ...
<properties> <properties>
<org.mapstruct.version>1.0.0.Final</org.mapstruct.version> <org.mapstruct.version>1.0.0.Final</org.mapstruct.version>
@ -44,13 +44,7 @@ For Maven based projects add the following to your POM file in order to use MapS
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>org.mapstruct</groupId> <groupId>org.mapstruct</groupId>
<artifactId>mapstruct</artifactId> <artifactId>mapstruct</artifactId> <!-- OR use this with Java 8 and beyond: <artifactId>mapstruct-jdk8</artifactId> -->
<version>${org.mapstruct.version}</version>
</dependency>
<!-- Use this with Java 8 and beyond -->
<dependency>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct-jdk8</artifactId>
<version>${org.mapstruct.version}</version> <version>${org.mapstruct.version}</version>
</dependency> </dependency>
</dependencies> </dependencies>
@ -58,33 +52,20 @@ For Maven based projects add the following to your POM file in order to use MapS
<build> <build>
<plugins> <plugins>
<plugin> <plugin>
<groupId>org.bsc.maven</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-processor-plugin</artifactId> <artifactId>maven-compiler-plugin</artifactId>
<version>2.2.4</version> <version>3.5.1</version>
<configuration> <configuration>
<defaultOutputDirectory> <source>1.6</source> <!-- or 1.7 or 1.8, .. -->
${project.build.directory}/generated-sources <target>1.6</target>
</defaultOutputDirectory> <annotationProcessorPaths>
<processors> <path>
<processor>org.mapstruct.ap.MappingProcessor</processor> <groupId>org.mapstruct</groupId>
</processors> <artifactId>mapstruct-processor</artifactId>
<version>${org.mapstruct.version}</version>
</path>
</annotationProcessorPaths>
</configuration> </configuration>
<executions>
<execution>
<id>process</id>
<phase>generate-sources</phase>
<goals>
<goal>process</goal>
</goals>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct-processor</artifactId>
<version>${org.mapstruct.version}</version>
</dependency>
</dependencies>
</plugin> </plugin>
</plugins> </plugins>
</build> </build>