diff --git a/core-common/pom.xml b/core-common/pom.xml
deleted file mode 100644
index 058307123..000000000
--- a/core-common/pom.xml
+++ /dev/null
@@ -1,58 +0,0 @@
-
-
-
- * The name of the mapped attribute or constant is to be specified via {@link #target()}. For mapped bean attributes it - * is assumed by default that the attribute has the same name in the source bean. Alternatively, one of - * {@link #source()}, {@link #expression()} or {@link #constant()} can be specified to define the property source. - *
- * In addition, the attributes {@link #dateFormat()} and {@link #qualifiedBy()} may be used to further define the - * mapping. - * - *
- * IMPORTANT NOTE: the enum mapping capability is deprecated and replaced by {@link ValueMapping} it - * will be removed in subsequent versions. - * - * @author Gunnar Morling - */ -@Repeatable(Mappings.class) -@Retention(RetentionPolicy.CLASS) -@Target(ElementType.METHOD) -public @interface Mapping { - - /** - * The target name of the configured property as defined by the JavaBeans specification. The same target property - * must not be mapped more than once. - *
- * If used to map an enum constant, the name of the constant member is to be given. In this case, several values - * from the source enum may be mapped to the same value of the target enum. - * - * @return The target name of the configured property or enum constant - */ - String target(); - - /** - * The source to use for this mapping. This can either be: - *
- * This may either be a simple property name (e.g. "address") or a dot-separated property path (e.g. "address.city" - * or "address.city.name"). In case the annotated method has several source parameters, the property name must - * qualified with the parameter name, e.g. "addressParam.city".
- * When the designated target property is of type: - *
- *- * MapStruct checks whether the primitive can be assigned as valid literal to the primitive or boxed type. - *
- *- * MapStruct handles the constant as {@code String}. The value will be converted by applying a matching method, - * type conversion method or built-in conversion. - *
- *
- * This attribute can not be used together with {@link #source()}, {@link #defaultValue()}, - * {@link #defaultExpression()} or {@link #expression()}. - * - * @return A constant {@code String} constant specifying the value for the designated target property - */ - String constant() default ""; - - /** - * An expression {@link String} based on which the specified target property is to be set. - *
- * Currently, Java is the only supported "expression language" and expressions must be given in form of Java
- * expressions using the following format: {@code java(
- * will cause the following target property assignment to be generated:
- *
- * {@code targetBean.setSomeProp( new TimeAndFormat( s.getTime(), s.getFormat() ) )}.
- *
- * Any types referenced in expressions must be given via their fully-qualified name. Alternatively, types can be
- * imported via {@link Mapper#imports()}.
- *
- * This attribute can not be used together with {@link #source()}, {@link #defaultValue()},
- * {@link #defaultExpression()} or {@link #constant()}.
- *
- * @return An expression specifying the value for the designated target property
- */
- String expression() default "";
-
- /**
- * A defaultExpression {@link String} based on which the specified target property is to be set
- * if and only if the specified source property is null.
- *
- * Currently, Java is the only supported "expression language" and expressions must be given in form of Java
- * expressions using the following format: {@code java(
- * will cause the following target property assignment to be generated:
- *
- * {@code targetBean.setSomeProp( new TimeAndFormat( s.getTime(), s.getFormat() ) )}.
- *
- * Any types referenced in expressions must be given via their fully-qualified name. Alternatively, types can be
- * imported via {@link Mapper#imports()}.
- *
- * This attribute can not be used together with {@link #expression()}, {@link #defaultValue()}
- * or {@link #constant()}.
- *
- * @return An expression specifying a defaultValue for the designated target property if the designated source
- * property is null
- *
- * @since 1.3
- */
- String defaultExpression() default "";
-
- /**
- * Whether the property specified via {@link #target()} should be ignored by the generated mapping method or not.
- * This can be useful when certain attributes should not be propagated from source or target or when properties in
- * the target object are populated using a decorator and thus would be reported as unmapped target property by
- * default.
- *
- * @return {@code true} if the given property should be ignored, {@code false} otherwise
- */
- boolean ignore() default false;
-
- /**
- * A qualifier can be specified to aid the selection process of a suitable mapper. This is useful in case multiple
- * mapping methods (hand written or generated) qualify and thus would result in an 'Ambiguous mapping methods found'
- * error. A qualifier is a custom annotation and can be placed on a hand written mapper class or a method.
- *
- * @return the qualifiers
- */
- Class extends Annotation>[] qualifiedBy() default { };
-
- /**
- * String-based form of qualifiers; When looking for a suitable mapping method for a given property, MapStruct will
- * only consider those methods carrying directly or indirectly (i.e. on the class-level) a {@link Named} annotation
- * for each of the specified qualifier names.
- *
- * Note that annotation-based qualifiers are generally preferable as they allow more easily to find references and
- * are safe for refactorings, but name-based qualifiers can be a less verbose alternative when requiring a large
- * number of qualifiers as no custom annotation types are needed.
- *
- * @return One or more qualifier name(s)
- * @see #qualifiedBy()
- * @see Named
- */
- String[] qualifiedByName() default { };
-
- /**
- * Specifies the result type of the mapping method to be used in case multiple mapping methods qualify.
- *
- * @return the resultType to select
- */
- Class> resultType() default void.class;
-
- /**
- * One or more properties of the result type on which the mapped property depends. The generated method
- * implementation will invoke the setters of the result type ordered so that the given dependency relationship(s)
- * are satisfied. Useful in case one property setter depends on the state of another property of the result type.
- *
- * An error will be raised in case a cycle in the dependency relationships is detected.
- *
- * @return the dependencies of the mapped property
- */
- String[] dependsOn() default { };
-
- /**
- * In case the source property is {@code null}, the provided default {@link String} value is set.
- *
- * When the designated target property is of type:
- *
- * MapStruct checks whether the primitive can be assigned as valid literal to the primitive or boxed type.
- *
- * MapStruct handles the constant as {@code String}. The value will be converted by applying a matching method,
- * type conversion method or built-in conversion.
- *
- *
- * This attribute can not be used together with {@link #constant()}, {@link #expression()}
- * or {@link #defaultExpression()}.
- *
- * @return Default value to set in case the source property is {@code null}.
- */
- String defaultValue() default "";
-
- /**
- * Determines when to include a null check on the source property value of a bean mapping.
- *
- * Can be overridden by the one on {@link MapperConfig}, {@link Mapper} or {@link BeanMapping}.
- *
- * @return strategy how to do null checking
- */
- NullValueCheckStrategy nullValueCheckStrategy() default ON_IMPLICIT_CONVERSION;
-
-}
diff --git a/core-jdk8/src/main/java/org/mapstruct/Mappings.java b/core-jdk8/src/main/java/org/mapstruct/Mappings.java
deleted file mode 100644
index 1e9dd9670..000000000
--- a/core-jdk8/src/main/java/org/mapstruct/Mappings.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright MapStruct Authors.
- *
- * Licensed under the Apache License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0
- */
-package org.mapstruct;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-/**
- * Configures the mappings of several bean attributes.
- *
- * @author Gunnar Morling
- */
-@Retention(RetentionPolicy.CLASS)
-@Target(ElementType.METHOD)
-public @interface Mappings {
-
- /**
- * The configuration of the bean attributes.
- *
- * @return The configuration of the bean attributes.
- */
- Mapping[] value();
-}
diff --git a/core-jdk8/src/main/java/org/mapstruct/ValueMapping.java b/core-jdk8/src/main/java/org/mapstruct/ValueMapping.java
deleted file mode 100644
index 26ed661dc..000000000
--- a/core-jdk8/src/main/java/org/mapstruct/ValueMapping.java
+++ /dev/null
@@ -1,113 +0,0 @@
-/*
- * Copyright MapStruct Authors.
- *
- * Licensed under the Apache License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0
- */
-package org.mapstruct;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Repeatable;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-/**
- * Configures the mapping of source constant value to target constant value.
- *
- * Supported mappings are
- *
- * Example 1:
- *
- *
- * Example 2:
- *
- *
- * Valid values:
- *
- * NOTE:When using <ANY_REMAINING>, MapStruct will perform the normal name based mapping, in which
- * source is mapped to target based on enum identifier equality. Using <ANY_UNMAPPED> will not apply name
- * based mapping.
- *
- * @return The source value.
- */
- String source();
-
- /**
- * The target value constant to use for this mapping.
- *
- *
- * Valid values:
- *
@@ -32,6 +32,8 @@ import static org.mapstruct.NullValueCheckStrategy.ON_IMPLICIT_CONVERSION;
*
* @author Gunnar Morling
*/
+
+@Repeatable(Mappings.class)
@Retention(RetentionPolicy.CLASS)
@Target(ElementType.METHOD)
public @interface Mapping {
@@ -98,9 +100,6 @@ public @interface Mapping {
* If not possible, MapStruct will try to apply a user defined mapping method.
*
*
- *
- * Please note that grouping underscores and binary literals are not supported in Java 6
- *
@@ -207,7 +206,6 @@ public @interface Mapping {
*/
String[] qualifiedByName() default { };
-
/**
* Specifies the result type of the mapping method to be used in case multiple mapping methods qualify.
*
@@ -244,9 +242,6 @@ public @interface Mapping {
* If not possible, MapStruct will try to apply a user defined mapping method.
*
- * Please note that grouping underscores and binary literals are not supported in Java 6
- *
diff --git a/core-common/src/main/java/org/mapstruct/MappingConstants.java b/core/src/main/java/org/mapstruct/MappingConstants.java
similarity index 100%
rename from core-common/src/main/java/org/mapstruct/MappingConstants.java
rename to core/src/main/java/org/mapstruct/MappingConstants.java
diff --git a/core-common/src/main/java/org/mapstruct/MappingInheritanceStrategy.java b/core/src/main/java/org/mapstruct/MappingInheritanceStrategy.java
similarity index 100%
rename from core-common/src/main/java/org/mapstruct/MappingInheritanceStrategy.java
rename to core/src/main/java/org/mapstruct/MappingInheritanceStrategy.java
diff --git a/core-common/src/main/java/org/mapstruct/MappingTarget.java b/core/src/main/java/org/mapstruct/MappingTarget.java
similarity index 100%
rename from core-common/src/main/java/org/mapstruct/MappingTarget.java
rename to core/src/main/java/org/mapstruct/MappingTarget.java
diff --git a/core-common/src/main/java/org/mapstruct/Named.java b/core/src/main/java/org/mapstruct/Named.java
similarity index 100%
rename from core-common/src/main/java/org/mapstruct/Named.java
rename to core/src/main/java/org/mapstruct/Named.java
diff --git a/core-common/src/main/java/org/mapstruct/NullValueCheckStrategy.java b/core/src/main/java/org/mapstruct/NullValueCheckStrategy.java
similarity index 100%
rename from core-common/src/main/java/org/mapstruct/NullValueCheckStrategy.java
rename to core/src/main/java/org/mapstruct/NullValueCheckStrategy.java
diff --git a/core-common/src/main/java/org/mapstruct/NullValueMappingStrategy.java b/core/src/main/java/org/mapstruct/NullValueMappingStrategy.java
similarity index 100%
rename from core-common/src/main/java/org/mapstruct/NullValueMappingStrategy.java
rename to core/src/main/java/org/mapstruct/NullValueMappingStrategy.java
diff --git a/core-common/src/main/java/org/mapstruct/ObjectFactory.java b/core/src/main/java/org/mapstruct/ObjectFactory.java
similarity index 100%
rename from core-common/src/main/java/org/mapstruct/ObjectFactory.java
rename to core/src/main/java/org/mapstruct/ObjectFactory.java
diff --git a/core-common/src/main/java/org/mapstruct/Qualifier.java b/core/src/main/java/org/mapstruct/Qualifier.java
similarity index 100%
rename from core-common/src/main/java/org/mapstruct/Qualifier.java
rename to core/src/main/java/org/mapstruct/Qualifier.java
diff --git a/core-common/src/main/java/org/mapstruct/ReportingPolicy.java b/core/src/main/java/org/mapstruct/ReportingPolicy.java
similarity index 100%
rename from core-common/src/main/java/org/mapstruct/ReportingPolicy.java
rename to core/src/main/java/org/mapstruct/ReportingPolicy.java
diff --git a/core-common/src/main/java/org/mapstruct/TargetType.java b/core/src/main/java/org/mapstruct/TargetType.java
similarity index 100%
rename from core-common/src/main/java/org/mapstruct/TargetType.java
rename to core/src/main/java/org/mapstruct/TargetType.java
diff --git a/core/src/main/java/org/mapstruct/ValueMapping.java b/core/src/main/java/org/mapstruct/ValueMapping.java
index f677fb103..26ed661dc 100644
--- a/core/src/main/java/org/mapstruct/ValueMapping.java
+++ b/core/src/main/java/org/mapstruct/ValueMapping.java
@@ -6,6 +6,7 @@
package org.mapstruct;
import java.lang.annotation.ElementType;
+import java.lang.annotation.Repeatable;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@@ -26,11 +27,9 @@ import java.lang.annotation.Target;
*
* public enum ExternalOrderType { RETAIL, B2B, SPECIAL, DEFAULT }
*
- * @ValueMappings({
- * @ValueMapping(source = "EXTRA", target = "SPECIAL"),
- * @ValueMapping(source = "STANDARD", target = "DEFAULT"),
- * @ValueMapping(source = "NORMAL", target = "DEFAULT")
- * })
+ * @ValueMapping(source = "EXTRA", target = "SPECIAL"),
+ * @ValueMapping(source = "STANDARD", target = "DEFAULT"),
+ * @ValueMapping(source = "NORMAL", target = "DEFAULT")
* ExternalOrderType orderTypeToExternalOrderType(OrderType orderType);
*
* Mapping result:
@@ -53,11 +52,9 @@ import java.lang.annotation.Target;
*
*
- *
- * @Mapping(
- * target = "someProp",
- * expression = "java(new TimeAndFormat( s.getTime(), s.getFormat() ))"
- * )
- *
- *
- * @Mapping(
- * target = "someProp",
- * defaultExpression = "java(new TimeAndFormat( s.getTime(), s.getFormat() ))"
- * )
- *
- *
- *
- *
- *
- *
- *
- *
- *
- * MapStruct will WARN on incomplete mappings. However, if for some reason no match is found an
- * {@link java.lang.IllegalStateException} will be thrown.
- *
- * public enum OrderType { RETAIL, B2B, EXTRA, STANDARD, NORMAL }
- *
- * public enum ExternalOrderType { RETAIL, B2B, SPECIAL, DEFAULT }
- *
- * @ValueMapping(source = "EXTRA", target = "SPECIAL"),
- * @ValueMapping(source = "STANDARD", target = "DEFAULT"),
- * @ValueMapping(source = "NORMAL", target = "DEFAULT")
- * ExternalOrderType orderTypeToExternalOrderType(OrderType orderType);
- *
- * Mapping result:
- * +---------------------+----------------------------+
- * | OrderType | ExternalOrderType |
- * +---------------------+----------------------------+
- * | null | null |
- * | OrderType.EXTRA | ExternalOrderType.SPECIAL |
- * | OrderType.STANDARD | ExternalOrderType.DEFAULT |
- * | OrderType.NORMAL | ExternalOrderType.DEFAULT |
- * | OrderType.RETAIL | ExternalOrderType.RETAIL |
- * | OrderType.B2B | ExternalOrderType.B2B |
- * +---------------------+----------------------------+
- *
- *
- *
- * @author Sjaak Derksen
- */
-@Repeatable(ValueMappings.class)
-@Retention(RetentionPolicy.CLASS)
-@Target(ElementType.METHOD)
-public @interface ValueMapping {
- /**
- * The source value constant to use for this mapping.
- *
- *
- * @ValueMapping( source = MappingConstants.NULL, target = "DEFAULT" ),
- * @ValueMapping( source = "STANDARD", target = MappingConstants.NULL ),
- * @ValueMapping( source = MappingConstants.ANY_REMAINING, target = "SPECIAL" )
- * ExternalOrderType orderTypeToExternalOrderType(OrderType orderType);
- *
- * Mapping result:
- * +---------------------+----------------------------+
- * | OrderType | ExternalOrderType |
- * +---------------------+----------------------------+
- * | null | ExternalOrderType.DEFAULT |
- * | OrderType.STANDARD | null |
- * | OrderType.RETAIL | ExternalOrderType.RETAIL |
- * | OrderType.B2B | ExternalOrderType.B2B |
- * | OrderType.NORMAL | ExternalOrderType.SPECIAL |
- * | OrderType.EXTRA | ExternalOrderType.SPECIAL |
- * +---------------------+----------------------------+
- *
- *
- *
- *
- *
- * @return The target value.
- */
- String target();
-
-}
diff --git a/core-jdk8/src/main/java/org/mapstruct/ValueMappings.java b/core-jdk8/src/main/java/org/mapstruct/ValueMappings.java
deleted file mode 100644
index f2450a2fd..000000000
--- a/core-jdk8/src/main/java/org/mapstruct/ValueMappings.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * Copyright MapStruct Authors.
- *
- * Licensed under the Apache License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0
- */
-package org.mapstruct;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-/**
- * Constructs a set of value (constant) mappings.
- *
- * @author Sjaak Derksen
- */
-@Target(ElementType.METHOD)
-@Retention(RetentionPolicy.CLASS)
-public @interface ValueMappings {
-
- ValueMapping[] value();
-
-}
diff --git a/core/pom.xml b/core/pom.xml
index f6b037f6e..b566ffe05 100644
--- a/core/pom.xml
+++ b/core/pom.xml
@@ -20,10 +20,6 @@
*
- * @ValueMappings({
- * @ValueMapping( source = MappingConstants.NULL, target = "DEFAULT" ),
- * @ValueMapping( source = "STANDARD", target = MappingConstants.NULL ),
- * @ValueMapping( source = MappingConstants.ANY_REMAINING, target = "SPECIAL" )
- * })
+ * @ValueMapping( source = MappingConstants.NULL, target = "DEFAULT" ),
+ * @ValueMapping( source = "STANDARD", target = MappingConstants.NULL ),
+ * @ValueMapping( source = MappingConstants.ANY_REMAINING, target = "SPECIAL" )
* ExternalOrderType orderTypeToExternalOrderType(OrderType orderType);
*
* Mapping result:
@@ -75,10 +72,10 @@ import java.lang.annotation.Target;
*
* @author Sjaak Derksen
*/
+@Repeatable(ValueMappings.class)
@Retention(RetentionPolicy.CLASS)
@Target(ElementType.METHOD)
public @interface ValueMapping {
-
/**
* The source value constant to use for this mapping.
*
diff --git a/core-common/src/main/java/org/mapstruct/factory/Mappers.java b/core/src/main/java/org/mapstruct/factory/Mappers.java
similarity index 100%
rename from core-common/src/main/java/org/mapstruct/factory/Mappers.java
rename to core/src/main/java/org/mapstruct/factory/Mappers.java
diff --git a/core-common/src/main/java/org/mapstruct/factory/package-info.java b/core/src/main/java/org/mapstruct/factory/package-info.java
similarity index 100%
rename from core-common/src/main/java/org/mapstruct/factory/package-info.java
rename to core/src/main/java/org/mapstruct/factory/package-info.java
diff --git a/core-common/src/main/java/org/mapstruct/package-info.java b/core/src/main/java/org/mapstruct/package-info.java
similarity index 100%
rename from core-common/src/main/java/org/mapstruct/package-info.java
rename to core/src/main/java/org/mapstruct/package-info.java
diff --git a/core-common/src/main/java/org/mapstruct/util/Experimental.java b/core/src/main/java/org/mapstruct/util/Experimental.java
similarity index 100%
rename from core-common/src/main/java/org/mapstruct/util/Experimental.java
rename to core/src/main/java/org/mapstruct/util/Experimental.java
diff --git a/core-common/src/test/java/org/mapstruct/factory/MappersTest.java b/core/src/test/java/org/mapstruct/factory/MappersTest.java
similarity index 100%
rename from core-common/src/test/java/org/mapstruct/factory/MappersTest.java
rename to core/src/test/java/org/mapstruct/factory/MappersTest.java
diff --git a/core-common/src/test/java/org/mapstruct/factory/PackagePrivateMapper.java b/core/src/test/java/org/mapstruct/factory/PackagePrivateMapper.java
similarity index 100%
rename from core-common/src/test/java/org/mapstruct/factory/PackagePrivateMapper.java
rename to core/src/test/java/org/mapstruct/factory/PackagePrivateMapper.java
diff --git a/core-common/src/test/java/org/mapstruct/factory/PackagePrivateMapperImpl.java b/core/src/test/java/org/mapstruct/factory/PackagePrivateMapperImpl.java
similarity index 100%
rename from core-common/src/test/java/org/mapstruct/factory/PackagePrivateMapperImpl.java
rename to core/src/test/java/org/mapstruct/factory/PackagePrivateMapperImpl.java
diff --git a/core-common/src/test/java/org/mapstruct/test/model/Foo.java b/core/src/test/java/org/mapstruct/test/model/Foo.java
similarity index 100%
rename from core-common/src/test/java/org/mapstruct/test/model/Foo.java
rename to core/src/test/java/org/mapstruct/test/model/Foo.java
diff --git a/core-common/src/test/java/org/mapstruct/test/model/FooImpl.java b/core/src/test/java/org/mapstruct/test/model/FooImpl.java
similarity index 100%
rename from core-common/src/test/java/org/mapstruct/test/model/FooImpl.java
rename to core/src/test/java/org/mapstruct/test/model/FooImpl.java
diff --git a/core-common/src/test/java/org/mapstruct/test/model/SomeClass$FooImpl.java b/core/src/test/java/org/mapstruct/test/model/SomeClass$FooImpl.java
similarity index 100%
rename from core-common/src/test/java/org/mapstruct/test/model/SomeClass$FooImpl.java
rename to core/src/test/java/org/mapstruct/test/model/SomeClass$FooImpl.java
diff --git a/core-common/src/test/java/org/mapstruct/test/model/SomeClass$NestedClass$FooImpl.java b/core/src/test/java/org/mapstruct/test/model/SomeClass$NestedClass$FooImpl.java
similarity index 100%
rename from core-common/src/test/java/org/mapstruct/test/model/SomeClass$NestedClass$FooImpl.java
rename to core/src/test/java/org/mapstruct/test/model/SomeClass$NestedClass$FooImpl.java
diff --git a/core-common/src/test/java/org/mapstruct/test/model/SomeClass.java b/core/src/test/java/org/mapstruct/test/model/SomeClass.java
similarity index 100%
rename from core-common/src/test/java/org/mapstruct/test/model/SomeClass.java
rename to core/src/test/java/org/mapstruct/test/model/SomeClass.java
diff --git a/distribution/pom.xml b/distribution/pom.xml
index b586a4ba2..4645262fd 100644
--- a/distribution/pom.xml
+++ b/distribution/pom.xml
@@ -25,10 +25,6 @@