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/01 17:28:01 UTC

[GitHub] [maven-mvnd] walnut-tom opened a new issue, #662: Missing argument for option -D

walnut-tom opened a new issue, #662:
URL: https://github.com/apache/maven-mvnd/issues/662

   $**mvn -D aaa=aaa -version**
   Apache Maven 3.8.6 (84538c9988a25aec085021c365c560670ad80f63)
   Maven home: /usr/local/Cellar/maven/3.8.6/libexec
   Java version: 1.8.0_312, vendor: Amazon.com Inc., runtime: /Users/user/Library/Java/JavaVirtualMachines/corretto-1.8.0_312/Contents/Home/jre
   Default locale: zh_CN, platform encoding: UTF-8
   OS name: "mac os x", version: "12.4", arch: "x86_64", family: "mac"
   
   $**mvnd -D aaa=aaa -version**
   Exception in thread "main" java.lang.IllegalArgumentException: Missing argument for option -D
   	at org.mvndaemon.mvnd.client.DefaultClient.setSystemPropertiesFromCommandLine(DefaultClient.java:146)
   	at org.mvndaemon.mvnd.client.DefaultClient.main(DefaultClient.java:106)


-- 
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.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [maven-mvnd] cstamas commented on issue #662: Missing argument for option -D

Posted by GitBox <gi...@apache.org>.
cstamas commented on issue #662:
URL: https://github.com/apache/maven-mvnd/issues/662#issuecomment-1177454742

   And the `-D` is "inspired" by Java `-D` and is defined without space as well. I never used the form with space actually :smile: 


-- 
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


[GitHub] [maven-mvnd] nandorholozsnyak commented on issue #662: Missing argument for option -D

Posted by GitBox <gi...@apache.org>.
nandorholozsnyak commented on issue #662:
URL: https://github.com/apache/maven-mvnd/issues/662#issuecomment-1177444523

   Same here, but I'm glad there is already an open issue for that with a "fix" too :) 
   


-- 
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


[GitHub] [maven-mvnd] nandorholozsnyak commented on issue #662: Missing argument for option -D

Posted by GitBox <gi...@apache.org>.
nandorholozsnyak commented on issue #662:
URL: https://github.com/apache/maven-mvnd/issues/662#issuecomment-1177459205

   Yes true it works without space with `-D`, and it works with this format too `--define=property=value` but if it really wants to support the Maven based properties then it should be working with the space too. :D 


-- 
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


[GitHub] [maven-mvnd] gnodet closed issue #662: Missing argument for option -D

Posted by GitBox <gi...@apache.org>.
gnodet closed issue #662: Missing argument for option -D
URL: https://github.com/apache/maven-mvnd/issues/662


-- 
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


[GitHub] [maven-mvnd] walnut-tom commented on issue #662: Missing argument for option -D

Posted by GitBox <gi...@apache.org>.
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


[GitHub] [maven-mvnd] cstamas commented on issue #662: Missing argument for option -D

Posted by GitBox <gi...@apache.org>.
cstamas commented on issue #662:
URL: https://github.com/apache/maven-mvnd/issues/662#issuecomment-1177452923

   True with `-D aaa=aaa` but works OK without space, with `-Daaa=aaa`


-- 
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