-
Notifications
You must be signed in to change notification settings - Fork 101
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
Using exec:exec with plugin dependencies and executableDependency #79
Comments
I´ve got the same Problem. Do you have any solutions? |
Have the exact same issues as @DanielFuchs98. Either this needs to be supported or exec:java forking should be supported. |
I too am having this very same problem. But I figured out a workaround. The jar that you depend on will get downloaded into the maven repo. So, point to it explicitly. <plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<dependencies>
<dependency>
<groupId>com.example</groupId>
<artifactId>some-cli</artifactId>
<version>${some=cli.version}</version>
</dependency>
</dependencies>
<executions>
<execution>
<id>exec-stuff-and-junk</id>
<goals>
<goal>exec</goal>
</goals>
</execution>
</executions>
<configuration>
<executable>java</executable>
<arguments>
<argument>-classpath</argument>
<argument>${settings.localRepository}/com/example/some-cli/${some-cli.version}/some-cli-${some-cli.version}.jar</argument>
<argument>com.example.cli.MyAwesomeCLI</argument>
<argument>stuff</argument>
<argument>and</argument>
<argument>junk</argument>
</arguments>
</configuration>
</plugin> So much winning! This is still a bug though. Super annoying. |
@charlie-harvey Thanks, that worked. |
I had a similar problem that I solved with the |
See https://stackoverflow.com/questions/44409624/maven-execjava-run-executable-plugin-dependency-jar-results-in-npe. |
The Therefore the |
I think that at least the |
@slawekjaranowski I think this issue can be closed now that #432 is merged. |
I want to execute a java class, but I want to run it async and hence why I am using exec:exec, but there does not seem to be a way to do that and at the same time use specific plugin dependencies (don't want project dependencies). This works fine with exec:java but not for exec:exec. The documentation says to omit executable when using executableDependency but then it just tries to run the jar directly (without java).
Is this something that is not supported or am I just not configuring it properly?
This is my configuration:
The text was updated successfully, but these errors were encountered: