1

我有一个使用 eclipse 在 java 中开发的项目。这个项目正在使用一组罐子。我们现在正在尝试使用 maven 执行这个项目。我已经为每个 jar 依赖项配置了 pom 文件,例如:

<dependency>
                        <groupId>org.eclipse.uml2</groupId>
                        <artifactId>uml</artifactId>
                        <version>3.2.1</version>
                </dependency>

我正在尝试使用我们在项目中拥有的相同版本的库。我面临两个问题: 1. 如果我只是像这样指定库,它会给我一个错误,它无法从 maven 使用的默认存储库下载。2.如果我在我的 pom smth 中指定存储库,例如:

<repositories>
     <repository>
       <id>Indigo Release</id>
       <url>https://raw.github.com/eclipse/acceleo/master/maven/repository/releases/indigo</url>
     </repository>
     <repository>
       <id>Juno Release</id>
       <url>https://raw.github.com/eclipse/acceleo/master/maven/repository/releases/juno</url>
     </repository>
     <repository>
       <id>Snapshots</id>
       <url>https://raw.github.com/eclipse/acceleo/master/maven/repository/snapshots</url>
     </repository>
   </repositories>

   <pluginRepositories>
     <pluginRepository>
       <id>Indigo Release</id>
       <url>https://raw.github.com/eclipse/acceleo/master/maven/repository/releases/indigo</url>
     </pluginRepository>
     <pluginRepository>
       <id>Juno Release</id>
       <url>https://raw.github.com/eclipse/acceleo/master/maven/repository/releases/juno</url>
     </pluginRepository>
     <pluginRepository>
       <id>Snapshots</id>
       <url>https://raw.github.com/eclipse/acceleo/master/maven/repository/snapshots</url>
     </pluginRepository>
   </pluginRepositories>

比此存储库中的版本不是我要下载的版本。我尝试在本地存储库中手动下载库,但工作量很大。没有任何简单的方法可以做到这一点吗?

先感谢您

4

1 回答 1

0

您的配置无法正常工作,因为对 github 的原始访问会给您错误 401,但要继续检查Eclipse 的 wiki

于 2012-09-11T10:07:06.603 回答