You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@netbeans.apache.org by Mark Herkrath <he...@googlemail.com.INVALID> on 2019/02/18 18:10:16 UTC

Bug and solution with Maven Dependency Check Out

Hi,

at least under Windows 10 and Maven 3.5.4, the handy Check Out... feature
at [Maven project] > Dependencies > [artifact] > View Artifact Details >
Project > Source Control Management > Check Out... is broken. After filling
the dialog and pressing CheckOut, the Maven error "The goal you specified
requires a project to execute but there is no POM in this directory ..." is
occurring every time.

It is caused by a space after -Dpassword in the Maven command line:
...mvn.cmd -DcheckoutDirectory=... -DconnectionUrl=... -Dusername=<user>
-Dpassword =<password> ... scm:checkout

Instead, it should be "...  -Dpassword=<password> ...".

I have done some analysis:
* The according code is at
https://github.com/apache/incubator-netbeans/blob/2d76c29ffbafd5d92a6cdbc4a66a9b51f63fa0eb/java/maven/src/org/netbeans/modules/maven/actions/scm/ui/CheckoutUI.java#L359
* It's there since ever:
http://hg.netbeans.org/main/diff/8559551465d2/maven/src/org/netbeans/modules/maven/actions/scm/ui/CheckoutUI.java
* I am pretty sure it was working for me some years ago (didn't code
intensively for longer). Maybe it depends on how Windows is interpreting
the space in 7 vs. 10 or it's the Maven bat vs. cmd command, etc.
* I have removed the space in CheckoutUI.java, complied and tested. It
fixes the issue.

Maybe someone could execute this easy patch? I was wondering if I should
submit a (micro) change request but as per
https://netbeans.apache.org/participate/submit-pr.html , I shall create a
Jira issue first. But sorry, how to do so? I know that it's possible to
commit Exceptions from within NetBeans, but how shall I create a Jira issue
without an Exception and no corresponding account?

Thanks a lot for your great work and for considering this request,
Mark

Re: Bug and solution with Maven Dependency Check Out

Posted by Geertjan Wielenga <ge...@googlemail.com.INVALID>.
Excellent work and looking forward to the PR! Indeed an issue first would
be nice but we’re indeed not religious!

Gj

On Monday, February 18, 2019, Matthias Bläsing <mb...@doppel-helix.eu>
wrote:

> Hey Mark,
>
> Am Montag, den 18.02.2019, 19:10 +0100 schrieb Mark Herkrath:
> > at least under Windows 10 and Maven 3.5.4, the handy Check Out... feature
> > at [Maven project] > Dependencies > [artifact] > View Artifact Details >
> > Project > Source Control Management > Check Out... is broken. After
> filling
> > the dialog and pressing CheckOut, the Maven error "The goal you specified
> > requires a project to execute but there is no POM in this directory ..."
> is
> > occurring every time.
> >
> > It is caused by a space after -Dpassword in the Maven command line:
> > ...mvn.cmd -DcheckoutDirectory=... -DconnectionUrl=... -Dusername=<user>
> > -Dpassword =<password> ... scm:checkout
> >
> > Instead, it should be "...  -Dpassword=<password> ...".
> > I have done some analysis:
> > * The according code is at
> > https://github.com/apache/incubator-netbeans/blob/
> 2d76c29ffbafd5d92a6cdbc4a66a9b51f63fa0eb/java/maven/src/org/
> netbeans/modules/maven/actions/scm/ui/CheckoutUI.java#L359
> > * It's there since ever:
> > http://hg.netbeans.org/main/diff/8559551465d2/maven/src/
> org/netbeans/modules/maven/actions/scm/ui/CheckoutUI.java
> > * I am pretty sure it was working for me some years ago (didn't code
> > intensively for longer). Maybe it depends on how Windows is interpreting
> > the space in 7 vs. 10 or it's the Maven bat vs. cmd command, etc.
> > * I have removed the space in CheckoutUI.java, complied and tested. It
> > fixes the issue.
>
> thank you for your analysis! I agree with the assessment. If you open a
> PR on github or on another platform, then I'm good with pulling the
> change.
>
> I'll assume, that you are willing to donate the change to the ASF.
>
> > Maybe someone could execute this easy patch? I was wondering if I should
> > submit a (micro) change request but as per
> > https://netbeans.apache.org/participate/submit-pr.html , I shall create
> a
> > Jira issue first. But sorry, how to do so? I know that it's possible to
> > commit Exceptions from within NetBeans, but how shall I create a Jira
> issue
> > without an Exception and no corresponding account?
>
> I won't be religious about the JIRA requirement.
>
> Greetings
>
> Matthias
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@netbeans.incubator.apache.org
> For additional commands, e-mail: dev-help@netbeans.incubator.apache.org
>
> For further information about the NetBeans mailing lists, visit:
> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
>
>
>
>

Re: Bug and solution with Maven Dependency Check Out

Posted by Matthias Bläsing <mb...@doppel-helix.eu>.
Hey Mark,

Am Montag, den 18.02.2019, 19:10 +0100 schrieb Mark Herkrath:
> at least under Windows 10 and Maven 3.5.4, the handy Check Out... feature
> at [Maven project] > Dependencies > [artifact] > View Artifact Details >
> Project > Source Control Management > Check Out... is broken. After filling
> the dialog and pressing CheckOut, the Maven error "The goal you specified
> requires a project to execute but there is no POM in this directory ..." is
> occurring every time.
> 
> It is caused by a space after -Dpassword in the Maven command line:
> ...mvn.cmd -DcheckoutDirectory=... -DconnectionUrl=... -Dusername=<user>
> -Dpassword =<password> ... scm:checkout
> 
> Instead, it should be "...  -Dpassword=<password> ...".
> I have done some analysis:
> * The according code is at
> https://github.com/apache/incubator-netbeans/blob/2d76c29ffbafd5d92a6cdbc4a66a9b51f63fa0eb/java/maven/src/org/netbeans/modules/maven/actions/scm/ui/CheckoutUI.java#L359
> * It's there since ever:
> http://hg.netbeans.org/main/diff/8559551465d2/maven/src/org/netbeans/modules/maven/actions/scm/ui/CheckoutUI.java
> * I am pretty sure it was working for me some years ago (didn't code
> intensively for longer). Maybe it depends on how Windows is interpreting
> the space in 7 vs. 10 or it's the Maven bat vs. cmd command, etc.
> * I have removed the space in CheckoutUI.java, complied and tested. It
> fixes the issue.

thank you for your analysis! I agree with the assessment. If you open a
PR on github or on another platform, then I'm good with pulling the
change.

I'll assume, that you are willing to donate the change to the ASF.

> Maybe someone could execute this easy patch? I was wondering if I should
> submit a (micro) change request but as per
> https://netbeans.apache.org/participate/submit-pr.html , I shall create a
> Jira issue first. But sorry, how to do so? I know that it's possible to
> commit Exceptions from within NetBeans, but how shall I create a Jira issue
> without an Exception and no corresponding account?

I won't be religious about the JIRA requirement.

Greetings

Matthias


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@netbeans.incubator.apache.org
For additional commands, e-mail: dev-help@netbeans.incubator.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists