185 Commits

Author SHA1 Message Date
Filip Hrisafov
ec9288ce66 [maven-release-plugin] prepare release 1.5.1.Final 2022-06-05 08:42:55 +02:00
Filip Hrisafov
5efe5e291c [maven-release-plugin] prepare for next development iteration 2022-06-02 23:11:41 +02:00
Filip Hrisafov
efa11ba312 [maven-release-plugin] prepare release 1.5.0.Final 2022-06-02 23:11:41 +02:00
Filip Hrisafov
08a0313840 [maven-release-plugin] prepare for next development iteration 2022-03-21 08:14:09 +01:00
Filip Hrisafov
7e00af6ff4 [maven-release-plugin] prepare release 1.5.0.RC1 2022-03-21 08:14:08 +01:00
Filip Hrisafov
2a2c11e871
#2629 Use ModuleElement when getting type element
Prior to this MapStruct would only use `Elements#getTypeElement`.
With this PR if the mapper being generated is within a module MapStruct will use that module
for the methods that are needed (getTypeElement and getPackageElement).

Adapt the build to require a minimum Java 11 for building the processor module.
Adapt the GitHub actions to properly run integration tests with Java 8
Ignore Java 9 usages for the animal-sniffer-plugin
2022-01-30 20:52:22 +01:00
Filip Hrisafov
12070186a4 #2567 Add support for Jakarta Injection
Support for Jakarta is done in 2 ways:

* current jsr330 component model - In this case Jakarta Inject will be used if javax.inject is not available
* new jakarta component model - In this case Jakarta Inject will always be used
2022-01-30 13:31:50 +01:00
Filip Hrisafov
aade31f095 #2468 Update needed dependencies for running CDI tests on Java 16+ 2022-01-29 11:25:40 +01:00
Filip Hrisafov
930b07aab8 [maven-release-plugin] prepare for next development iteration 2021-12-12 12:48:56 +01:00
Filip Hrisafov
0de10ca83c [maven-release-plugin] prepare release 1.5.0.Beta2 2021-12-12 12:48:55 +01:00
Filip Hrisafov
80d26a1a9c
#148, #1386, #2593 Only import top level classes
Instead of importing all classes, inner classes will be used through their top level classes only.
This also fixes the problem in #2593 since inner classes are no longer imported but used through their top classes
2021-10-25 08:22:26 +02:00
Filip Hrisafov
564455ee45 #2596 Record components should have the highest priority for read accessors 2021-10-25 08:21:18 +02:00
Filip Hrisafov
b59a23965a #2554 Records should not treat collections as alternative target accessors 2021-09-19 11:42:33 +02:00
Filip Hrisafov
43dfd92e05 [maven-release-plugin] prepare for next development iteration 2021-07-18 15:15:44 +02:00
Filip Hrisafov
a91b93f357 [maven-release-plugin] prepare release 1.5.0.Beta1 2021-07-18 15:15:44 +02:00
Filip Hrisafov
fb9c7a3ded #2491 Do not use types not part of java.base in MapStruct processor
MapStruct should not use types that are outside of java.base.
This makes sure that no additional dependencies (such as jaxb-api) are needed on the annotation processor path
2021-06-27 07:34:14 +02:00
chaos
4c338fa1db fix(pom): fix gradle repo url 404
original url is 404 replace with new url
2021-06-23 13:02:14 +02:00
Filip Hrisafov
9ce9d4fb3a #2375 Add records cross module integration test 2021-06-12 09:23:36 +02:00
Filip Hrisafov
857f87276f #2466 Update dependencies so tests run on Java 16+
Update GitHub Actions for tests to run on Java 11, 13, 16 and 17-ea.
Update Lombok so tests can run on 16+
Add jaxb-runtime dependency to the maven-jaxb2-plugin see https://github.com/highsource/maven-jaxb2-plugin/issues/148
Disable cdi integration test on Java 16+ until we find a solution for them
2021-06-12 09:20:33 +02:00
Jeroen van Wilgenburg
d9fdd86b94 #2368 fix order of target parameter in tests (and removed some spaces) 2021-03-01 20:58:13 +01:00
Filip Hrisafov
dfc7528096 Small fixes for Java 16
* Upgrade japicmp-maven-plugin to 0.15.2
* Do not use deprecated for removal Long constructor
* Update Spring to 5.3.3
* Upgrade Lombok to 1.18.16 + add lombok-mapstruct-binding
2021-01-22 08:33:03 +01:00
Tomas Poledny
4223e3ab81 #2255 Add constants for componentModel 2021-01-17 15:13:42 +01:00
Filip Hrisafov
50aa9cdbdc Use junit version defined in parent in integration tests 2020-10-17 12:30:43 +02:00
Filip Hrisafov
58dbaee472 [maven-release-plugin] prepare for next development iteration 2020-10-11 09:35:30 +02:00
Filip Hrisafov
d8f22f8311 [maven-release-plugin] prepare release 1.4.1.Final 2020-10-11 09:35:30 +02:00
Filip Hrisafov
eb5b8bb71e [maven-release-plugin] prepare for next development iteration 2020-09-26 10:20:47 +02:00
Filip Hrisafov
9973b92ccb [maven-release-plugin] prepare release 1.4.0.Final 2020-09-26 10:20:45 +02:00
Filip Hrisafov
8b22654abd [maven-release-plugin] prepare for next development iteration 2020-08-30 16:31:45 +02:00
Filip Hrisafov
c962962546 [maven-release-plugin] prepare release 1.4.0.CR1 2020-08-30 16:31:44 +02:00
Filip Hrisafov
c1feafef4c
#2177 Mapping into a generic class / record with a typed constructor argument should work 2020-08-29 11:22:18 +02:00
Filip Hrisafov
ef4bfc9aad [maven-release-plugin] prepare for next development iteration 2020-07-19 18:10:13 +02:00
Filip Hrisafov
1d223284c2 [maven-release-plugin] prepare release 1.4.0.Beta3 2020-07-19 18:10:12 +02:00
Filip Hrisafov
2fede3583d [maven-release-plugin] prepare for next development iteration 2020-07-18 01:12:05 +02:00
Filip Hrisafov
fc4f65ddb6 [maven-release-plugin] prepare release 1.4.0.Beta2 2020-07-05 23:11:41 +02:00
Filip Hrisafov
d87d75a7a8 [maven-release-plugin] prepare for next development iteration 2020-06-01 13:42:32 +02:00
Filip Hrisafov
72ce5f3bd2 [maven-release-plugin] prepare release 1.4.0.Beta1 2020-06-01 13:42:32 +02:00
Filip Hrisafov
2b2299a730 #73 Add support for using constructor arguments when instantiating mapping targets
By default the constructor argument names are used to extract the target properties.
If a constructor is annotated with an annotation named `@ConstructorProperties` (from any package) then it would be used to extract the target properties.

If a mapping target has a parameterless empty constructor it would be used to instantiate the target.
When there are multiple constructors then an annotation named `@Default` (from any package) can be used to mark a constructor that should be used by default when instantiating the target.

Supports mapping into Java 14 Records and Kotlin data classes out of the box
2020-04-26 12:44:41 +02:00
Filip Hrisafov
3bffe96983 #1159: Do not fail loading AnnotationProcessorContext if loading AstModifyingAnnotationProcessor fails 2020-04-13 17:40:47 +02:00
Filip Hrisafov
a845197b0b #2056: Handle null TypeMirror in uses and import gracefully
Due to a bug in javac (JDK-8229535) for an annotation with Class values, instead of returning a TypeMirror with TypeKind#ERROR the compiler returns the string "<error>". Eclipse doesn't have this problem currently.
2020-04-10 11:20:20 +02:00
Filip Hrisafov
c410379f83 #1553: Update tycho-compiler-jdt to latest 1.6.0 version
Disable one test in GenericsHierarchyTest for Eclipse on Java 8 due to a bug in the Tycho compiler.
Disable freeBuilder integration test for Eclipse since there are some problems in the second round of annotation processing (no ModelElementProcessor(s) are found)
2020-04-10 09:33:09 +02:00
Filip Hrisafov
853ff7f74f #2060: MapStruct should work properly on the module path 2020-04-05 16:37:51 +02:00
Filip Hrisafov
f8a3924005 Use fix version for maven-processor-plugin
Using the latest (4.0-beta1) does not work on Java 8 since it is compiled with Java 9
2020-03-07 16:44:19 +01:00
Filip Hrisafov
f5771c4177 #2014 Add support for mapping from Java 14 records 2020-02-23 13:34:08 +01:00
Filip Hrisafov
c64e03468e Fix Checkstyle error 2020-02-07 17:35:51 +01:00
Filip Hrisafov
f382903bc6
Add proper attribution for the code for generating the sourceTargetVersion for other JRE 2020-02-04 13:05:53 +01:00
Filip Hrisafov
02a113b2d4
#1308 Switch to JUnit Jupiter and do not use Toolchains for the integration tests (#2013)
The CI should be setup to run on different Java versions, for which the integration tests are going to be run
2020-02-03 21:56:48 +01:00
ttzn
779eb1bd47 #1420 Add support for Gradle incremental annotation processing (#1971)
* Add relevant file in META-INF
* Add integration test with Gradle test kit dependencies
* Test with Gradle 5 and Gradle 6
2019-12-08 19:55:16 +01:00
Andrei Arlou
b26cd4e0cb
#1953 Fix TODO items for: integrationtest-java8Test, integrationtest-lombokBuilderTest, processor-nullvaluemappingTest (#1955) 2019-10-26 22:24:59 +03:00
Sjaak Derksen
7e0327767f
#1801 Using constructor as builderCreationMethod in custom builder (#1905) 2019-09-15 21:43:22 +02:00
Andrei Arlou
e068564017
#724 Remove JaxbMapper from integration test (#1892) 2019-09-14 02:48:22 +03:00