有没有办法获得Maven本地回购地点?
使用以下命令可以强制Maven使用特定的设置文件:
mvn -s < path to settings file >
Run Code Online (Sandbox Code Playgroud)
我知道您可以编辑settings.xml
文件来设置存储库位置,但是我可以通过一些Maven命令获取当前默认值吗?
这是在控制台中打印的日志.
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v1.4.3.RELEASE)
2017-01-09 01:23:15.384 INFO 9484 --- [ main] com.udemy.BackendninjaApplication : Starting BackendninjaApplication on I046LA0413 with …
Run Code Online (Sandbox Code Playgroud) 我正在尝试运行 maven clean install 但我收到了这些错误和警告
[WARNING] Could not transfer metadata org.codehaus.mojo:cobertura-maven-plugin/maven-metadata.xml from/to maven-repository.dev.java.net (http://download.java.net/maven/1): Cannot access http://download.java.net/maven/1 with type legacy using the available connector factories: BasicRepositoryConnectorFactory
[WARNING] The POM for javax.transaction:jta:jar:1.1 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
[WARNING] The POM for com.sun.xml.bind:jaxb-impl:jar:2.1.7 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
[WARNING] The POM for org.springframework:spring-support:jar:2.0.8 is invalid, transitive dependencies (if any) will …
Run Code Online (Sandbox Code Playgroud) 我的项目有结构
pom.xml (parent)
tcp/pom.xml
spark/pom.xml
Run Code Online (Sandbox Code Playgroud)
模块 xmls 都包含此简介
<parent>
<groupId>org.myorg</groupId>
<artifactId>parent</artifactId>
<version>1.0</version>
<relativePath>../pom.xml</relativePath>
</parent>
Run Code Online (Sandbox Code Playgroud)
我也试着留下relativePath
空白,或者../
或者..
甚至不包括它在所有。在所有情况下,结果是:
[ERROR] The build could not read 2 projects -> [Help 1]
[ERROR]
[ERROR] The project org.myorg:tcpclient:1.0.0 (/git/MYorg/tcp/pom.xml) has 1 error
[ERROR] Non-resolvable parent POM for org.myorg:tcpclient:1.0.0:
Failure to find org.myorg:parent:pom:1.0 in https://repository.apache.org/content/repositories/snapshots was cached in
the local repository, resolution will not be reattempted until
the update interval of Maven snapshots repository has elapsed or updates
are forced and 'parent.relativePath' …
Run Code Online (Sandbox Code Playgroud)