I have a webapp that I need to copy the Java files into my output Quarkus application because I display the code snippets as help in the web pages. Currently the only way I could figure it out is by always calling compile
when running mvn compile quarkus:dev
goal. However this is not standard as most Quakrus apps just work with mvn quarkus:dev
out of the box!
My question is how to I attach to the Quarkus lifecycle of plugins?
My current copy-resources only works in compile
phase which does not seem to run in quarkus:dev
mode.
Copy Resources Plugin:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>3.3.0</version>
<executions>
<execution>
<id>copy-java-files</id>
<phase>process-resources</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<propertiesEncoding>UTF-8</propertiesEncoding>
<outputDirectory>${project.build.outputDirectory}</outputDirectory>
<resources>
<resource>
<directory>src/main/java</directory>
<filtering>false</filtering>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
Current Quarkus Plugin:
<plugin>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-maven-plugin</artifactId>
<version>${quarkus.version}</version>
<extensions>true</extensions>
<executions>
<execution>
<goals>
<goal>build</goal>
<goal>generate-code</goal>
<goal>generate-code-tests</goal>
</goals>
</execution>
</executions>
</plugin>
Any help our guidance would be appreciated!
I have tried many different <phase>
attributes for my plugin but none of them seem to execute in the Quarkus lifecycle and I could not find any documentation on Quakrus site how to do so?