Closed slim-hmidi closed 4 years ago
You have to configure a repositoryType and version for your dynamic dependencies. Change this snippet in your pom.xml
<plugin>
<groupId>de.qaware.maven</groupId>
<artifactId>go-offline-maven-plugin</artifactId>
<version>1.2.5</version>
<configuration>
<dynamicDependencies>
<DynamicDependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</DynamicDependency>
<DynamicDependency>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.0</version>
</DynamicDependency>
</dynamicDependencies>
</configuration>
</plugin>
like this:
<plugin>
<groupId>de.qaware.maven</groupId>
<artifactId>go-offline-maven-plugin</artifactId>
<version>1.2.5</version>
<configuration>
<dynamicDependencies>
<DynamicDependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>2.3.2.RELEASE</version>
<repositoryType>PLUGIN</repositoryType>
</DynamicDependency>
<DynamicDependency>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<repositoryType>PLUGIN</repositoryType>
<version>2.22.0</version>
</DynamicDependency>
</dynamicDependencies>
</configuration>
</plugin>
and it should work.
That said, a NullPointerException is really not the optimal way for the plugin to handle this configuration error. I will look into improving the error handling so it is clear for the user what went wrong. Thanks for the bug report :)
thanks for your answer. I'll try it ;)
I create a multi stage build using this dockerfile:
pom.xml:
when I build the image I got this error:
How can I fix it?