maven是否需要在某些时候连接到互联网才能使用它?具体意义是获取用于编译,清洁,包装等的内部maven插件?
开发机器无法访问互联网,大约需要60秒才能超时.当我尝试建造时,我明白了
Downloading: http://repo.maven.apache.org/maven2/com/google/gsa-connector/2.8.0/gsa-connector-2.8.0.pom
Run Code Online (Sandbox Code Playgroud)
但是,我的POM中有以下内容:
<repository>
<id>bb-nexus</id>
<url>http://repo.dev.bloomberg.com/content/groups/public</url>
<releases><enabled>true</enabled></releases>
<snapshots><enabled>true</enabled></snapshots>
</repository>
<repository>
<id>nexus-3rdparty</id>
<url>http://repo.dev.bloomberg.com/content/repositories/thirdparty/</url>
<releases><enabled>true</enabled></releases>
<snapshots><enabled>true</enabled></snapshots>
</repository>
Run Code Online (Sandbox Code Playgroud)
它总是试图首先去repo.maven.我甚至尝试添加到D:\.m2\settings.xml
<settings>
<mirrors>
<mirror>
<!--This sends everything else to /public -->
<id>nexus</id>
<mirrorOf>*</mirrorOf>
<url>http://repo.dev.bloomberg.com/content/groups/public</url>
</mirror>
</mirrors>
Run Code Online (Sandbox Code Playgroud)
基于http://maven.apache.org/guides/mini/guide-mirror-settings.html,它继续首先尝试repo.maven.我正在使用Apache Maven 3.0.4(r1232337; 2012-01-17 03:44:56-0500)
我不能使用-o因为它仍然需要访问本地repo.dev.
这是'有效设置':
D:\Users\chloe\Projects\team\confluence-plugin>mvn help:effective-settings
[INFO] Scanning for projects...
Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-install-plugin/maven-metadata.xml
[WARNING] Could not transfer metadata org.apache.maven.plugins:maven-install-plugin/maven-metadata.xml from/to central (
http://repo.maven.apache.org/maven2): Connection to http://repo.maven.apache.org refused
...
[INFO]
[INFO] --- maven-help-plugin:2.1.1:effective-settings (default-cli) @ bb-confluence-plugin ---
[INFO]
Effective user-specific configuration settings:
<?xml version="1.0" encoding="UTF-8"?> …Run Code Online (Sandbox Code Playgroud) 我从今天早上做maven构建时遇到了错误.昨天和今天没有具体的变化.有人可以帮我解决这个问题吗?我尝试清除所有本地存储库,将jackson版本更改为1.9.10.令人惊讶的是,这对于正在进行相同构建的同事来说很有用.
[ERROR] Failed to execute goal on project netvogue-database-api: Could not resolve dependencies for project org.netvogue.server:netvogue-database-api:jar:1.0-SNAPSHOT: Failed to collect dependencies for [org.springframework.data:spring-data-neo4j-rest:jar:2.1.0.RC4 (compile), org.codehaus.jackson:jackson-jaxrs:jar:1.8.3 (compile), org.codehaus.jackson:jackson-mapper-asl:jar:1.8.3 (compile), org.neo4j:neo4j-kernel:jar:tests:1.8.RC1 (test), org.neo4j:neo4j-cypher:jar:1.8.RC1 (compile), com.amazonaws:aws-java-sdk:jar:1.3.10 (compile), org.imgscalr:imgscalr-lib:jar:4.2 (compile), org.springframework:spring-context:jar:3.1.2.RELEASE (compile), org.springframework.security:spring-security-config:jar:3.1.2.RELEASE (compile), org.springframework.security:spring-security-web:jar:3.1.2.RELEASE (compile), org.slf4j:slf4j-api:jar:1.5.10 (compile), org.slf4j:jcl-over-slf4j:jar:1.5.10 (runtime), org.slf4j:slf4j-log4j12:jar:1.5.10 (runtime), log4j:log4j:jar:1.2.16 (compile), junit:junit:jar:4.7 (test)]: No versions available for org.codehaus.jackson:jackson-core-asl:jar:[1.8,1.9) within specified range -> [Help 1]
Run Code Online (Sandbox Code Playgroud) 由于一些限制,我需要一个完全脱机的maven存储库.根据http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException,仅<pluginRepositories>搜索插件.所以我想知道如何配置maven来查找本地文件系统中的插件.我在设置时尝试使用"file://"前缀,<url>但它不起作用.
DEBUG] Verifying availability of /home/dsun/.m2/repository/org/apache/karaf/tooling/features-maven-plugin/2.3.0/features-maven-plugin-2.3.0.jar from [central (http://repo1.maven.org/maven2, releases=true, snapshots=false, managed=false)]
[ERROR] Plugin org.apache.karaf.tooling:features-maven-plugin:2.3.0 or one of its dependencies could not be resolved: The repository system is offline but the artifact org.apache.karaf.tooling:features-maven-plugin:jar:2.3.0 is not available in the local repository. -> [Help 1]
org.apache.maven.plugin.PluginResolutionException: Plugin org.apache.karaf.tooling:features-maven-plugin:2.3.0 or one of its dependencies could not be resolved: The repository system is offline but the artifact org.apache.karaf.tooling:features-maven-plugin:jar:2.3.0 is not available in the local repository.
dsun@localhost:> ls /home/dsun/.m2/repository/org/apache/karaf/tooling/features-maven-plugin/2.3.0/features-maven-plugin-2.3.0.jar …Run Code Online (Sandbox Code Playgroud)