<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId> <!-- version used is 3.2.0, declared in parent -->
<executions>
<!-- mvn test-compile && mvn exec:java@update-proj-reference-files -->
<execution>
<id>update-proj-reference-files</id>
<configuration>
<classpathScope>test</classpathScope>
<mainClass>org.openstreetmap.josm.data.projection.ProjectionRefTest</mainClass>
</configuration>
<goals>
<goal>java</goal>
</goals>
</execution>
<!-- mvn test-compile && mvn exec:java@update-proj-regression-files -->
<execution>
<id>update-proj-regression-files</id>
<configuration>
<classpathScope>test</classpathScope>
<mainClass>org.openstreetmap.josm.data.projection.ProjectionRegressionTest</mainClass>
</configuration>
<goals>
<goal>java</goal>
</goals>
</execution>
<!-- mvn compile && mvn exec:java@SyncEditorLayerIndex -->
<execution>
<id>SyncEditorLayerIndex</id>
<configuration>
<executable>java</executable>
<arguments>
<argument>-Djava.awt.headless=true</argument>
<argument>-classpath</argument>
<classpath/> <!-- Generates the actual classpath using all project dependencies -->
<argument>${scripts.src.dir}/SyncEditorLayerIndex.java</argument>
<argument>${basedir}</argument>
</arguments>
<!-- We need commons-lang3, which isn't needed elsewhere in core (besides a test or two) -->
<classpathScope>test</classpathScope>
</configuration>
<goals>
<goal>exec</goal>
</goals>
</execution>
<!-- Note that the epsg-touch/epsg executions are NOT duplicates - the first epsg makes an empty file for the
next run, which makes a non-empty custom-epsg file -->
<execution>
<id>epsg-touch</id>
<configuration>
<executable>java</executable>
<arguments>
<argument>-Djava.awt.headless=true</argument>
<argument>-classpath</argument>
<classpath/> <!-- Generates the actual classpath using all project dependencies -->
<argument>${basedir}/scripts/BuildProjectionDefinitions.java</argument>
<argument>${basedir}</argument>
</arguments>
</configuration>
<phase>process-classes</phase>
<goals>
<goal>exec</goal>
</goals>
</execution>
<execution>
<id>epsg</id>
<configuration>
<executable>java</executable>
<arguments>
<argument>-Djava.awt.headless=true</argument>
<argument>-classpath</argument>
<classpath/> <!-- Generates the actual classpath using all project dependencies -->
<argument>${basedir}/scripts/BuildProjectionDefinitions.java</argument>
<argument>${basedir}</argument>
</arguments>
</configuration>
<phase>generate-test-resources</phase>
<goals>
<goal>exec</goal>
</goals>
</execution>
</executions>
</plugin>
Source repo: https://github.com/tsmock/josm/tree/pom
Notes:
mvn exec:{exec|java}@idtarget/classes/data/projection/custom-epsg-- it should not be empty (and is not empty onmvn clean test-compileormvn clean package)compilebut beforetest-compileSteps to reproduce in cloned repo:
What I've looked at:
[1] POM XML