-
Notifications
You must be signed in to change notification settings - Fork 100
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
java.lang.String cannot be cast to org.codehaus.mojo.exec.Modulepath #75
Comments
Caused by: java.lang.ClassCastException: java.lang.String cannot be cast to org.codehaus.mojo.exec.Modulepath |
It seems to be related to the "-p" in the arguments of the configuration: <configuration>
<executable>redis-cli</executable>
<arguments>
<argument>-p</argument>
<argument>${integrationTest.redisPort}</argument>
<argument>shutdown</argument>
</arguments>
</configuration> This configuration worked fine with the 1.5.0 version of the plugin. |
I'm getting similar with 9-ea+165 on OSX, when using maven-exec-plugin:1.6.0 to run a simple java jigsaw multi-module. [ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.6.0:exec (default) on project io.earcam.example.javanine.jmod.consumer: A type incompatibility occurred while executing org.codehaus.mojo:exec-maven-plugin:1.6.0:exec: java.base/java.lang.String cannot be cast to org.codehaus.mojo.exec.Modulepath This doesn't happen with maven-exec-plugin:1.5.0. |
Same here I think the bug has been introduced in 093153b Line 477 of ExecMojo.java should be
instead of
|
I get the same issue on my end.
Here is a more full stack trace:
|
+1 |
Same problem here with Maven 3.3.9 and OpenJDK 1.8
This issue prevents me from upgrading to 1.6.0 version of this plugin. |
A similar error may occurs when an executable expects a |
+1 |
Short term fix is to set |
Hi @martinreck, is your commit in #80 meant to fix #75? If so, do you have a estimate date for release 1.6.1? |
I saw this same issue with Maven 3.5.0 and Java 1.7. |
Sent a PR to fix it here: #100. Tried that with a project of mine and all looked good. Would be cool if people here did the same and reported back if there are any issues with the fix. |
+1 |
+1 |
3 similar comments
+1 |
+1 |
+1 |
|
@keltik85 said:
I think that will work for the case I stated in #100 (comment) , although it's kind of annoying to have to set a module-related config item when the bug is manifesting itself in a way that has nothing to do with modules at all, but just some arbitrary parameter with the same I don't think that it's going to be a short-term fix, though. Given the slowness to address this bug, it's probably going to be a long-term fix. 😉 |
I had some pomfiles which didn't specify a version for
exec-maven-plugin
. (Ignoring warnings at my own peril!)When the new version became available in Maven Central, I started seeing errors along the lines of:
There isn't any stack dump
I'm using Maven 3.2.5 and JDK 1.7.0_71, which are both older.
Obviously, I can fix the problem by going to the previous version of the plugin (1.5.0).
Is this an actual issue, or am I simply using a toolstack that's "too old"?
The text was updated successfully, but these errors were encountered: