-
Notifications
You must be signed in to change notification settings - Fork 51
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
Document resources configuration support in plugins #180
Comments
There are many configuration options without description. I guess
|
Thanks @YunaBraska this fixed it for me as well. I noticed that with ".*" the resulting binary grew 10x in size, even though I only have one small toml file in my resources. So I switched the expression to
which did the trick without exploding the size of the image. |
according to maven docs https://maven.apache.org/guides/mini/guide-configuring-plugins.html#mapping-collection-types it must be like this: <configuration>
<resourceIncludedPatterns>
<resourceIncludedPattern>application.properties</resourceIncludedPattern>
</resourceIncludedPatterns>
</configuration> however it doesn't work for me too. I'm reading {
"pattern":"\\Qapplication.properties\\E"
} So i tried it the same for the maven plugin:
but it still doesn't work. |
I have finally found it. It is not described anywhere, but is present in the samples in this repo: https://github.com/graalvm/native-build-tools/blob/master/samples/java-application-with-resources/pom.xml#L102 So you need to execute the <plugin>
<groupId>org.graalvm.buildtools</groupId>
<artifactId>native-maven-plugin</artifactId>
<version>${native.maven.plugin.version}</version>
<extensions>true</extensions>
<executions>
<execution>
<id>build-native</id>
<goals>
<goal>generateResourceConfig</goal>
<goal>build</goal>
</goals>
<phase>package</phase>
</execution>
<execution>
<id>test-native</id>
<goals>
<goal>test</goal>
</goals>
<phase>test</phase>
</execution>
</executions>
<configuration>
<fallback>false</fallback>
<resourceIncludedPatterns>
<pattern>application.properties</pattern>
</resourceIncludedPatterns>
</configuration>
</plugin> |
The documentation for the Gradle and Maven plugins currently does not cover support for configuring resources or auto-detection of resources.
The text was updated successfully, but these errors were encountered: