2012-08-01 55 views
1

我使用Maven的命令行来构建我的申请,我也得到建立成功,但在eclipse我得到的错误:如何使用Maven跟踪jar?

The repository system is offline but the artifact org.codehaus.plexus:plexus-archiver:jar:1.2 is not available in the local repository. 

虽然我做了更新项目配置和更新的依赖,我想知道是什么插件或依赖是负责这个罐子?

以下是我使用的插件:

<plugins> 
      <plugin> 
       <groupId>org.codehaus.mojo</groupId> 
       <artifactId>hibernate3-maven-plugin</artifactId> 
       <version>2.2</version> 
       <executions> 
        <execution> 
         <phase>process-classes</phase> 
         <goals> 
          <goal>hbm2ddl</goal> 
         </goals> 
        </execution> 
       </executions> 
       <configuration> 
        <components> 
         <component> 
          <name>hbm2ddl</name> 
          <implementation>annotationconfiguration</implementation> 
         </component> 
         <component> 
          <name>hbmdoc</name> 
         </component> 
        </components> 
        <componentProperties> 
         <configurationfile>/target/classes/hibernate.cfg.xml</configurationfile> 
         <outputfilename>CreateTables.sql</outputfilename> 
         <namingstrategy>com.xeno.advertisingsuite.web</namingstrategy> 
         <drop>false</drop> 
         <create>true</create> 
         <export>false</export> 
         <format>true</format> 
        </componentProperties> 
       </configuration> 
      </plugin> 


      <plugin> 
       <artifactId>maven-compiler-plugin</artifactId> 
       <configuration> 
        <source>1.6</source> 
        <target>1.6</target> 
       </configuration> 
      </plugin> 

      <plugin> 
       <groupId>org.apache.maven.plugins</groupId> 
       <artifactId>maven-resources-plugin</artifactId> 
       <version>2.5</version> 
       <configuration> 
        <encoding>UTF-8</encoding> 
       </configuration> 
      </plugin> 

      <!-- run command: mvn tomcat7:run --> 
      <plugin> 
       <groupId>org.apache.tomcat.maven</groupId> 
       <artifactId>tomcat7-maven-plugin</artifactId> 
       <version>2.0-beta-1</version> 
       <configuration> 
        <path>/${project.build.finalName}</path> 
       </configuration> 
      </plugin> 

      <!-- run command: mvn 7:run --> 
      <plugin> 
       <groupId>com.googlecode.t7mp</groupId> 
       <artifactId>maven-t7-plugin</artifactId> 
       <version>0.9.6</version> 
       <configuration> 
        <tomcatHttpPort>8081</tomcatHttpPort> 
        <tomcatShutdownPort>8008</tomcatShutdownPort> 
        <tomcatVersion>7.0.22</tomcatVersion> 
       </configuration> 
      </plugin> 

<plugin> 
     <groupId>org.codehaus.mojo</groupId> 
     <artifactId>aspectj-maven-plugin</artifactId> 
     <version>1.4</version> 
     <configuration> 
     <complianceLevel>1.6</complianceLevel> 
     <encoding>UTF-8</encoding> 
     <aspectLibraries> 
      <aspectLibrary> 
      <groupId>org.springframework</groupId> 
      <artifactId>spring-aspects</artifactId> 
      </aspectLibrary> 
     </aspectLibraries> 
     <Xlint>warning</Xlint> 
     </configuration> 
     <executions> 
     <execution> 
      <goals> 
      <goal>compile</goal> 
      <goal>test-compile</goal> 
      </goals> 
     </execution> 
     </executions> 
    </plugin> 


    </plugins> 

请告知如何解决这个问题,谢谢。

回答

3

尝试通过mvn dependency:resolve-plugins解决插件依赖关系 - 它将打印maven插件的依赖关系树来输出。果然调试模式

而且选项帮助很大:mvn -X

+0

我试过了,但它并没有帮助 – 2012-08-01 09:54:58

+0

尝试搜索本地资源库的* .pom文件丛存档器ID(〜/ .m2目录/ repository) – 2012-08-01 10:03:17

+0

在我的.m2中有这个jar的其他版本不是必需的,我想知道哪个插件正好要求这个jar,所以我可以改变它。 – 2012-08-01 10:10:02