Skip to content
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

config per execution: system property visible in wrong/later execution. #191

Open
Reissner opened this issue Dec 17, 2020 · 0 comments
Open

Comments

@Reissner
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant