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

The parameter 'executable' is missing or invalid #430

Open
tsmock opened this issue May 16, 2024 · 0 comments
Open

The parameter 'executable' is missing or invalid #430

tsmock opened this issue May 16, 2024 · 0 comments

Comments

@tsmock
Copy link

tsmock commented May 16, 2024

Source repo: https://github.com/tsmock/josm/tree/pom

Notes:

  • I'm attempting to convert an ant build.xml file to maven
  • I'd like to make it possible to run resource generation and misc scripts with mvn exec:{exec|java}@id
  • Two of the tasks are bound to phases and work properly as such. They do not work when called manually.
    • To check the output of those two tasks, look at target/classes/data/projection/custom-epsg -- it should not be empty (and is not empty on mvn clean test-compile or mvn clean package)
    • These tasks are bound to phases that run after compile but before test-compile
  • I am probably overlooking something. I'm also probably doing something stupid in the pom files.

Steps to reproduce in cloned repo:

$ git clone https://github.com/tsmock/josm.git --branch pom
$ mvn clean test-compile
$ head -n3 target/classes/data/projection/custom-epsg
$ mvn clean compile exec:exec@epsg-touch exec:exec@epsg
[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:3.2.0:exec (epsg-touch) on project josm-parent: The parameter 'executable' is missing or invalid -> [Help 1]
$ head -n3 target/classes/data/projection/custom-epsg

What I've looked at:

[1] POM XML
      <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>
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