Uploaded image for project: 'Maven JMod Plugin'
  1. Maven JMod Plugin
  2. MJMOD-23

Error: path must be a directory

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Done
    • 3.0.0
    • 3.0.0
    • None
    • Ubuntu Linux 18.04 LTS, kernel 4.15.0-45-generic, Maven 3.6.0, Java 11.0.2 OpenJDK.

    Description

      Hi!

      I was testing the build of the following project: https://github.com/java-modularity-examples/maven-jigsaw-examples/tree/master/modularized-args4j-usage with the current master branch of maven-jmod-plugin and it returned the error below:

       

      [DEBUG] /home/andre/.sdkman/candidates/java/11.0.2-open/bin/jmod @/home/andre/workspaces/oss/java-modularity-examples/maven-jigsaw-examples/modularized-args4j-usage/app/target/jmodCreateArgs
      [INFO]
      Error: path must be a directory: /home/andre/.m2/repository/args4j/args4j/2.34-SNAPSHOT/args4j-2.34-SNAPSHOT-client.jar
      [INFO] ------------------------------------------------------------------------
      [INFO] Reactor Summary for modularized-args4j-usage 1.0-SNAPSHOT:
      [INFO]
      [INFO] modularized-args4j-usage ........................... SUCCESS [ 0.140 s]
      [INFO] app ................................................ FAILURE [ 2.154 s]
      [INFO] app-jlink .......................................... SKIPPED
      [INFO] ------------------------------------------------------------------------
      [INFO] BUILD FAILURE
      
      

       

      and it seems that the error comes from the generated jmod command:

       

      jmod create \
      --module-version \
      1.0-SNAPSHOT \
      --class-path \
      "/home/andre/workspaces/oss/java-modularity-examples/maven-jigsaw-examples/modularized-args4j-usage/app/target/classes" \
      --main-class \
      com.andretadeu.example.args4j.app.Main \
      --module-path \
      "/home/andre/workspaces/oss/java-modularity-examples/maven-jigsaw-examples/modularized-args4j-usage/app/target/classes:/home/andre/.m2/repository/args4j/args4j/2.34-SNAPSHOT/args4j-2.34-SNAPSHOT-client.jar:/home/andre/.sdkman/candidates/java/11.0.2-open/jmods" \
      /home/andre/workspaces/oss/java-modularity-examples/maven-jigsaw-examples/modularized-args4j-usage/app/target/jmods/app.jmod
      

      which adds args4j-2.34-SNAPSHOT-client.jar JAR directly, instead of the folder containing the modularized JAR. The command should be:

      jmod create \
      --module-version \
      1.0-SNAPSHOT \
      --class-path \
      "/home/andre/workspaces/oss/java-modularity-examples/maven-jigsaw-examples/modularized-args4j-usage/app/target/classes" \
      --main-class \
      com.andretadeu.example.args4j.app.Main \
      --module-path \
      "/home/andre/workspaces/oss/java-modularity-examples/maven-jigsaw-examples/modularized-args4j-usage/app/target/classes:/home/andre/.m2/repository/args4j/args4j/2.34-SNAPSHOT:/home/andre/.sdkman/candidates/java/11.0.2-open/jmods" \
      /home/andre/workspaces/oss/java-modularity-examples/maven-jigsaw-examples/modularized-args4j-usage/app/target/jmods/app.jmod
      

      Thanks,

       

      Attachments

        Issue Links

          Activity

            People

              khmarbaise Karl Heinz Marbaise
              andretadeu Andre Tadeu de Carvalho
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m