mojohaus / mojohaus/exec-maven-plugin
config per execution: system property visible in wrong/later execution.
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 191
- Forks
- 111
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 4
Description
I use the plugin in build as follows:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>3.0.0</version>
<executions>
<execution>
<id>install-pkg</id>
<phase>pre-integration-test</phase>
<goals>
<goal>java</goal>
</goals>
<configuration>
<mainClass>eu.simuline.arithInOctave.RunOctave</mainClass>
<systemProperties>
<systemProperty>
<key>target</key>
<value>${project.build.directory}${file.separator}</value>
</systemProperty>
<systemProperty>
<key>artifactId</key>
<value>${project.artifactId}</value>
</systemProperty>
<systemProperty>
<key>artifactVersion</key>
<value>${project.version}</value>
</systemProperty>
<systemProperty>
<key>assemblyId</key>
<value>${assemblyId}</value>
</systemProperty>
</systemProperties>
</configuration>
</execution>
<execution>
<id>uninstall-pkg</id>
<phase>post-integration-test</phase>
<goals>
<goal>java</goal>
</goals>
<configuration>
<mainClass>eu.simuline.arithInOctave.RunOctave</mainClass>
<systemProperties>
<systemProperty>
<key>artifactId</key>
<value>${project.artifactId}</value>
</systemProperty>
</systemProperties>
</configuration>
</execution>
</executions>
</plugin>
I run always the same class but I want to distinguish the class from the properties.
But in post integration test still property 'target' is visible.
Thus in this case, instead of install and uninstall, we have install twice.
I expected that for each execution separate properties are passed.
A bit like for surefire plugin and failsafe plugin which allow to configure these also separately.
Maybe this is not a bug and one has to use arguments instead.
Still then in documentation, there shall be a hint on that configs can be used globally
or per execution, but then not system properites.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the two java executions from the issue, using the install-pkg and uninstall-pkg configurations and their systemProperties. Start by tracing how per-execution configuration is handled for the Java goal. Done means determining whether the properties are isolated between executions and either correcting that behavior or documenting the limitation and workaround.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100