I'm using Maven 3.3.9. Is it possible to have the same goal for the same plugin with different configurations? I mean something like this
<build>
...
<pluginManagement>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.6.0</version>
<executions>
<execution>
<id>test1</id>
<goals>
<goal>exec</goal>
</goals>
</execution>
</executions>
<configuration>
<executable>dir</executable>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.6.0</version>
<executions>
<execution>
<id>test2</id>
<goals>
<goal>exec</goal>
</goals>
</execution>
</executions>
<configuration>
<executable>cd</executable>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
If i put the <configuration>
tag inside the <execution>
it just get ignored.
Plus the tag <goalPrefix>
is not working so i don't know how to alias the goals to differentiate them...
EDIT
I need to execute two different scripts i made, but only as a cli goal... the scripts run some tests on the code, but the test are optional, they have to be executed only when the programmer wants explicitly to run them.
The reason i want to embed those scripts in maven is because i want to use the ${project.build.directory}
variable