Skip to content

The parameter 'executable' is missing or invalidย #430

@tsmock

Description

@tsmock

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>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions