[jira] [Commented] (MNG-7745) NPE when .mvn doesn't exist

2023-06-16 Thread Lenny Primak (Jira)


[ 
https://issues.apache.org/jira/browse/MNG-7745?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=1778#comment-1778
 ] 

Lenny Primak commented on MNG-7745:
---

Alright! That was easy :)

> NPE when .mvn doesn't exist
> ---
>
> Key: MNG-7745
> URL: https://issues.apache.org/jira/browse/MNG-7745
> Project: Maven
>  Issue Type: Bug
>  Components: Core
>Affects Versions: 4.0.0-alpha-4, 4.0.0-alpha-5
> Environment: Any
>Reporter: Lenny Primak
>Assignee: Guillaume Nodet
>Priority: Minor
> Fix For: 4.0.0-alpha-6
>
>
> When maven is executed without a .mvn directory, an NPE appears every time.
> This doesn't seem to affect anything but does pollute the logs:
> {code:java}
> Failed to notify spy org.apache.maven.ReactorReader$ReactorReaderSpy: Cannot 
> invoke "java.io.File.toPath()" because the return value of 
> "org.apache.maven.project.MavenProject.getFile()" is null {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (MNG-7745) NPE when .mvn doesn't exist

2023-06-16 Thread Guillaume Nodet (Jira)


[ 
https://issues.apache.org/jira/browse/MNG-7745?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=1771#comment-1771
 ] 

Guillaume Nodet commented on MNG-7745:
--

I'm going to close this one as fixed, even though I'm not sure exactly when...
{code}
➜  tmp ~/.sdkman/candidates/maven/4.0.0-alpha-5/bin/mvn dependency:copy 
-Dartifact=org.postgresql:postgresql:LATEST:jar -Dproject.basedir=. 
-DoutputDirectory=xxx -DoverWrite=false -V

Apache Maven 4.0.0-alpha-5 (26d10a4bf9a2df75feef60da01d8706f2bf77a47)
Maven home: /Users/gnodet/.sdkman/candidates/maven/4.0.0-alpha-5
Java version: 1.8.0_362, vendor: BellSoft, runtime: 
/Users/gnodet/.sdkman/candidates/java/8.0.362-librca/jre
Default locale: en_FR, platform encoding: UTF-8
OS name: "mac os x", version: "13.4", arch: "aarch64", family: "mac"
[INFO] Scanning for projects...
[INFO] 
[INFO] ---< 
org.apache.maven:standalone-pom >
[INFO] Building Maven Stub Project (No POM) 1
[INFO] -[ pom 
]--
[INFO] 
[INFO] --- dependency:3.6.0:copy (default-cli) @ standalone-pom ---
[INFO] Configured Artifact: org.postgresql:postgresql:LATEST:jar
[INFO] org.postgresql:postgresql:LATEST:jar already exists in 
/Users/gnodet/tmp/xxx
[WARNING] Failed to notify spy org.apache.maven.ReactorReader$ReactorReaderSpy: 
null
[INFO] 
--
[INFO] BUILD SUCCESS
[INFO] 
--
[INFO] Total time:  0.711 s
[INFO] Finished at: 2023-06-16T07:57:41+02:00
[INFO] 
--
{code}

{code}
➜  tmp 
/Users/gnodet/work/git/maven/apache-maven/target/apache-maven-4.0.0-alpha-6-SNAPSHOT/bin/mvn
 dependency:copy -Dartifact=org.postgresql:postgresql:LATEST:jar 
-Dproject.basedir=. -DoutputDirectory=xxx -DoverWrite=false -V
Unable to find the root directory. Create a .mvn directory in the root 
directory or add the root="true" attribute on the root project's model to 
identify it.
Apache Maven 4.0.0-alpha-6-SNAPSHOT (8b0bf378b83b942a08c1a9763a7b4f04da5c4538)
Maven home: 
/Users/gnodet/work/git/maven/apache-maven/target/apache-maven-4.0.0-alpha-6-SNAPSHOT
Java version: 1.8.0_362, vendor: BellSoft, runtime: 
/Users/gnodet/.sdkman/candidates/java/8.0.362-librca/jre
Default locale: en_FR, platform encoding: UTF-8
OS name: "mac os x", version: "13.4", arch: "aarch64", family: "mac"
[INFO] Scanning for projects...
[INFO] 
[INFO] ---< 
org.apache.maven:standalone-pom >
[INFO] Building Maven Stub Project (No POM) 1
[INFO] -[ pom 
]--
[INFO] 
[INFO] --- dependency:3.6.0:copy (default-cli) @ standalone-pom ---
[INFO] Configured Artifact: org.postgresql:postgresql:LATEST:jar
[INFO] org.postgresql:postgresql:LATEST:jar already exists in 
/Users/gnodet/tmp/xxx
[INFO] 
--
[INFO] BUILD SUCCESS
[INFO] 
--
[INFO] Total time:  0.816 s
[INFO] Finished at: 2023-06-16T07:57:52+02:00
[INFO] 
--
➜  tmp 
{code}

> NPE when .mvn doesn't exist
> ---
>
> Key: MNG-7745
> URL: https://issues.apache.org/jira/browse/MNG-7745
> Project: Maven
>  Issue Type: Bug
>  Components: Core
>Affects Versions: 4.0.0-alpha-4, 4.0.0-alpha-5
> Environment: Any
>Reporter: Lenny Primak
>Assignee: Guillaume Nodet
>Priority: Minor
>
> When maven is executed without a .mvn directory, an NPE appears every time.
> This doesn't seem to affect anything but does pollute the logs:
> {code:java}
> Failed to notify spy org.apache.maven.ReactorReader$ReactorReaderSpy: Cannot 
> invoke "java.io.File.toPath()" because the return value of 
> "org.apache.maven.project.MavenProject.getFile()" is null {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (MNG-7745) NPE when .mvn doesn't exist

2023-06-15 Thread Lenny Primak (Jira)


[ 
https://issues.apache.org/jira/browse/MNG-7745?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=1770#comment-1770
 ] 

Lenny Primak commented on MNG-7745:
---

Easy. Run the following maven command *outside* of any maven project. The 
result will be the same:
{code:java}
mvn dependency:copy -Dartifact=org.postgresql:postgresql:LATEST:jar 
-Dproject.basedir=. -DoutputDirectory=xxx -DoverWrite=false {code}

> NPE when .mvn doesn't exist
> ---
>
> Key: MNG-7745
> URL: https://issues.apache.org/jira/browse/MNG-7745
> Project: Maven
>  Issue Type: Bug
>  Components: Core
>Affects Versions: 4.0.0-alpha-4, 4.0.0-alpha-5
> Environment: Any
>Reporter: Lenny Primak
>Assignee: Guillaume Nodet
>Priority: Minor
>
> When maven is executed without a .mvn directory, an NPE appears every time.
> This doesn't seem to affect anything but does pollute the logs:
> {code:java}
> Failed to notify spy org.apache.maven.ReactorReader$ReactorReaderSpy: Cannot 
> invoke "java.io.File.toPath()" because the return value of 
> "org.apache.maven.project.MavenProject.getFile()" is null {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (MNG-7745) NPE when .mvn doesn't exist

2023-06-15 Thread Guillaume Nodet (Jira)


[ 
https://issues.apache.org/jira/browse/MNG-7745?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17732893#comment-17732893
 ] 

Guillaume Nodet commented on MNG-7745:
--

I can't find a way to reproduce the problem.  Do you have the command you were 
using and a simple project ?

> NPE when .mvn doesn't exist
> ---
>
> Key: MNG-7745
> URL: https://issues.apache.org/jira/browse/MNG-7745
> Project: Maven
>  Issue Type: Bug
>  Components: Core
>Affects Versions: 4.0.0-alpha-4, 4.0.0-alpha-5
> Environment: Any
>Reporter: Lenny Primak
>Assignee: Guillaume Nodet
>Priority: Minor
>
> When maven is executed without a .mvn directory, an NPE appears every time.
> This doesn't seem to affect anything but does pollute the logs:
> {code:java}
> Failed to notify spy org.apache.maven.ReactorReader$ReactorReaderSpy: Cannot 
> invoke "java.io.File.toPath()" because the return value of 
> "org.apache.maven.project.MavenProject.getFile()" is null {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)