New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CLI generates a non working pom.xml for cli apps (1.2.0) #2031
Milestone
Comments
Hi all, <plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.7.0</version>
<configuration>
<compilerArgs>
<arg>-parameters</arg>
</compilerArgs>
<annotationProcessorPaths>
<path>
<groupId>io.micronaut</groupId>
<artifactId>micronaut-inject-java</artifactId>
<version>${micronaut.version}</version>
</path>
<path>
<groupId>io.micronaut</groupId>
<artifactId>micronaut-validation</artifactId>
<version>${micronaut.version}</version>
</path>
<path>
<groupId>io.micronaut.configuration</groupId>
<artifactId>micronaut-picocli</artifactId>
<version>${micronaut.version}</version>
</path>
</annotationProcessorPaths>
</configuration>
<executions>
<execution>
<id>test-compile</id>
<goals>
<goal>testCompile</goal>
</goals>
<configuration>
<compilerArgs>
<arg>-parameters</arg>
</compilerArgs>
<annotationProcessorPaths>
<path>
<groupId>io.micronaut</groupId>
<artifactId>micronaut-inject-java</artifactId>
<version>${micronaut.version}</version>
</path>
<path>
<groupId>io.micronaut</groupId>
<artifactId>micronaut-validation</artifactId>
<version>${micronaut.version}</version>
</path>
<path>
<groupId>io.micronaut.configuration</groupId>
<artifactId>micronaut-picocli</artifactId>
<version>${micronaut.version}</version>
</path>
</annotationProcessorPaths>
</configuration>
</execution>
</executions>
</plugin> |
I have tested the above mentioned solution and that does seem to resolve the issue. Someone else has also ran across this same issue as #2302 and the above solution seems to resolve it as well |
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When creating a new CLI app with help of Micronaut CLI tool (mn) and with maven as build tool, the created pom.xml is not working correctly. With Micronaut 1.1.0 it seems to work
Steps to Reproduce
mn create-cli-app foo --build maven
cd foo
./mvnw package
Expected Behaviour
Build runs successfully and jar file is built
Actual Behaviour
Build crashes with an exception
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.7.0:compile (default-compile) on project foo: Fatal error compiling: java.lang.NoClassDefFoundError: io/micronaut/inject/annotation/AnnotatedElementValidator: io.micronaut.inject.annotation.AnnotatedElementValidator -> [Help 1]
Environment Information
The text was updated successfully, but these errors were encountered: