Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ The plugin automatically:
| | [apache/camel-spring-boot](https://github.com/apache/camel-spring-boot) | [org.apache.camel.springboot/camel-mapstruct-starter](https://mvnrepository.com/artifact/org.apache.camel.springboot/camel-mapstruct-starter) | `implementation` |
| | [apache/camel-quarkus](https://github.com/apache/camel-quarkus) | [org.apache.camel.quarkus/camel-quarkus-mapstruct](https://mvnrepository.com/artifact/org.apache.camel.quarkus/camel-quarkus-mapstruct) | `implementation` |
| **Quarkus** | [quarkiverse/quarkus-mapstruct](https://github.com/quarkiverse/quarkus-mapstruct) | [io.quarkiverse.mapstruct/quarkus-mapstruct](https://mvnrepository.com/artifact/io.quarkiverse.mapstruct/quarkus-mapstruct) | `implementation` |
| **Protobuf** | [entur/mapstruct-spi-protobuf](https://github.com/entur/mapstruct-spi-protobuf) | [no.entur.mapstruct.spi/protobuf-spi-impl](https://mvnrepository.com/artifact/no.entur.mapstruct.spi/protobuf-spi-impl) | `implementation` |
| **Protobuf** | [entur/mapstruct-spi-protobuf](https://github.com/entur/mapstruct-spi-protobuf) | [no.entur.mapstruct.spi/protobuf-spi-impl](https://mvnrepository.com/artifact/no.entur.mapstruct.spi/protobuf-spi-impl) | `annotationProcessor` |

## Config

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public class AdditionalDependency extends PluginDependency {

// https://mvnrepository.com/artifact/no.entur.mapstruct.spi/protobuf-spi-impl
public static final AdditionalDependency PROTOBUF_SPI_IMPL =
new AdditionalDependency("implementation", "no.entur.mapstruct.spi:protobuf-spi-impl:1.62.0");
new AdditionalDependency("annotationProcessor", "no.entur.mapstruct.spi:protobuf-spi-impl:1.62.0");

public AdditionalDependency(String configuration, String id) {
super(configuration, id);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ private void addOptionalDependencies(String processorConfig) {

if (hasProtobuf) {
LOGGER.lifecycle(ADDING_MESSAGE, "Protobuf");
addDependency(PROTOBUF_SPI_IMPL);
addDependency(PROTOBUF_SPI_IMPL, processorConfig);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -271,11 +271,11 @@ void addOptionalDependenciesWithProtobuf() {
evaluate(project);

String[] expectedAnnotationProcessor = {
MAPSTRUCT_PROCESSOR.getId()
MAPSTRUCT_PROCESSOR.getId(), PROTOBUF_SPI_IMPL.getId()
};

String[] expectedImplementation = {
MAPSTRUCT.getId(), PROTOBUF_JAVA.getId(), PROTOBUF_SPI_IMPL.getId()
MAPSTRUCT.getId(), PROTOBUF_JAVA.getId()
};

optionalDependenciesWithoutSpringTest(project, expectedAnnotationProcessor, expectedImplementation);
Expand All @@ -294,11 +294,11 @@ void addOptionalDependenciesWithProtobufPlugin() {
assertThat(project.getConfigurations().findByName("protobuf")).isNotNull();

String[] expectedAnnotationProcessor = {
MAPSTRUCT_PROCESSOR.getId()
MAPSTRUCT_PROCESSOR.getId(), PROTOBUF_SPI_IMPL.getId()
};

String[] expectedImplementation = {
MAPSTRUCT.getId(), PROTOBUF_JAVA.getId(), PROTOBUF_SPI_IMPL.getId()
MAPSTRUCT.getId(), PROTOBUF_JAVA.getId()
};

optionalDependenciesWithoutSpringTest(project, expectedAnnotationProcessor, expectedImplementation);
Expand Down