#202 Refactor integration tests to use Maven Verifier, different JDKs using toolchains, and the Eclipse JDT compiler.

This commit is contained in:
Andreas Gudian 2014-09-14 21:36:33 +02:00
parent 716b34b720
commit 33abe5faaf
55 changed files with 1230 additions and 209 deletions

View File

@ -163,7 +163,7 @@
<module name="InnerAssignment"/> <module name="InnerAssignment"/>
<!-- <module name="MagicNumber"/> --> <!-- <module name="MagicNumber"/> -->
<module name="MissingSwitchDefault"/> <module name="MissingSwitchDefault"/>
<module name="RedundantThrows"/> <!-- <module name="RedundantThrows"/> -->
<module name="SimplifyBooleanExpression"/> <module name="SimplifyBooleanExpression"/>
<module name="SimplifyBooleanReturn"/> <module name="SimplifyBooleanReturn"/>

View File

@ -0,0 +1,37 @@
<?xml version="1.0" encoding="UTF8"?>
<toolchains>
<toolchain>
<type>jdk</type>
<provides>
<version>1.6</version>
<vendor>oracle</vendor>
<id>jdk1.6</id>
</provides>
<configuration>
<jdkHome>/opt/jdk/jdk1.6.latest</jdkHome>
</configuration>
</toolchain>
<toolchain>
<type>jdk</type>
<provides>
<version>1.7</version>
<vendor>oracle</vendor>
<id>jdk1.7</id>
</provides>
<configuration>
<jdkHome>/opt/jdk/jdk1.7.latest</jdkHome>
</configuration>
</toolchain>
<toolchain>
<type>jdk</type>
<provides>
<version>1.8</version>
<vendor>oracle</vendor>
<id>jdk1.8</id>
</provides>
<configuration>
<jdkHome>/opt/jdk/jdk8.latest</jdkHome>
</configuration>
</toolchain>
</toolchains>

View File

@ -0,0 +1,36 @@
<?xml version="1.0" encoding="UTF8"?>
<toolchains>
<toolchain>
<type>jdk</type>
<provides>
<version>1.6.0_45</version>
<vendor>oracle</vendor>
<id>jdk1.6</id>
</provides>
<configuration>
<jdkHome>C:\Program Files\Java\jdk1.6.0_45</jdkHome>
</configuration>
</toolchain>
<toolchain>
<type>jdk</type>
<provides>
<version>1.7.0_51</version>
<vendor>oracle</vendor>
<id>jdk1.7</id>
</provides>
<configuration>
<jdkHome>C:\Program Files\Java\jdk1.7.0_51</jdkHome>
</configuration>
</toolchain>
<toolchain>
<type>jdk</type>
<provides>
<version>1.8.0_11</version>
<vendor>oracle</vendor>
<id>jdk1.8</id>
</provides>
<configuration>
<jdkHome>C:\Program Files\Java\jdk1.8.0_11</jdkHome>
</configuration>
</toolchain>
</toolchains>

View File

@ -1,118 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2012-2014 Gunnar Morling (http://www.gunnarmorling.de/)
and/or other contributors as indicated by the @authors tag. See the
copyright.txt file in the distribution for a full listing of all
contributors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct-parent</artifactId>
<version>1.0.0-SNAPSHOT</version>
<relativePath>../parent/pom.xml</relativePath>
</parent>
<artifactId>mapstruct-integrationtest-jdk8</artifactId>
<packaging>jar</packaging>
<name>MapStruct Integration Tests for JDK 8</name>
<dependencies>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>mapstruct-jdk8</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.easytesting</groupId>
<artifactId>fest-assert</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<groupId>org.bsc.maven</groupId>
<artifactId>maven-processor-plugin</artifactId>
<configuration>
<defaultOutputDirectory>${project.build.directory}/generated-sources/mapstruct</defaultOutputDirectory>
<processors>
<processor>org.mapstruct.ap.MappingProcessor</processor>
</processors>
<options>
<!-- suppressGeneratorTimestamp=false is the default -->
<suppressGeneratorTimestamp>false</suppressGeneratorTimestamp>
</options>
</configuration>
<executions>
<execution>
<id>process</id>
<phase>generate-sources</phase>
<goals>
<goal>process</goal>
</goals>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>mapstruct-processor</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<executions>
<execution>
<id>check-style</id>
<phase>verify</phase>
<goals>
<goal>checkstyle</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

View File

@ -19,7 +19,8 @@
limitations under the License. limitations under the License.
--> -->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<parent> <parent>
@ -33,13 +34,11 @@
<packaging>jar</packaging> <packaging>jar</packaging>
<name>MapStruct Integration Test</name> <name>MapStruct Integration Test</name>
<dependencies> <properties>
<dependency> <mapstruct.version>${project.version}</mapstruct.version>
<groupId>${project.groupId}</groupId> </properties>
<artifactId>mapstruct</artifactId>
<scope>provided</scope>
</dependency>
<dependencies>
<!-- Testing --> <!-- Testing -->
<dependency> <dependency>
<groupId>junit</groupId> <groupId>junit</groupId>
@ -51,92 +50,34 @@
<artifactId>fest-assert</artifactId> <artifactId>fest-assert</artifactId>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<!-- CDI, Weld, Arquillian -->
<dependency> <dependency>
<groupId>javax.enterprise</groupId> <groupId>org.apache.maven.shared</groupId>
<artifactId>cdi-api</artifactId> <artifactId>maven-verifier</artifactId>
</dependency>
<dependency>
<groupId>javax.inject</groupId>
<artifactId>javax.inject</artifactId>
</dependency>
<dependency>
<groupId>org.jboss.arquillian.junit</groupId>
<artifactId>arquillian-junit-container</artifactId>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency>
<groupId>org.jboss.arquillian.container</groupId>
<artifactId>arquillian-weld-se-embedded-1.1</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jboss.arquillian.container</groupId>
<artifactId>arquillian-container-test-api</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jboss.arquillian.junit</groupId>
<artifactId>arquillian-junit-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jboss.shrinkwrap</groupId>
<artifactId>shrinkwrap-api</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jboss.weld</groupId>
<artifactId>weld-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.glassfish</groupId>
<artifactId>javax.el</artifactId>
<scope>test</scope>
</dependency>
<!-- Spring -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
</dependency>
</dependencies> </dependencies>
<build> <build>
<testResources>
<testResource>
<directory>src/test/resources</directory>
<filtering>true</filtering>
</testResource>
</testResources>
<plugins> <plugins>
<plugin> <plugin>
<groupId>org.jvnet.jaxb2.maven2</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jaxb2-plugin</artifactId> <artifactId>maven-resources-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>generate</goal>
</goals>
</execution>
</executions>
<configuration> <configuration>
<schemaDirectory>${project.build.resources[0].directory}/schema/</schemaDirectory> <escapeString>\</escapeString>
<schemaIncludes> </configuration>
<include>**/test1.xsd</include> </plugin>
</schemaIncludes> <plugin>
<bindingDirectory>${project.build.resources[0].directory}/binding</bindingDirectory> <groupId>org.apache.maven.plugins</groupId>
<bindingIncludes> <artifactId>maven-compiler-plugin</artifactId>
<include>**/binding.xjb</include> <configuration>
</bindingIncludes> <source>1.8</source>
<extension>true</extension> <target>1.8</target>
<verbose>true</verbose>
<specVersion>2.1</specVersion>
</configuration> </configuration>
</plugin> </plugin>
<plugin> <plugin>
@ -176,6 +117,18 @@
<skip>true</skip> <skip>true</skip>
</configuration> </configuration>
</plugin> </plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<!-- do not execute the tests in a new process
to allow using the embedded mode of the Maven Verifier based tests -->
<forkCount>0</forkCount>
<systemPropertyVariables>
<verifier.forkMode>auto</verifier.forkMode>
</systemPropertyVariables>
</configuration>
</plugin>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId> <artifactId>maven-checkstyle-plugin</artifactId>

View File

@ -0,0 +1,33 @@
/**
* Copyright 2012-2014 Gunnar Morling (http://www.gunnarmorling.de/)
* and/or other contributors as indicated by the @authors tag. See the
* copyright.txt file in the distribution for a full listing of all
* contributors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.mapstruct.itest.tests;
import org.junit.runner.RunWith;
import org.mapstruct.itest.testutil.runner.ProcessorSuite;
import org.mapstruct.itest.testutil.runner.ProcessorSuite.ProcessorType;
import org.mapstruct.itest.testutil.runner.ProcessorSuiteRunner;
/**
* @author Andreas Gudian
*
*/
@RunWith( ProcessorSuiteRunner.class )
@ProcessorSuite( baseDir = "cdiTest", processorTypes = ProcessorType.ALL )
public class CdiTest {
}

View File

@ -0,0 +1,33 @@
/**
* Copyright 2012-2014 Gunnar Morling (http://www.gunnarmorling.de/)
* and/or other contributors as indicated by the @authors tag. See the
* copyright.txt file in the distribution for a full listing of all
* contributors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.mapstruct.itest.tests;
import org.junit.runner.RunWith;
import org.mapstruct.itest.testutil.runner.ProcessorSuite;
import org.mapstruct.itest.testutil.runner.ProcessorSuite.ProcessorType;
import org.mapstruct.itest.testutil.runner.ProcessorSuiteRunner;
/**
* @author Andreas Gudian
*
*/
@RunWith( ProcessorSuiteRunner.class )
@ProcessorSuite( baseDir = "java8Test", processorTypes = ProcessorType.ALL_JAVA_8 )
public class Java8Test {
}

View File

@ -0,0 +1,33 @@
/**
* Copyright 2012-2014 Gunnar Morling (http://www.gunnarmorling.de/)
* and/or other contributors as indicated by the @authors tag. See the
* copyright.txt file in the distribution for a full listing of all
* contributors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.mapstruct.itest.tests;
import org.junit.runner.RunWith;
import org.mapstruct.itest.testutil.runner.ProcessorSuite;
import org.mapstruct.itest.testutil.runner.ProcessorSuite.ProcessorType;
import org.mapstruct.itest.testutil.runner.ProcessorSuiteRunner;
/**
* @author Andreas Gudian
*
*/
@RunWith( ProcessorSuiteRunner.class )
@ProcessorSuite( baseDir = "jaxbTest", processorTypes = ProcessorType.ALL )
public class JaxbTest {
}

View File

@ -0,0 +1,33 @@
/**
* Copyright 2012-2014 Gunnar Morling (http://www.gunnarmorling.de/)
* and/or other contributors as indicated by the @authors tag. See the
* copyright.txt file in the distribution for a full listing of all
* contributors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.mapstruct.itest.tests;
import org.junit.runner.RunWith;
import org.mapstruct.itest.testutil.runner.ProcessorSuite;
import org.mapstruct.itest.testutil.runner.ProcessorSuite.ProcessorType;
import org.mapstruct.itest.testutil.runner.ProcessorSuiteRunner;
/**
* @author Andreas Gudian
*
*/
@RunWith( ProcessorSuiteRunner.class )
@ProcessorSuite( baseDir = "springTest", processorTypes = ProcessorType.ALL )
public class Jsr330Test {
}

View File

@ -0,0 +1,33 @@
/**
* Copyright 2012-2014 Gunnar Morling (http://www.gunnarmorling.de/)
* and/or other contributors as indicated by the @authors tag. See the
* copyright.txt file in the distribution for a full listing of all
* contributors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.mapstruct.itest.tests;
import org.junit.runner.RunWith;
import org.mapstruct.itest.testutil.runner.ProcessorSuite;
import org.mapstruct.itest.testutil.runner.ProcessorSuite.ProcessorType;
import org.mapstruct.itest.testutil.runner.ProcessorSuiteRunner;
/**
* @author Andreas Gudian
*
*/
@RunWith( ProcessorSuiteRunner.class )
@ProcessorSuite( baseDir = "simpleTest", processorTypes = ProcessorType.ALL )
public class SimpleTest {
}

View File

@ -0,0 +1,33 @@
/**
* Copyright 2012-2014 Gunnar Morling (http://www.gunnarmorling.de/)
* and/or other contributors as indicated by the @authors tag. See the
* copyright.txt file in the distribution for a full listing of all
* contributors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.mapstruct.itest.tests;
import org.junit.runner.RunWith;
import org.mapstruct.itest.testutil.runner.ProcessorSuite;
import org.mapstruct.itest.testutil.runner.ProcessorSuite.ProcessorType;
import org.mapstruct.itest.testutil.runner.ProcessorSuiteRunner;
/**
* @author Andreas Gudian
*
*/
@RunWith( ProcessorSuiteRunner.class )
@ProcessorSuite( baseDir = "springTest", processorTypes = ProcessorType.ALL )
public class SpringTest {
}

View File

@ -0,0 +1,156 @@
/**
* Copyright 2012-2014 Gunnar Morling (http://www.gunnarmorling.de/)
* and/or other contributors as indicated by the @authors tag. See the
* copyright.txt file in the distribution for a full listing of all
* contributors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.mapstruct.itest.testutil.runner;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* Declares the content of the integration test.
* <p />
* {@link #baseDir()} must be a path in the classpath that contains the maven module to run as integration test. The
* integration test module should contain at least one test class. The integration test passes, if
* {@code mvn clean test} finishes successfully.
* <p />
* {@link #processorTypes()} configures the variants to execute the integration tests with. See {@link ProcessorType}.
*
* @author Andreas Gudian
*/
@Retention( RetentionPolicy.RUNTIME )
@Documented
@Target( ElementType.TYPE )
public @interface ProcessorSuite {
/**
* Describes the type of the processing variant(s) to use when executing the integration test.
* <p />
* Types that require <a href="http://maven.apache.org/guides/mini/guide-using-toolchains.html">toolchains</a>, will
* need the toolchains.xml file to be either installed in ~/m2, or alternatively passed to the mvn process using
* {@code mvn -DprocessorIntegrationTest.toolchainsFile=/path/to/toolchains.xml ...}
*
* @author Andreas Gudian
*/
public enum ProcessorType {
/**
* Use an Oracle JDK 1.6 (or 1.6.x) via toolchain support to perform the processing
*/
ORACLE_JAVA_6( "oracle-[1.6,1.7)", "javac", "1.6" ),
/**
* Use an Oracle JDK 1.7 (or 1.7.x) via toolchain support to perform the processing
*/
ORACLE_JAVA_7( "oracle-[1.7,1.8)", "javac", "1.7" ),
/**
* Use the same JDK that runs the mvn build to perform the processing
*/
ORACLE_JAVA_8( null, "javac", "1.8" ),
/**
* Use the eclipse compiler with 1.7 source/target level from tycho-compiler-jdt to perform the build and
* processing
*/
ECLIPSE_JDT_JAVA_7( null, "jdt", "1.7" ),
/**
* Use the eclipse compiler with 1.8 source/target level from tycho-compiler-jdt to perform the build and
* processing
*/
ECLIPSE_JDT_JAVA_8( null, "jdt", "1.8" ),
/**
* Use the maven-processor-plugin with 1.7 source/target level with the same JDK that runs the mvn build to
* perform the processing
*/
PROCESSOR_PLUGIN_JAVA_7( null, null, "1.7" ),
/**
* Use the maven-processor-plugin with 1.8 source/target level with the same JDK that runs the mvn build to
* perform the processing
*/
PROCESSOR_PLUGIN_JAVA_8( null, null, "1.8" ),
/**
* Use all available processing variants
*/
ALL( ORACLE_JAVA_6, ORACLE_JAVA_7, ORACLE_JAVA_8, ECLIPSE_JDT_JAVA_7, ECLIPSE_JDT_JAVA_8,
PROCESSOR_PLUGIN_JAVA_7, PROCESSOR_PLUGIN_JAVA_8 ),
/**
* Use all JDK8 compatible processing variants
*/
ALL_JAVA_8( ORACLE_JAVA_8, ECLIPSE_JDT_JAVA_8, PROCESSOR_PLUGIN_JAVA_8 );
private ProcessorType[] included = { };
private String toolchain;
private String compilerId;
private String sourceTargetVersion;
private ProcessorType(String toolchain, String compilerId, String sourceTargetVersion) {
this.toolchain = toolchain;
this.compilerId = compilerId;
this.sourceTargetVersion = sourceTargetVersion;
}
private ProcessorType(ProcessorType... included) {
this.included = included;
}
/**
* @return the processor types that are grouped by this type
*/
public ProcessorType[] getIncluded() {
return included;
}
/**
* @return the toolchain
*/
public String getToolchain() {
return toolchain;
}
/**
* @return the compilerId
*/
public String getCompilerId() {
return compilerId;
}
/**
* @return the sourceTargetVersion
*/
public String getSourceTargetVersion() {
return sourceTargetVersion;
}
}
/**
* @return a path in the classpath that contains the maven module to run as integration test: {@code mvn clean test}
*/
String baseDir();
/**
* @return the variants to execute the integration tests with. See {@link ProcessorType}.
*/
ProcessorType[] processorTypes() default { ProcessorType.ALL };
}

View File

@ -0,0 +1,257 @@
/**
* Copyright 2012-2014 Gunnar Morling (http://www.gunnarmorling.de/)
* and/or other contributors as indicated by the @authors tag. See the
* copyright.txt file in the distribution for a full listing of all
* contributors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.mapstruct.itest.testutil.runner;
import java.io.File;
import java.io.IOException;
import java.io.PrintStream;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import org.apache.maven.it.Verifier;
import org.junit.internal.AssumptionViolatedException;
import org.junit.internal.runners.model.EachTestNotifier;
import org.junit.runner.Description;
import org.junit.runner.notification.RunNotifier;
import org.junit.runner.notification.StoppedByUserException;
import org.junit.runners.ParentRunner;
import org.junit.runners.model.InitializationError;
import org.mapstruct.itest.testutil.runner.ProcessorSuite.ProcessorType;
import org.mapstruct.itest.testutil.runner.ProcessorSuiteRunner.ProcessorTestCase;
import static org.apache.maven.it.util.ResourceExtractor.extractResourceToDestination;
import static org.apache.maven.shared.utils.io.FileUtils.copyURLToFile;
import static org.apache.maven.shared.utils.io.FileUtils.deleteDirectory;
/**
* Runner for processor integration tests. Requires the annotation {@link ProcessorSuite} on the test class.
*
* @author Andreas Gudian
*/
public class ProcessorSuiteRunner extends ParentRunner<ProcessorTestCase> {
public static final class ProcessorTestCase {
private final String baseDir;
private final ProcessorType processor;
private final boolean ignored;
public ProcessorTestCase(String baseDir, ProcessorType processor) {
this.baseDir = baseDir;
this.processor = processor;
this.ignored = !TOOLCHAINS_ENABLED && processor.getToolchain() != null;
}
}
private static final File SPECIFIED_TOOLCHAINS_FILE = getSpecifiedToolchainsFile();
private static final boolean TOOLCHAINS_ENABLED = toolchainsFileExists();
private final List<ProcessorTestCase> methods;
/**
* @param clazz the test class
* @throws InitializationError in case the initialization fails
*/
public ProcessorSuiteRunner(Class<?> clazz) throws InitializationError {
super( clazz );
ProcessorSuite suite = clazz.getAnnotation( ProcessorSuite.class );
if ( null == suite ) {
throw new InitializationError( "The test class must be annotated with " + ProcessorSuite.class.getName() );
}
if ( suite.processorTypes().length == 0 ) {
throw new InitializationError( "ProcessorSuite#processorTypes must not be empty" );
}
methods = initializeTestCases( suite );
}
private List<ProcessorTestCase> initializeTestCases(ProcessorSuite suite) {
List<ProcessorType> types = new ArrayList<ProcessorType>();
for ( ProcessorType compiler : suite.processorTypes() ) {
if ( compiler.getIncluded().length > 0 ) {
types.addAll( Arrays.asList( compiler.getIncluded() ) );
}
else {
types.add( compiler );
}
}
List<ProcessorTestCase> result = new ArrayList<ProcessorTestCase>( types.size() );
for ( ProcessorType type : types ) {
result.add( new ProcessorTestCase( suite.baseDir(), type ) );
}
return result;
}
@Override
protected List<ProcessorTestCase> getChildren() {
return methods;
}
@Override
protected Description describeChild(ProcessorTestCase child) {
return Description.createTestDescription( getTestClass().getJavaClass(), child.processor.name().toLowerCase() );
}
@Override
protected void runChild(ProcessorTestCase child, RunNotifier notifier) {
Description description = describeChild( child );
EachTestNotifier testNotifier = new EachTestNotifier( notifier, description );
if ( child.ignored ) {
testNotifier.fireTestIgnored();
}
else {
try {
testNotifier.fireTestStarted();
doExecute( child, description );
}
catch ( AssumptionViolatedException e ) {
testNotifier.fireTestIgnored();
}
catch ( StoppedByUserException e ) {
throw e;
}
catch ( Throwable e ) {
testNotifier.addFailure( e );
}
finally {
testNotifier.fireTestFinished();
}
}
}
private void doExecute(ProcessorTestCase child, Description description) throws Exception {
File destination = extractTest( child, description );
PrintStream originalOut = System.out;
Verifier verifier = new Verifier( destination.getCanonicalPath() );
List<String> goals = new ArrayList<String>( 3 );
goals.add( "clean" );
try {
configureToolchains( child, verifier, goals, originalOut );
configureProcessor( child, verifier );
verifier.addCliOption( "-Dcompiler-source-target-version=" + child.processor.getSourceTargetVersion() );
if ( "1.8".equals( child.processor.getSourceTargetVersion() ) ) {
verifier.addCliOption( "-Dmapstruct-artifact-id=mapstruct-jdk8" );
}
else {
verifier.addCliOption( "-Dmapstruct-artifact-id=mapstruct" );
}
goals.add( "test" );
originalOut.println( "executing " + child.processor.name().toLowerCase() );
verifier.executeGoals( goals );
verifier.verifyErrorFreeLog();
}
finally {
verifier.resetStreams();
}
}
private void configureProcessor(ProcessorTestCase child, Verifier verifier) {
if ( child.processor.getCompilerId() != null ) {
verifier.addCliOption( "-Pgenerate-via-compiler-plugin" );
verifier.addCliOption( "-Dcompiler-id=" + child.processor.getCompilerId() );
}
else {
verifier.addCliOption( "-Pgenerate-via-processor-plugin" );
}
}
private void configureToolchains(ProcessorTestCase child, Verifier verifier, List<String> goals,
PrintStream originalOut) {
if ( child.processor.getToolchain() != null ) {
if ( null != SPECIFIED_TOOLCHAINS_FILE ) {
verifier.addCliOption( "--toolchains" );
verifier.addCliOption( SPECIFIED_TOOLCHAINS_FILE.getPath().replace( '\\', '/' ) );
}
String[] parts = child.processor.getToolchain().split( "-" );
verifier.addCliOption( "-Dtoolchain-jdk-vendor=" + parts[0] );
verifier.addCliOption( "-Dtoolchain-jdk-version=" + parts[1] );
goals.add( "toolchains:toolchain" );
}
}
private File extractTest(ProcessorTestCase child, Description description) throws IOException {
File tempDirBase = new File( "target/tmp", description.getClassName() ).getCanonicalFile();
if ( !tempDirBase.exists() ) {
tempDirBase.mkdirs();
}
File parentPom = new File( tempDirBase, "pom.xml" );
copyURLToFile( getClass().getResource( "/pom.xml" ), parentPom );
File tempDir = new File( tempDirBase, description.getMethodName() );
deleteDirectory( tempDir );
return extractResourceToDestination( getClass(), "/" + child.baseDir, tempDir, true );
}
private static File getSpecifiedToolchainsFile() {
String specifiedToolchainsFile = System.getProperty( "processorIntegrationTest.toolchainsFile" );
if ( null != specifiedToolchainsFile ) {
try {
File canonical = new File( specifiedToolchainsFile ).getCanonicalFile();
if ( canonical.exists() ) {
return canonical;
}
// check the path relative to the parent directory (allows specifying a path relative to the top-level
// aggregator module)
canonical = new File( "..", specifiedToolchainsFile ).getCanonicalFile();
if ( canonical.exists() ) {
return canonical;
}
}
catch ( IOException e ) {
return null;
}
}
return null;
}
private static boolean toolchainsFileExists() {
if ( null != SPECIFIED_TOOLCHAINS_FILE ) {
return SPECIFIED_TOOLCHAINS_FILE.exists();
}
String defaultPath = System.getProperty( "user.home" ) + System.getProperty( "file.separator" ) + ".m2";
return new File( defaultPath, "toolchains.xml" ).exists();
}
}

View File

@ -0,0 +1,81 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2012-2014 Gunnar Morling (http://www.gunnarmorling.de/)
and/or other contributors as indicated by the @authors tag. See the
copyright.txt file in the distribution for a full listing of all
contributors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct-it-parent</artifactId>
<version>1.0.0</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>cdiTest</artifactId>
<packaging>jar</packaging>
<dependencies>
<!-- CDI, Weld, Arquillian -->
<dependency>
<groupId>javax.enterprise</groupId>
<artifactId>cdi-api</artifactId>
</dependency>
<dependency>
<groupId>javax.inject</groupId>
<artifactId>javax.inject</artifactId>
</dependency>
<dependency>
<groupId>org.jboss.arquillian.junit</groupId>
<artifactId>arquillian-junit-container</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jboss.arquillian.container</groupId>
<artifactId>arquillian-weld-se-embedded-1.1</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jboss.arquillian.container</groupId>
<artifactId>arquillian-container-test-api</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jboss.arquillian.junit</groupId>
<artifactId>arquillian-junit-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jboss.shrinkwrap</groupId>
<artifactId>shrinkwrap-api</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jboss.weld</groupId>
<artifactId>weld-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.glassfish</groupId>
<artifactId>javax.el</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
</project>

View File

@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2012-2014 Gunnar Morling (http://www.gunnarmorling.de/)
and/or other contributors as indicated by the @authors tag. See the
copyright.txt file in the distribution for a full listing of all
contributors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct-it-parent</artifactId>
<version>1.0.0</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>java8Test</artifactId>
<packaging>jar</packaging>
</project>

View File

@ -0,0 +1,65 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2012-2014 Gunnar Morling (http://www.gunnarmorling.de/)
and/or other contributors as indicated by the @authors tag. See the
copyright.txt file in the distribution for a full listing of all
contributors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct-it-parent</artifactId>
<version>1.0.0</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>jaxbTest</artifactId>
<packaging>jar</packaging>
<build>
<plugins>
<plugin>
<groupId>org.jvnet.jaxb2.maven2</groupId>
<artifactId>maven-jaxb2-plugin</artifactId>
<executions>
<execution>
<phase>initialize</phase>
<goals>
<goal>generate</goal>
</goals>
</execution>
</executions>
<configuration>
<schemaDirectory>\${project.build.resources[0].directory}/schema/</schemaDirectory>
<schemaIncludes>
<include>**/test1.xsd</include>
</schemaIncludes>
<bindingDirectory>\${project.build.resources[0].directory}/binding</bindingDirectory>
<bindingIncludes>
<include>**/binding.xjb</include>
</bindingIncludes>
<extension>true</extension>
<verbose>true</verbose>
<specVersion>2.1</specVersion>
</configuration>
</plugin>
</plugins>
</build>
</project>

View File

@ -0,0 +1,50 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2012-2014 Gunnar Morling (http://www.gunnarmorling.de/)
and/or other contributors as indicated by the @authors tag. See the
copyright.txt file in the distribution for a full listing of all
contributors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct-it-parent</artifactId>
<version>1.0.0</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>jsr330Test</artifactId>
<packaging>jar</packaging>
<dependencies>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
</dependency>
</dependencies>
</project>

View File

@ -0,0 +1,180 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2012-2014 Gunnar Morling (http://www.gunnarmorling.de/)
and/or other contributors as indicated by the @authors tag. See the
copyright.txt file in the distribution for a full listing of all
contributors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct-parent</artifactId>
<version>${mapstruct.version}</version>
<relativePath>../../../../parent/pom.xml</relativePath>
</parent>
<version>1.0.0</version>
<artifactId>mapstruct-it-parent</artifactId>
<packaging>pom</packaging>
<name>MapStruct Integration Test Parent</name>
<properties>
<mapstruct.version>${mapstruct.version}</mapstruct.version>
<mapstruct-artifact-id>foobar</mapstruct-artifact-id>
<toolchain-jdk-version></toolchain-jdk-version>
<toolchain-jdk-vendor></toolchain-jdk-vendor>
<compiler-id></compiler-id>
<compiler-source-target-version></compiler-source-target-version>
</properties>
<profiles>
<profile>
<id>generate-via-compiler-plugin</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<compilerArgument
combine.self="override"></compilerArgument>
<compilerId>\${compiler-id}</compilerId>
</configuration>
<dependencies>
<dependency>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-compiler-jdt</artifactId>
<version>0.21.0</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>mapstruct-processor</artifactId>
<version>${mapstruct.version}</version>
<scope>provided</scope>
</dependency>
</dependencies>
</profile>
<profile>
<id>generate-via-processor-plugin</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.bsc.maven</groupId>
<artifactId>maven-processor-plugin</artifactId>
<executions>
<execution>
<id>process</id>
<phase>generate-sources</phase>
<goals>
<goal>process</goal>
</goals>
</execution>
</executions>
<configuration>
<defaultOutputDirectory>\${project.build.directory}/generated-sources/mapstruct</defaultOutputDirectory>
<processors>
<processor>org.mapstruct.ap.MappingProcessor</processor>
</processors>
</configuration>
<dependencies>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>mapstruct-processor</artifactId>
<version>${mapstruct.version}</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
</profile>
</profiles>
<dependencies>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>\${mapstruct-artifact-id}</artifactId>
<version>${mapstruct.version}</version>
<scope>provided</scope>
</dependency>
<!-- Testing -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.easytesting</groupId>
<artifactId>fest-assert</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>\${compiler-source-target-version}</source>
<target>\${compiler-source-target-version}</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-toolchains-plugin</artifactId>
<version>1.0</version>
<configuration>
<toolchains>
<jdk>
<version>\${toolchain-jdk-version}</version>
<vendor>\${toolchain-jdk-vendor}</vendor>
</jdk>
</toolchains>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<forkCount>0</forkCount>
</configuration>
</plugin>
</plugins>
</build>
</project>

View File

@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2012-2014 Gunnar Morling (http://www.gunnarmorling.de/)
and/or other contributors as indicated by the @authors tag. See the
copyright.txt file in the distribution for a full listing of all
contributors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct-it-parent</artifactId>
<version>1.0.0</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>simpleTest</artifactId>
<packaging>jar</packaging>
</project>

View File

@ -16,7 +16,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package org.mapstruct.itest; package org.mapstruct.itest.simple;
public class Source { public class Source {

View File

@ -16,7 +16,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package org.mapstruct.itest; package org.mapstruct.itest.simple;
import org.mapstruct.Mapper; import org.mapstruct.Mapper;
import org.mapstruct.Mapping; import org.mapstruct.Mapping;

View File

@ -16,7 +16,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package org.mapstruct.itest; package org.mapstruct.itest.simple;
public class Target { public class Target {

View File

@ -16,11 +16,14 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package org.mapstruct.itest; package org.mapstruct.itest.simple;
import static org.fest.assertions.Assertions.assertThat; import static org.fest.assertions.Assertions.assertThat;
import org.junit.Test; import org.junit.Test;
import org.mapstruct.itest.simple.Source;
import org.mapstruct.itest.simple.SourceTargetMapper;
import org.mapstruct.itest.simple.Target;
public class ConversionTest { public class ConversionTest {

View File

@ -0,0 +1,50 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2012-2014 Gunnar Morling (http://www.gunnarmorling.de/)
and/or other contributors as indicated by the @authors tag. See the
copyright.txt file in the distribution for a full listing of all
contributors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct-it-parent</artifactId>
<version>1.0.0</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>springTest</artifactId>
<packaging>jar</packaging>
<dependencies>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
</dependency>
</dependencies>
</project>

View File

@ -200,6 +200,11 @@
<artifactId>mapstruct-processor</artifactId> <artifactId>mapstruct-processor</artifactId>
<version>${project.version}</version> <version>${project.version}</version>
</dependency> </dependency>
<dependency>
<groupId>org.apache.maven.shared</groupId>
<artifactId>maven-verifier</artifactId>
<version>1.5</version>
</dependency>
<!-- Not directly used but required for dependency convergence --> <!-- Not directly used but required for dependency convergence -->
<dependency> <dependency>
@ -226,7 +231,7 @@
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId> <artifactId>maven-checkstyle-plugin</artifactId>
<version>2.10</version> <version>2.12.1</version>
<configuration> <configuration>
<configLocation>build-config/checkstyle.xml</configLocation> <configLocation>build-config/checkstyle.xml</configLocation>
<consoleOutput>true</consoleOutput> <consoleOutput>true</consoleOutput>
@ -446,6 +451,7 @@
<exclude>copyright.txt</exclude> <exclude>copyright.txt</exclude>
<exclude>**/license.txt</exclude> <exclude>**/license.txt</exclude>
<exclude>**/mapstruct.xml</exclude> <exclude>**/mapstruct.xml</exclude>
<exclude>**/toolchains-*.xml</exclude>
<exclude>**/eclipse-formatter-config.xml</exclude> <exclude>**/eclipse-formatter-config.xml</exclude>
<exclude>maven-settings.xml</exclude> <exclude>maven-settings.xml</exclude>
<exclude>readme.md</exclude> <exclude>readme.md</exclude>

View File

@ -42,7 +42,6 @@
<module>core-jdk8</module> <module>core-jdk8</module>
<module>processor</module> <module>processor</module>
<module>integrationtest</module> <module>integrationtest</module>
<module>integrationtest-jdk8</module>
</modules> </modules>
<build> <build>