- 
                Notifications
    You must be signed in to change notification settings 
- Fork 79
Closed
Labels
enhancementNew feature or requestNew feature or request
Milestone
Description
Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
Please make sure that you are using the latest plugin version, and that similar feature hasn't been requested before.
- native-maven-pluginlacks- runtimeArgsconfiguration item similar to- native-gradle-plugin.
- Since [GR-52314] Make MissingRegistrationReportingMode a runtime option oracle/graal#8473 was merged into GraalVM CE For JDK 23, the native-maven-plugincan no longer use the-XX:MissingRegistrationReportingMode=Warnparameter for thetestmaven goal.
- For native-gradle-plugin, there is a mechanism to dynamically add parameters to the final GraalVM Native Image used by nativeTest.
        ListProperty<String> runtimeArgs = testExtension.getRuntimeArgs();
        runtimeArgs.add("--xml-output-dir");
        runtimeArgs.add(project.getLayout().getBuildDirectory().dir("test-results/" + binaryName + "-native").map(d -> d.getAsFile().getAbsolutePath()));- Line 767 in c09540e - ListProperty<String> runtimeArgs = testExtension.getRuntimeArgs(); 
- But for native-maven-plugin, there is no such mechanism to dynamically add parameters to the final GraalVM Native Image used by nativeTest.
            List<String> command = new ArrayList<>();
            command.add("--xml-output-dir");
            command.add(xmlLocation.toString());
            systemProperties.forEach((key, value) -> command.add("-D" + key + "=" + value));
            processBuilder.command().addAll(command);
            processBuilder.environment().putAll(environment);
            String commandString = String.join(" ", processBuilder.command());- Line 226 in c09540e - List<String> command = new ArrayList<>(); 
Describe the solution you'd like
A clear and concise description of what you want to happen.
- Add runtimeArgsconfiguration item similar tonative-gradle-plugintonative-maven-plugin.
          <profile>
            <id>nativeTestInElasticSearchServer</id>
            <build>
                <pluginManagement>
                    <plugins>
                        <plugin>
                            <groupId>org.graalvm.buildtools</groupId>
                            <artifactId>native-maven-plugin</artifactId>
                            <version>0.10.4</version>
                            <extensions>true</extensions>
                            <configuration>
                                <buildArgs>
                                    <buildArg>-H:+UnlockExperimentalVMOptions</buildArg>
                                    <buildArg>-H:ThrowMissingRegistrationErrors=</buildArg>
                                </buildArgs>
                                <runtimeArgs>
                                    <runtimeArg>-XX:MissingRegistrationReportingMode=Warn</runtimeArg>
                                </runtimeArgs>
                                <quickBuild>true</quickBuild>
                            </configuration>
                            <executions>
                                <execution>
                                    <id>test-native</id>
                                    <goals>
                                        <goal>test</goal>
                                    </goals>
                                    <phase>test</phase>
                                </execution>
                            </executions>
                        </plugin>
                    </plugins>
                </pluginManagement>
            </build>
        </profile>Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
- Null.
Additional context
Add any other context or screenshots about the feature request here.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request