mirror of
https://github.com/mapstruct/mapstruct.git
synced 2025-07-12 00:00:08 +08:00
Java EA GitHub Actions improvements (#3803)
* Use Java 17 for building MapStruct (still Java 8 compatible) * Upgrade to Spring 6 for tests * Adjust excludes and min tests version for some integration tests
This commit is contained in:
parent
e0a7d3d0e6
commit
57d4f88a48
6
.github/workflows/java-ea.yml
vendored
6
.github/workflows/java-ea.yml
vendored
@ -7,11 +7,7 @@ env:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test_jdk_ea:
|
test_jdk_ea:
|
||||||
strategy:
|
name: 'Linux JDK EA'
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
java: [19-ea]
|
|
||||||
name: 'Linux JDK ${{ matrix.java }}'
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: 'Checkout'
|
- name: 'Checkout'
|
||||||
|
43
.github/workflows/main.yml
vendored
43
.github/workflows/main.yml
vendored
@ -24,45 +24,38 @@ jobs:
|
|||||||
distribution: 'zulu'
|
distribution: 'zulu'
|
||||||
java-version: ${{ matrix.java }}
|
java-version: ${{ matrix.java }}
|
||||||
- name: 'Test'
|
- name: 'Test'
|
||||||
run: ./mvnw ${MAVEN_ARGS} -Djacoco.skip=true install -DskipDistribution=true
|
run: ./mvnw ${MAVEN_ARGS} -Djacoco.skip=${{ matrix.java != 17 }} install -DskipDistribution=${{ matrix.java != 17 }}
|
||||||
linux:
|
|
||||||
name: 'Linux JDK 11'
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: 'Checkout'
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
- name: 'Set up JDK 11'
|
|
||||||
uses: actions/setup-java@v3
|
|
||||||
with:
|
|
||||||
distribution: 'zulu'
|
|
||||||
java-version: 11
|
|
||||||
- name: 'Test'
|
|
||||||
run: ./mvnw ${MAVEN_ARGS} install
|
|
||||||
- name: 'Generate coverage report'
|
- name: 'Generate coverage report'
|
||||||
|
if: matrix.java == 17
|
||||||
run: ./mvnw jacoco:report
|
run: ./mvnw jacoco:report
|
||||||
- name: 'Upload coverage to Codecov'
|
- name: 'Upload coverage to Codecov'
|
||||||
|
if: matrix.java == 17
|
||||||
uses: codecov/codecov-action@v2
|
uses: codecov/codecov-action@v2
|
||||||
- name: 'Publish Snapshots'
|
- name: 'Publish Snapshots'
|
||||||
if: github.event_name == 'push' && github.ref == 'refs/heads/main' && github.repository == 'mapstruct/mapstruct'
|
if: matrix.java == 17 && github.event_name == 'push' && github.ref == 'refs/heads/main' && github.repository == 'mapstruct/mapstruct'
|
||||||
run: ./mvnw -s etc/ci-settings.xml -DskipTests=true -DskipDistribution=true deploy
|
run: ./mvnw -s etc/ci-settings.xml -DskipTests=true -DskipDistribution=true deploy
|
||||||
linux-jdk-8:
|
integration_test_jdk:
|
||||||
name: 'Linux JDK 8'
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
java: [ 8, 11 ]
|
||||||
|
name: 'Linux JDK ${{ matrix.java }}'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: 'Checkout'
|
- name: 'Checkout'
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
- name: 'Set up JDK 11 for building everything'
|
- name: 'Set up JDK 17 for building everything'
|
||||||
uses: actions/setup-java@v3
|
uses: actions/setup-java@v3
|
||||||
with:
|
with:
|
||||||
distribution: 'zulu'
|
distribution: 'zulu'
|
||||||
java-version: 11
|
java-version: 17
|
||||||
- name: 'Install Processor'
|
- name: 'Install Processor'
|
||||||
run: ./mvnw ${MAVEN_ARGS} -DskipTests install -pl processor -am
|
run: ./mvnw ${MAVEN_ARGS} -DskipTests install -pl processor -am
|
||||||
- name: 'Set up JDK 8 for running integration tests'
|
- name: 'Set up JDK ${{ matrix.java }} for running integration tests'
|
||||||
uses: actions/setup-java@v3
|
uses: actions/setup-java@v3
|
||||||
with:
|
with:
|
||||||
distribution: 'zulu'
|
distribution: 'zulu'
|
||||||
java-version: 8
|
java-version: ${{ matrix.java }}
|
||||||
- name: 'Run integration tests'
|
- name: 'Run integration tests'
|
||||||
run: ./mvnw ${MAVEN_ARGS} verify -pl integrationtest
|
run: ./mvnw ${MAVEN_ARGS} verify -pl integrationtest
|
||||||
windows:
|
windows:
|
||||||
@ -70,11 +63,11 @@ jobs:
|
|||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- name: 'Set up JDK 11'
|
- name: 'Set up JDK 17'
|
||||||
uses: actions/setup-java@v3
|
uses: actions/setup-java@v3
|
||||||
with:
|
with:
|
||||||
distribution: 'zulu'
|
distribution: 'zulu'
|
||||||
java-version: 11
|
java-version: 17
|
||||||
- name: 'Test'
|
- name: 'Test'
|
||||||
run: ./mvnw %MAVEN_ARGS% install
|
run: ./mvnw %MAVEN_ARGS% install
|
||||||
mac:
|
mac:
|
||||||
@ -82,10 +75,10 @@ jobs:
|
|||||||
runs-on: macos-latest
|
runs-on: macos-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- name: 'Set up JDK 11'
|
- name: 'Set up JDK 17'
|
||||||
uses: actions/setup-java@v3
|
uses: actions/setup-java@v3
|
||||||
with:
|
with:
|
||||||
distribution: 'zulu'
|
distribution: 'zulu'
|
||||||
java-version: 11
|
java-version: 17
|
||||||
- name: 'Test'
|
- name: 'Test'
|
||||||
run: ./mvnw ${MAVEN_ARGS} install
|
run: ./mvnw ${MAVEN_ARGS} install
|
||||||
|
2
.github/workflows/release.yml
vendored
2
.github/workflows/release.yml
vendored
@ -22,7 +22,7 @@ jobs:
|
|||||||
- name: Setup Java
|
- name: Setup Java
|
||||||
uses: actions/setup-java@v4
|
uses: actions/setup-java@v4
|
||||||
with:
|
with:
|
||||||
java-version: 11
|
java-version: 17
|
||||||
distribution: 'zulu'
|
distribution: 'zulu'
|
||||||
cache: maven
|
cache: maven
|
||||||
|
|
||||||
|
@ -30,6 +30,7 @@ public final class FullFeatureCompilationExclusionCliEnhancer implements Process
|
|||||||
|
|
||||||
switch ( currentJreVersion ) {
|
switch ( currentJreVersion ) {
|
||||||
case JAVA_8:
|
case JAVA_8:
|
||||||
|
additionalExcludes.add( "org/mapstruct/ap/test/**/spring/**/*.java" );
|
||||||
additionalExcludes.add( "org/mapstruct/ap/test/injectionstrategy/cdi/**/*.java" );
|
additionalExcludes.add( "org/mapstruct/ap/test/injectionstrategy/cdi/**/*.java" );
|
||||||
additionalExcludes.add( "org/mapstruct/ap/test/injectionstrategy/jakarta_cdi/**/*.java" );
|
additionalExcludes.add( "org/mapstruct/ap/test/injectionstrategy/jakarta_cdi/**/*.java" );
|
||||||
additionalExcludes.add( "org/mapstruct/ap/test/annotatewith/deprecated/jdk11/*.java" );
|
additionalExcludes.add( "org/mapstruct/ap/test/annotatewith/deprecated/jdk11/*.java" );
|
||||||
@ -42,6 +43,8 @@ public final class FullFeatureCompilationExclusionCliEnhancer implements Process
|
|||||||
// TODO find out why this fails:
|
// TODO find out why this fails:
|
||||||
additionalExcludes.add( "org/mapstruct/ap/test/collection/wildcard/BeanMapper.java" );
|
additionalExcludes.add( "org/mapstruct/ap/test/collection/wildcard/BeanMapper.java" );
|
||||||
break;
|
break;
|
||||||
|
case JAVA_11:
|
||||||
|
additionalExcludes.add( "org/mapstruct/ap/test/**/spring/**/*.java" );
|
||||||
default:
|
default:
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
*/
|
*/
|
||||||
package org.mapstruct.itest.tests;
|
package org.mapstruct.itest.tests;
|
||||||
|
|
||||||
|
import org.junit.jupiter.api.condition.DisabledOnJre;
|
||||||
import org.junit.jupiter.api.condition.EnabledForJreRange;
|
import org.junit.jupiter.api.condition.EnabledForJreRange;
|
||||||
import org.junit.jupiter.api.condition.JRE;
|
import org.junit.jupiter.api.condition.JRE;
|
||||||
import org.junit.jupiter.api.parallel.Execution;
|
import org.junit.jupiter.api.parallel.Execution;
|
||||||
@ -80,12 +81,15 @@ public class MavenIntegrationTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@ProcessorTest(baseDir = "jsr330Test")
|
@ProcessorTest(baseDir = "jsr330Test")
|
||||||
|
@EnabledForJreRange(min = JRE.JAVA_17)
|
||||||
|
@DisabledOnJre(JRE.OTHER)
|
||||||
void jsr330Test() {
|
void jsr330Test() {
|
||||||
}
|
}
|
||||||
|
|
||||||
@ProcessorTest(baseDir = "lombokBuilderTest", processorTypes = {
|
@ProcessorTest(baseDir = "lombokBuilderTest", processorTypes = {
|
||||||
ProcessorTest.ProcessorType.JAVAC
|
ProcessorTest.ProcessorType.JAVAC
|
||||||
})
|
})
|
||||||
|
@DisabledOnJre(JRE.OTHER)
|
||||||
void lombokBuilderTest() {
|
void lombokBuilderTest() {
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -94,6 +98,7 @@ public class MavenIntegrationTest {
|
|||||||
ProcessorTest.ProcessorType.JAVAC_WITH_PATHS
|
ProcessorTest.ProcessorType.JAVAC_WITH_PATHS
|
||||||
})
|
})
|
||||||
@EnabledForJreRange(min = JRE.JAVA_11)
|
@EnabledForJreRange(min = JRE.JAVA_11)
|
||||||
|
@DisabledOnJre(JRE.OTHER)
|
||||||
void lombokModuleTest() {
|
void lombokModuleTest() {
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -150,6 +155,7 @@ public class MavenIntegrationTest {
|
|||||||
}, forkJvm = true)
|
}, forkJvm = true)
|
||||||
// We have to fork the jvm because there is an NPE in com.intellij.openapi.util.SystemInfo.getRtVersion
|
// We have to fork the jvm because there is an NPE in com.intellij.openapi.util.SystemInfo.getRtVersion
|
||||||
// and the kotlin-maven-plugin uses that. See also https://youtrack.jetbrains.com/issue/IDEA-238907
|
// and the kotlin-maven-plugin uses that. See also https://youtrack.jetbrains.com/issue/IDEA-238907
|
||||||
|
@DisabledOnJre(JRE.OTHER)
|
||||||
void kotlinDataTest() {
|
void kotlinDataTest() {
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -163,6 +169,8 @@ public class MavenIntegrationTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@ProcessorTest(baseDir = "springTest")
|
@ProcessorTest(baseDir = "springTest")
|
||||||
|
@EnabledForJreRange(min = JRE.JAVA_17)
|
||||||
|
@DisabledOnJre(JRE.OTHER)
|
||||||
void springTest() {
|
void springTest() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -134,14 +134,20 @@ public class ProcessorInvocationInterceptor implements InvocationInterceptor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void configureProcessor(Verifier verifier) {
|
private void configureProcessor(Verifier verifier) {
|
||||||
String compilerId = processorTestContext.getProcessor().getCompilerId();
|
ProcessorTest.ProcessorType processor = processorTestContext.getProcessor();
|
||||||
|
String compilerId = processor.getCompilerId();
|
||||||
if ( compilerId != null ) {
|
if ( compilerId != null ) {
|
||||||
String profile = processorTestContext.getProcessor().getProfile();
|
String profile = processor.getProfile();
|
||||||
if ( profile == null ) {
|
if ( profile == null ) {
|
||||||
profile = "generate-via-compiler-plugin";
|
profile = "generate-via-compiler-plugin";
|
||||||
}
|
}
|
||||||
verifier.addCliOption( "-P" + profile );
|
verifier.addCliOption( "-P" + profile );
|
||||||
verifier.addCliOption( "-Dcompiler-id=" + compilerId );
|
verifier.addCliOption( "-Dcompiler-id=" + compilerId );
|
||||||
|
if ( processor == ProcessorTest.ProcessorType.JAVAC ) {
|
||||||
|
if ( CURRENT_VERSION.ordinal() >= JRE.JAVA_21.ordinal() ) {
|
||||||
|
verifier.addCliOption( "-Dmaven.compiler.proc=full" );
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
verifier.addCliOption( "-Pgenerate-via-processor-plugin" );
|
verifier.addCliOption( "-Pgenerate-via-processor-plugin" );
|
||||||
|
@ -27,6 +27,11 @@
|
|||||||
<additionalExclude4>x</additionalExclude4>
|
<additionalExclude4>x</additionalExclude4>
|
||||||
<additionalExclude5>x</additionalExclude5>
|
<additionalExclude5>x</additionalExclude5>
|
||||||
<additionalExclude6>x</additionalExclude6>
|
<additionalExclude6>x</additionalExclude6>
|
||||||
|
<additionalExclude7>x</additionalExclude7>
|
||||||
|
<additionalExclude8>x</additionalExclude8>
|
||||||
|
<additionalExclude9>x</additionalExclude9>
|
||||||
|
<additionalExclude10>x</additionalExclude10>
|
||||||
|
<additionalExclude11>x</additionalExclude11>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
@ -49,6 +54,11 @@
|
|||||||
<exclude>${additionalExclude4}</exclude>
|
<exclude>${additionalExclude4}</exclude>
|
||||||
<exclude>${additionalExclude5}</exclude>
|
<exclude>${additionalExclude5}</exclude>
|
||||||
<exclude>${additionalExclude6}</exclude>
|
<exclude>${additionalExclude6}</exclude>
|
||||||
|
<exclude>${additionalExclude7}</exclude>
|
||||||
|
<exclude>${additionalExclude8}</exclude>
|
||||||
|
<exclude>${additionalExclude9}</exclude>
|
||||||
|
<exclude>${additionalExclude10}</exclude>
|
||||||
|
<exclude>${additionalExclude11}</exclude>
|
||||||
</excludes>
|
</excludes>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
@ -32,7 +32,6 @@
|
|||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-compiler-plugin</artifactId>
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
<version>3.1</version>
|
|
||||||
<configuration>
|
<configuration>
|
||||||
<compilerArgs>
|
<compilerArgs>
|
||||||
<compilerArg>-proc:none</compilerArg>
|
<compilerArg>-proc:none</compilerArg>
|
||||||
|
@ -38,7 +38,6 @@
|
|||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-compiler-plugin</artifactId>
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
<version>3.1</version>
|
|
||||||
<configuration>
|
<configuration>
|
||||||
<compilerArgs>
|
<compilerArgs>
|
||||||
<compilerArg>-XprintProcessorInfo</compilerArg>
|
<compilerArg>-XprintProcessorInfo</compilerArg>
|
||||||
|
@ -32,7 +32,6 @@
|
|||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-compiler-plugin</artifactId>
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
<version>3.1</version>
|
|
||||||
<configuration>
|
<configuration>
|
||||||
<compilerArgs>
|
<compilerArgs>
|
||||||
<compilerArg>-proc:none</compilerArg>
|
<compilerArg>-proc:none</compilerArg>
|
||||||
|
@ -38,7 +38,6 @@
|
|||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-compiler-plugin</artifactId>
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
<version>3.1</version>
|
|
||||||
<configuration>
|
<configuration>
|
||||||
<compilerArgs>
|
<compilerArgs>
|
||||||
<compilerArg>-XprintProcessorInfo</compilerArg>
|
<compilerArg>-XprintProcessorInfo</compilerArg>
|
||||||
|
@ -34,7 +34,7 @@
|
|||||||
<org.apache.maven.plugins.enforcer.version>3.4.1</org.apache.maven.plugins.enforcer.version>
|
<org.apache.maven.plugins.enforcer.version>3.4.1</org.apache.maven.plugins.enforcer.version>
|
||||||
<org.apache.maven.plugins.surefire.version>3.2.2</org.apache.maven.plugins.surefire.version>
|
<org.apache.maven.plugins.surefire.version>3.2.2</org.apache.maven.plugins.surefire.version>
|
||||||
<org.apache.maven.plugins.javadoc.version>3.1.0</org.apache.maven.plugins.javadoc.version>
|
<org.apache.maven.plugins.javadoc.version>3.1.0</org.apache.maven.plugins.javadoc.version>
|
||||||
<org.springframework.version>5.3.31</org.springframework.version>
|
<org.springframework.version>6.2.2</org.springframework.version>
|
||||||
<org.eclipse.tycho.compiler-jdt.version>1.6.0</org.eclipse.tycho.compiler-jdt.version>
|
<org.eclipse.tycho.compiler-jdt.version>1.6.0</org.eclipse.tycho.compiler-jdt.version>
|
||||||
<com.puppycrawl.tools.checkstyle.version>8.36.1</com.puppycrawl.tools.checkstyle.version>
|
<com.puppycrawl.tools.checkstyle.version>8.36.1</com.puppycrawl.tools.checkstyle.version>
|
||||||
<org.junit.jupiter.version>5.10.1</org.junit.jupiter.version>
|
<org.junit.jupiter.version>5.10.1</org.junit.jupiter.version>
|
||||||
@ -47,7 +47,7 @@
|
|||||||
<m2e.apt.activation>jdt_apt</m2e.apt.activation>
|
<m2e.apt.activation>jdt_apt</m2e.apt.activation>
|
||||||
<!--
|
<!--
|
||||||
The minimum Java Version that is needed to build a module in MapStruct.
|
The minimum Java Version that is needed to build a module in MapStruct.
|
||||||
The processor module needs at least Java 11.
|
The processor module needs at least Java 17.
|
||||||
-->
|
-->
|
||||||
<minimum.java.version>1.8</minimum.java.version>
|
<minimum.java.version>1.8</minimum.java.version>
|
||||||
<protobuf.version>3.21.7</protobuf.version>
|
<protobuf.version>3.21.7</protobuf.version>
|
||||||
@ -400,7 +400,7 @@
|
|||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-compiler-plugin</artifactId>
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
<version>3.8.1</version>
|
<version>3.13.0</version>
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
<!-- Netbeans has a problem when we use late binding with @ in the surefire arg line.
|
<!-- Netbeans has a problem when we use late binding with @ in the surefire arg line.
|
||||||
Therefore we set this empty property here-->
|
Therefore we set this empty property here-->
|
||||||
<jacocoArgLine />
|
<jacocoArgLine />
|
||||||
<minimum.java.version>11</minimum.java.version>
|
<minimum.java.version>17</minimum.java.version>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
*
|
*
|
||||||
* Licensed under the Apache License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0
|
* Licensed under the Apache License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*/
|
*/
|
||||||
package org.mapstruct.ap.test.bugs._1395;
|
package org.mapstruct.ap.test.bugs._1395.spring;
|
||||||
|
|
||||||
import org.mapstruct.InjectionStrategy;
|
import org.mapstruct.InjectionStrategy;
|
||||||
import org.mapstruct.Mapper;
|
import org.mapstruct.Mapper;
|
@ -3,7 +3,7 @@
|
|||||||
*
|
*
|
||||||
* Licensed under the Apache License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0
|
* Licensed under the Apache License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*/
|
*/
|
||||||
package org.mapstruct.ap.test.bugs._1395;
|
package org.mapstruct.ap.test.bugs._1395.spring;
|
||||||
|
|
||||||
import org.mapstruct.ap.testutil.IssueKey;
|
import org.mapstruct.ap.testutil.IssueKey;
|
||||||
import org.mapstruct.ap.testutil.ProcessorTest;
|
import org.mapstruct.ap.testutil.ProcessorTest;
|
@ -3,7 +3,7 @@
|
|||||||
*
|
*
|
||||||
* Licensed under the Apache License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0
|
* Licensed under the Apache License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*/
|
*/
|
||||||
package org.mapstruct.ap.test.bugs._1395;
|
package org.mapstruct.ap.test.bugs._1395.spring;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Filip Hrisafov
|
* @author Filip Hrisafov
|
@ -3,7 +3,7 @@
|
|||||||
*
|
*
|
||||||
* Licensed under the Apache License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0
|
* Licensed under the Apache License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*/
|
*/
|
||||||
package org.mapstruct.ap.test.bugs._1395;
|
package org.mapstruct.ap.test.bugs._1395.spring;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Filip Hrisafov
|
* @author Filip Hrisafov
|
@ -3,7 +3,7 @@
|
|||||||
*
|
*
|
||||||
* Licensed under the Apache License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0
|
* Licensed under the Apache License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*/
|
*/
|
||||||
package org.mapstruct.ap.test.bugs._1395;
|
package org.mapstruct.ap.test.bugs._1395.spring;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Filip Hrisafov
|
* @author Filip Hrisafov
|
@ -3,11 +3,11 @@
|
|||||||
*
|
*
|
||||||
* Licensed under the Apache License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0
|
* Licensed under the Apache License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*/
|
*/
|
||||||
package org.mapstruct.ap.test.bugs._2807;
|
package org.mapstruct.ap.test.bugs._2807.spring;
|
||||||
|
|
||||||
import org.mapstruct.ap.test.bugs._2807.after.AfterMethod;
|
import org.mapstruct.ap.test.bugs._2807.spring.after.AfterMethod;
|
||||||
import org.mapstruct.ap.test.bugs._2807.before.BeforeMethod;
|
import org.mapstruct.ap.test.bugs._2807.spring.before.BeforeMethod;
|
||||||
import org.mapstruct.ap.test.bugs._2807.beforewithtarget.BeforeWithTarget;
|
import org.mapstruct.ap.test.bugs._2807.spring.beforewithtarget.BeforeWithTarget;
|
||||||
import org.mapstruct.ap.testutil.IssueKey;
|
import org.mapstruct.ap.testutil.IssueKey;
|
||||||
import org.mapstruct.ap.testutil.ProcessorTest;
|
import org.mapstruct.ap.testutil.ProcessorTest;
|
||||||
import org.mapstruct.ap.testutil.WithClasses;
|
import org.mapstruct.ap.testutil.WithClasses;
|
@ -3,15 +3,15 @@
|
|||||||
*
|
*
|
||||||
* Licensed under the Apache License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0
|
* Licensed under the Apache License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*/
|
*/
|
||||||
package org.mapstruct.ap.test.bugs._2807;
|
package org.mapstruct.ap.test.bugs._2807.spring;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.mapstruct.Mapper;
|
import org.mapstruct.Mapper;
|
||||||
import org.mapstruct.ReportingPolicy;
|
import org.mapstruct.ReportingPolicy;
|
||||||
import org.mapstruct.ap.test.bugs._2807.after.AfterMethod;
|
import org.mapstruct.ap.test.bugs._2807.spring.after.AfterMethod;
|
||||||
import org.mapstruct.ap.test.bugs._2807.before.BeforeMethod;
|
import org.mapstruct.ap.test.bugs._2807.spring.before.BeforeMethod;
|
||||||
import org.mapstruct.ap.test.bugs._2807.beforewithtarget.BeforeWithTarget;
|
import org.mapstruct.ap.test.bugs._2807.spring.beforewithtarget.BeforeWithTarget;
|
||||||
import org.mapstruct.factory.Mappers;
|
import org.mapstruct.factory.Mappers;
|
||||||
|
|
||||||
/**
|
/**
|
@ -3,7 +3,7 @@
|
|||||||
*
|
*
|
||||||
* Licensed under the Apache License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0
|
* Licensed under the Apache License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*/
|
*/
|
||||||
package org.mapstruct.ap.test.bugs._2807.after;
|
package org.mapstruct.ap.test.bugs._2807.spring.after;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
@ -3,7 +3,7 @@
|
|||||||
*
|
*
|
||||||
* Licensed under the Apache License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0
|
* Licensed under the Apache License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*/
|
*/
|
||||||
package org.mapstruct.ap.test.bugs._2807.before;
|
package org.mapstruct.ap.test.bugs._2807.spring.before;
|
||||||
|
|
||||||
import org.mapstruct.BeforeMapping;
|
import org.mapstruct.BeforeMapping;
|
||||||
|
|
@ -3,7 +3,7 @@
|
|||||||
*
|
*
|
||||||
* Licensed under the Apache License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0
|
* Licensed under the Apache License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*/
|
*/
|
||||||
package org.mapstruct.ap.test.bugs._2807.beforewithtarget;
|
package org.mapstruct.ap.test.bugs._2807.spring.beforewithtarget;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
@ -3,7 +3,7 @@
|
|||||||
*
|
*
|
||||||
* Licensed under the Apache License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0
|
* Licensed under the Apache License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*/
|
*/
|
||||||
package org.mapstruct.ap.test.bugs._880;
|
package org.mapstruct.ap.test.bugs._880.spring;
|
||||||
|
|
||||||
import org.mapstruct.MapperConfig;
|
import org.mapstruct.MapperConfig;
|
||||||
import org.mapstruct.ReportingPolicy;
|
import org.mapstruct.ReportingPolicy;
|
@ -3,7 +3,7 @@
|
|||||||
*
|
*
|
||||||
* Licensed under the Apache License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0
|
* Licensed under the Apache License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*/
|
*/
|
||||||
package org.mapstruct.ap.test.bugs._880;
|
package org.mapstruct.ap.test.bugs._880.spring;
|
||||||
|
|
||||||
import org.mapstruct.Mapper;
|
import org.mapstruct.Mapper;
|
||||||
|
|
@ -3,7 +3,7 @@
|
|||||||
*
|
*
|
||||||
* Licensed under the Apache License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0
|
* Licensed under the Apache License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*/
|
*/
|
||||||
package org.mapstruct.ap.test.bugs._880;
|
package org.mapstruct.ap.test.bugs._880.spring;
|
||||||
|
|
||||||
import javax.tools.Diagnostic.Kind;
|
import javax.tools.Diagnostic.Kind;
|
||||||
|
|
@ -3,7 +3,7 @@
|
|||||||
*
|
*
|
||||||
* Licensed under the Apache License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0
|
* Licensed under the Apache License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*/
|
*/
|
||||||
package org.mapstruct.ap.test.bugs._880;
|
package org.mapstruct.ap.test.bugs._880.spring;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Andreas Gudian
|
* @author Andreas Gudian
|
@ -3,7 +3,7 @@
|
|||||||
*
|
*
|
||||||
* Licensed under the Apache License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0
|
* Licensed under the Apache License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*/
|
*/
|
||||||
package org.mapstruct.ap.test.bugs._880;
|
package org.mapstruct.ap.test.bugs._880.spring;
|
||||||
|
|
||||||
import org.mapstruct.Mapper;
|
import org.mapstruct.Mapper;
|
||||||
import org.mapstruct.MappingConstants;
|
import org.mapstruct.MappingConstants;
|
@ -11,6 +11,8 @@ import javax.inject.Named;
|
|||||||
|
|
||||||
import org.junit.jupiter.api.AfterEach;
|
import org.junit.jupiter.api.AfterEach;
|
||||||
import org.junit.jupiter.api.BeforeEach;
|
import org.junit.jupiter.api.BeforeEach;
|
||||||
|
import org.junit.jupiter.api.condition.DisabledOnJre;
|
||||||
|
import org.junit.jupiter.api.condition.JRE;
|
||||||
import org.junit.jupiter.api.extension.RegisterExtension;
|
import org.junit.jupiter.api.extension.RegisterExtension;
|
||||||
import org.mapstruct.ap.test.decorator.Address;
|
import org.mapstruct.ap.test.decorator.Address;
|
||||||
import org.mapstruct.ap.test.decorator.AddressDto;
|
import org.mapstruct.ap.test.decorator.AddressDto;
|
||||||
@ -46,6 +48,7 @@ import static org.assertj.core.api.Assertions.assertThat;
|
|||||||
@ComponentScan(basePackageClasses = Jsr330DecoratorTest.class)
|
@ComponentScan(basePackageClasses = Jsr330DecoratorTest.class)
|
||||||
@Configuration
|
@Configuration
|
||||||
@WithJavaxInject
|
@WithJavaxInject
|
||||||
|
@DisabledOnJre(JRE.OTHER)
|
||||||
public class Jsr330DecoratorTest {
|
public class Jsr330DecoratorTest {
|
||||||
|
|
||||||
@RegisterExtension
|
@RegisterExtension
|
||||||
|
@ -10,6 +10,8 @@ import javax.inject.Named;
|
|||||||
|
|
||||||
import org.junit.jupiter.api.AfterEach;
|
import org.junit.jupiter.api.AfterEach;
|
||||||
import org.junit.jupiter.api.BeforeEach;
|
import org.junit.jupiter.api.BeforeEach;
|
||||||
|
import org.junit.jupiter.api.condition.DisabledOnJre;
|
||||||
|
import org.junit.jupiter.api.condition.JRE;
|
||||||
import org.junit.jupiter.api.extension.RegisterExtension;
|
import org.junit.jupiter.api.extension.RegisterExtension;
|
||||||
import org.mapstruct.ap.test.injectionstrategy.shared.CustomerDto;
|
import org.mapstruct.ap.test.injectionstrategy.shared.CustomerDto;
|
||||||
import org.mapstruct.ap.test.injectionstrategy.shared.CustomerEntity;
|
import org.mapstruct.ap.test.injectionstrategy.shared.CustomerEntity;
|
||||||
@ -44,6 +46,7 @@ import static org.assertj.core.api.Assertions.assertThat;
|
|||||||
@ComponentScan(basePackageClasses = CustomerJsr330DefaultCompileOptionFieldMapper.class)
|
@ComponentScan(basePackageClasses = CustomerJsr330DefaultCompileOptionFieldMapper.class)
|
||||||
@WithJavaxInject
|
@WithJavaxInject
|
||||||
@Configuration
|
@Configuration
|
||||||
|
@DisabledOnJre(JRE.OTHER)
|
||||||
public class Jsr330DefaultCompileOptionFieldMapperTest {
|
public class Jsr330DefaultCompileOptionFieldMapperTest {
|
||||||
|
|
||||||
@RegisterExtension
|
@RegisterExtension
|
||||||
|
@ -7,6 +7,8 @@ package org.mapstruct.ap.test.injectionstrategy.jsr330.compileoptionconstructor;
|
|||||||
|
|
||||||
import org.junit.jupiter.api.AfterEach;
|
import org.junit.jupiter.api.AfterEach;
|
||||||
import org.junit.jupiter.api.BeforeEach;
|
import org.junit.jupiter.api.BeforeEach;
|
||||||
|
import org.junit.jupiter.api.condition.DisabledOnJre;
|
||||||
|
import org.junit.jupiter.api.condition.JRE;
|
||||||
import org.junit.jupiter.api.extension.RegisterExtension;
|
import org.junit.jupiter.api.extension.RegisterExtension;
|
||||||
import org.mapstruct.ap.test.injectionstrategy.shared.CustomerDto;
|
import org.mapstruct.ap.test.injectionstrategy.shared.CustomerDto;
|
||||||
import org.mapstruct.ap.test.injectionstrategy.shared.CustomerEntity;
|
import org.mapstruct.ap.test.injectionstrategy.shared.CustomerEntity;
|
||||||
@ -44,6 +46,7 @@ import static org.assertj.core.api.Assertions.assertThat;
|
|||||||
@ComponentScan(basePackageClasses = CustomerJsr330CompileOptionConstructorMapper.class)
|
@ComponentScan(basePackageClasses = CustomerJsr330CompileOptionConstructorMapper.class)
|
||||||
@Configuration
|
@Configuration
|
||||||
@WithJavaxInject
|
@WithJavaxInject
|
||||||
|
@DisabledOnJre(JRE.OTHER)
|
||||||
public class Jsr330CompileOptionConstructorMapperTest {
|
public class Jsr330CompileOptionConstructorMapperTest {
|
||||||
|
|
||||||
@RegisterExtension
|
@RegisterExtension
|
||||||
|
@ -7,6 +7,8 @@ package org.mapstruct.ap.test.injectionstrategy.jsr330.constructor;
|
|||||||
|
|
||||||
import org.junit.jupiter.api.AfterEach;
|
import org.junit.jupiter.api.AfterEach;
|
||||||
import org.junit.jupiter.api.BeforeEach;
|
import org.junit.jupiter.api.BeforeEach;
|
||||||
|
import org.junit.jupiter.api.condition.DisabledOnJre;
|
||||||
|
import org.junit.jupiter.api.condition.JRE;
|
||||||
import org.junit.jupiter.api.extension.RegisterExtension;
|
import org.junit.jupiter.api.extension.RegisterExtension;
|
||||||
import org.mapstruct.ap.test.injectionstrategy.shared.CustomerDto;
|
import org.mapstruct.ap.test.injectionstrategy.shared.CustomerDto;
|
||||||
import org.mapstruct.ap.test.injectionstrategy.shared.CustomerEntity;
|
import org.mapstruct.ap.test.injectionstrategy.shared.CustomerEntity;
|
||||||
@ -44,6 +46,7 @@ import static org.assertj.core.api.Assertions.assertThat;
|
|||||||
@ComponentScan(basePackageClasses = CustomerJsr330ConstructorMapper.class)
|
@ComponentScan(basePackageClasses = CustomerJsr330ConstructorMapper.class)
|
||||||
@Configuration
|
@Configuration
|
||||||
@WithJavaxInject
|
@WithJavaxInject
|
||||||
|
@DisabledOnJre(JRE.OTHER)
|
||||||
public class Jsr330ConstructorMapperTest {
|
public class Jsr330ConstructorMapperTest {
|
||||||
|
|
||||||
@RegisterExtension
|
@RegisterExtension
|
||||||
|
@ -10,6 +10,8 @@ import javax.inject.Named;
|
|||||||
|
|
||||||
import org.junit.jupiter.api.AfterEach;
|
import org.junit.jupiter.api.AfterEach;
|
||||||
import org.junit.jupiter.api.BeforeEach;
|
import org.junit.jupiter.api.BeforeEach;
|
||||||
|
import org.junit.jupiter.api.condition.DisabledOnJre;
|
||||||
|
import org.junit.jupiter.api.condition.JRE;
|
||||||
import org.junit.jupiter.api.extension.RegisterExtension;
|
import org.junit.jupiter.api.extension.RegisterExtension;
|
||||||
import org.mapstruct.ap.test.injectionstrategy.shared.CustomerDto;
|
import org.mapstruct.ap.test.injectionstrategy.shared.CustomerDto;
|
||||||
import org.mapstruct.ap.test.injectionstrategy.shared.CustomerEntity;
|
import org.mapstruct.ap.test.injectionstrategy.shared.CustomerEntity;
|
||||||
@ -46,6 +48,7 @@ import static org.assertj.core.api.Assertions.assertThat;
|
|||||||
@ComponentScan(basePackageClasses = CustomerJsr330FieldMapper.class)
|
@ComponentScan(basePackageClasses = CustomerJsr330FieldMapper.class)
|
||||||
@Configuration
|
@Configuration
|
||||||
@WithJavaxInject
|
@WithJavaxInject
|
||||||
|
@DisabledOnJre(JRE.OTHER)
|
||||||
public class Jsr330FieldMapperTest {
|
public class Jsr330FieldMapperTest {
|
||||||
|
|
||||||
@RegisterExtension
|
@RegisterExtension
|
||||||
|
@ -7,6 +7,8 @@ package org.mapstruct.ap.test.injectionstrategy.jsr330.setter;
|
|||||||
|
|
||||||
import org.junit.jupiter.api.AfterEach;
|
import org.junit.jupiter.api.AfterEach;
|
||||||
import org.junit.jupiter.api.BeforeEach;
|
import org.junit.jupiter.api.BeforeEach;
|
||||||
|
import org.junit.jupiter.api.condition.DisabledOnJre;
|
||||||
|
import org.junit.jupiter.api.condition.JRE;
|
||||||
import org.junit.jupiter.api.extension.RegisterExtension;
|
import org.junit.jupiter.api.extension.RegisterExtension;
|
||||||
import org.mapstruct.ap.test.injectionstrategy.shared.CustomerDto;
|
import org.mapstruct.ap.test.injectionstrategy.shared.CustomerDto;
|
||||||
import org.mapstruct.ap.test.injectionstrategy.shared.CustomerEntity;
|
import org.mapstruct.ap.test.injectionstrategy.shared.CustomerEntity;
|
||||||
@ -42,6 +44,7 @@ import static org.assertj.core.api.Assertions.assertThat;
|
|||||||
@ComponentScan(basePackageClasses = CustomerJsr330SetterMapper.class)
|
@ComponentScan(basePackageClasses = CustomerJsr330SetterMapper.class)
|
||||||
@Configuration
|
@Configuration
|
||||||
@WithJavaxInject
|
@WithJavaxInject
|
||||||
|
@DisabledOnJre(JRE.OTHER)
|
||||||
public class Jsr330SetterMapperTest {
|
public class Jsr330SetterMapperTest {
|
||||||
|
|
||||||
@RegisterExtension
|
@RegisterExtension
|
||||||
|
@ -10,6 +10,8 @@ import java.lang.annotation.ElementType;
|
|||||||
import java.lang.annotation.Retention;
|
import java.lang.annotation.Retention;
|
||||||
import java.lang.annotation.RetentionPolicy;
|
import java.lang.annotation.RetentionPolicy;
|
||||||
import java.lang.annotation.Target;
|
import java.lang.annotation.Target;
|
||||||
|
import org.junit.jupiter.api.condition.DisabledOnJre;
|
||||||
|
import org.junit.jupiter.api.condition.JRE;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Meta annotation that adds the needed Spring Dependencies
|
* Meta annotation that adds the needed Spring Dependencies
|
||||||
@ -23,6 +25,7 @@ import java.lang.annotation.Target;
|
|||||||
"spring-beans",
|
"spring-beans",
|
||||||
"spring-context"
|
"spring-context"
|
||||||
})
|
})
|
||||||
|
@DisabledOnJre(JRE.OTHER)
|
||||||
public @interface WithSpring {
|
public @interface WithSpring {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -130,7 +130,7 @@ To learn more about MapStruct, refer to the [project homepage](https://mapstruct
|
|||||||
|
|
||||||
## Building from Source
|
## Building from Source
|
||||||
|
|
||||||
MapStruct uses Maven for its build. Java 11 is required for building MapStruct from source. To build the complete project, run
|
MapStruct uses Maven for its build. Java 17 is required for building MapStruct from source. To build the complete project, run
|
||||||
|
|
||||||
./mvnw clean install
|
./mvnw clean install
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user