Helllo,
我正在尝试在mvn
中执行以下命令mvn -X archetype:generate -DarchetypeGroupId=org.apache.servicemix.tooling -DarchetypeArtifactId=servicemix-cxf-code-first-osgi-bundle -DarchetypeVersion=2012.01.0.redhat-60024 -DgroupId=org.fusesource.example -DartifactId=cxf-basic -Dversion=1.0-SNAPSHOT
这样做时,得到以下错误
3626 [main] [ERROR] org.apache.maven.cli.MavenCli - Plugin org.apache.maven.plugins:maven-archetype-plugin:2.4 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-archetype-plugin:jar:2.4: Could not transfer artifact org.apache.maven.plugins:maven-archetype-plugin:pom:2.4 from/to redhat-techpreview-all-repository (http:// maven.repository.redhat.com/techpreview/all/): Access denied to: http: // maven.repository.redhat.com/techpreview/all/org/apache/maven/plugins/maven-archetype-plugin/2.4/maven-archetype-plugin-2.4.pom , ReasonPhrase:Forbidden. -> [Help 1]
Caused by: org.eclipse.aether.resolution.ArtifactDescriptorException: Failed to read artifact descriptor for org.apache.maven.plugins:maven-archetype-plugin:jar:2.4
Caused by: org.eclipse.aether.resolution.ArtifactResolutionException: Could not transfer artifact org.apache.maven.plugins:maven-archetype-plugin:pom:2.4 from/to redhat-techpreview-all-repository (http:// maven.repository.redhat.com/techpreview/all/): Access denied to: http:// maven.repository.redhat.com/techpreview/all/org/apache/maven/plugins/maven-archetype-plugin/2.4/maven-archetype-plugin-2.4.pom , ReasonPhrase:Forbidden.
Caused by: org.eclipse.aether.transfer.ArtifactTransferException: Could not transfer artifact org.apache.maven.plugins:maven-archetype-plugin:pom:2.4 from/to redhat-techpreview-all-repository (http:// maven.repository.redhat.com/techpreview/all/): Access denied to: http:// maven.repository.redhat.com/techpreview/all/org/apache/maven/plugins/maven-archetype-plugin/2.4/maven-archetype-plugin-2.4.pom , ReasonPhrase:Forbidden.
起初,我认为这是由于代理设置。但事实并非如此。我甚至用选项-DproxySet=true -DproxyHost=10.142.125.36 -DproxyPort=8080
你能帮忙解决这个问题吗?
谢谢和问候 新手
答案 0 :(得分:0)
您的maven客户端无法访问repo1.maven.org。我认为你的settings.xml还有问题。
尝试查找var regex = new Regex(@"\w+\.jpg");
return regex.Matches(strInput);
并进行如下更改;
conf/settings.xml