You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by GitBox <gi...@apache.org> on 2022/07/07 15:27:35 UTC
[GitHub] [maven-mvnd] walnut-tom commented on issue #662: Missing argument for option -D
walnut-tom commented on issue #662:
URL: https://github.com/apache/maven-mvnd/issues/662#issuecomment-1177792103
use mvn command, I never used the form without space actually too.
but I use **org.apache.maven.shared:maven-invoker:3.2.0** invoke **maven/mvnd** like this:
```java
public class InvokerListClass {
public static void main(String[] args) throws MavenInvocationException {
Invoker invoker = new DefaultInvoker();
invoker.setMavenHome(new File("/Users/xxx/maven-mvnd-0.8.0-darwin-amd64"));
invoker.setMavenExecutable(new File("mvnd"));
final InvocationRequest invocationRequest = new DefaultInvocationRequest();
Properties properties = new Properties();
properties.setProperty("artifact", "com.h2database:h2:1.4.200");
invocationRequest.setProperties(properties);
invocationRequest.setGoals(Collections.singletonList("org.apache.maven.plugins:maven-dependency-plugin:3.2.0:list-classes"));
invoker.execute(invocationRequest);
}
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org