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