我正在尝试将我的POM.XML移动到linux构建环境中,maven-dependency-plugin没有被下载。我也检查了代理设置。除了这个插件,其他插件,依赖关系解决没有任何问题。我正在使用Maven 2.2.1
下面是pom.xml和错误消息。
任何人都可以帮我解决这个问题吗?
POM.XML:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>NBC</groupId>
<artifactId>CIR</artifactId>
<packaging>jar</packaging>
<version>1.0</version>
<name>cirjob-batch</name>
<url>http://maven.apache.org</url>
<issueManagement>
<system>JIRA</system>
<url>http://usaoaapld311lb.nbcuni.ge.com:8080</url>
</issueManagement>
<ciManagement>
<system>Bamboo</system>
<!--<url>http://usaoaapwd189:8085</url> -->
<url>http://usaoaapld311la.nbcuni.ge.com:8085</url>
</ciManagement>
<scm>
<url>svn://usaoaapld311lb.nbcuni.ge.com:3690/CIR</url>
</scm>
<!-- Fisheye/Crucible http://usaoaapwd189:8060 -->
<organization>
<name>NBC</name>
<url>NBC.COM</url>
</organization>
<repositories>
<repository>
<id>Sonatype</id>
<url>https://oss.sonatype.org/content/repositories/springsource-releases</url>
</repository>
<repository>
<id>JBoss</id>
<url>https://repository.jboss.org/nexus/content/repositories</url>
</repository>
<repository>
<id>Java.net</id>
<url>http://download.java.net/maven/2/</url>
</repository>
</repositories>
<dependencies>
<!-- Velocity -->
<dependency>
<groupId>org.apache.velocity</groupId>
<artifactId>velocity</artifactId>
<version>1.6.2</version>
</dependency>
<!-- Oracle -->
<dependency>
<groupId>com.oracle</groupId>
<artifactId>ojdbc14</artifactId>
<version>10.2.0.4.0</version>
</dependency>
<!-- Crystal Support -->
<dependency>
<groupId>com.crystaldecisions</groupId>
<artifactId>CrystalReportsRuntime</artifactId>
<version>${com.crystaldecisions.version}</version>
</dependency>
<dependency>
<groupId>com.crystaldecisions</groupId>
<artifactId>CrystalCommon2</artifactId>
<version>${com.crystaldecisions.version}</version>
</dependency>
<dependency>
<groupId>com.crystaldecisions</groupId>
<artifactId>DatabaseConnectors</artifactId>
<version>${com.crystaldecisions.version}</version>
</dependency>
<dependency>
<groupId>com.crystaldecisions</groupId>
<artifactId>QueryBuilder</artifactId>
<version>${com.crystaldecisions.version}</version>
</dependency>
<dependency>
<groupId>com.crystaldecisions</groupId>
<artifactId>jrcerom</artifactId>
<version>${com.crystaldecisions.version}</version>
</dependency>
<dependency>
<groupId>com.crystaldecisions</groupId>
<artifactId>keycodeDecoder</artifactId>
<version>${com.crystaldecisions.version}</version>
</dependency>
<dependency>
<groupId>com.businessobjects</groupId>
<artifactId>logging</artifactId>
<version>${com.businessobjects.version}</version>
</dependency>
<dependency>
<groupId>com.businessobjects</groupId>
<artifactId>JDBInterface</artifactId>
<version>${com.businessobjects.version}</version>
</dependency>
<dependency>
<groupId>org.apache</groupId>
<artifactId>commons-configuration</artifactId>
<version>1.2</version>
</dependency>
<dependency>
<groupId>com.ibm</groupId>
<artifactId>icu4j</artifactId>
<version>4.2.1</version>
</dependency>
<dependency>
<groupId>com.azalea</groupId>
<artifactId>com.azalea.ufl.barcode</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>javax.mail</groupId>
<artifactId>mail</artifactId>
<version>1.4.1</version>
</dependency>
<!-- Junit tests -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.8.1</version>
<scope>test</scope>
</dependency>
<!-- Old Servlets -->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.5</version>
</dependency>
<!-- Tomcat not having jstl lib -->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
<version>1.2</version>
</dependency>
<!-- Spring -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>${org.springframework.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>${org.springframework.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>${org.springframework.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-orm</artifactId>
<version>${org.springframework.version}</version>
</dependency>
<!-- <dependency> <groupId>org.springframework</groupId> <artifactId>spring-context-support</artifactId>
<version>${org.springframework.version}</version> </dependency> <dependency>
<groupId>opensymphony</groupId> <artifactId>quartz</artifactId> <version>1.6.0</version>
</dependency> <dependency> <groupId>org.quartz-scheduler</groupId> <artifactId>quartz</artifactId>
<version>2.1.5</version> </dependency> -->
<!-- Hibernate -->
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-distribution</artifactId>
<version>${org.hibernate.version}</version>
<type>pom</type>
<exclusions>
<exclusion>
<artifactId>freemarker</artifactId>
<groupId>freemarker</groupId>
</exclusion>
<exclusion>
<artifactId>hibernate-jbosscache</artifactId>
<groupId>org.hibernate</groupId>
</exclusion>
<exclusion>
<artifactId>hibernate-infinispan</artifactId>
<groupId>org.hibernate</groupId>
</exclusion>
</exclusions>
</dependency>
<!-- <dependency> <groupId>hibernate</groupId> <artifactId>hibernate-entitymanager</artifactId>
<version>3.4.0.GA</version> </dependency> -->
<!-- ActiveMQ <dependency> <groupId>org.apache.activemq</groupId> <artifactId>activemq-core</artifactId>
<version>${org.apache.activemq.version}</version> </dependency> -->
<!-- <org.apache.activemq.version>5.4.3</org.apache.activemq.version> -->
<!-- JSON this should be replaced by Gson -->
<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-core-asl</artifactId>
<version>1.8.5</version>
</dependency>
<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-mapper-asl</artifactId>
<version>1.8.5</version>
</dependency>
<!-- Gson: Java to Json conversion -->
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>1.7.1</version>
</dependency>
<!-- Logging -->
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.16</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>log4j-over-slf4j</artifactId>
<version>1.6.2</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>1.5.5</version>
</dependency>
<!-- Selenium -->
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-chrome-driver</artifactId>
<version>${org.seleniumhq.selenium.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-server</artifactId>
<version>${org.seleniumhq.selenium.version}</version>
<exclusions>
<!-- <exclusion> <artifactId>servlet-api</artifactId> <groupId>javax.servlet</groupId>
</exclusion> -->
</exclusions>
</dependency>
<!-- Utils -->
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.0.1</version>
</dependency>
</dependencies>
<build>
<sourceDirectory>src</sourceDirectory>
<scriptSourceDirectory>conf\batch\dev</scriptSourceDirectory>
<outputDirectory>target\classes</outputDirectory>
<resources>
<resource>
<directory>cfg\batch\dev</directory>
<filtering>true</filtering>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<excludes>
<exclude>**/reportEngine/*</exclude>
<exclude>**/controller/reporting/ReportEngineController.class</exclude>
<exclude>**/service/ReportEngineService.class</exclude>
</excludes>
<archive>
<!-- <manifest> <mainClass>main.java.batch.com.ge.nbcuni.job.ReportJobBatch</mainClass>
</manifest> -->
</archive>
</configuration>
</plugin>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<phase>install</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>target/lib</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
</plugin>
</plugins>
</build>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<org.springframework.version>3.0.5.RELEASE</org.springframework.version>
<org.hibernate.version>3.5.4-Final</org.hibernate.version>
<org.seleniumhq.selenium.version>2.12.0</org.seleniumhq.selenium.version>
<com.crystaldecisions.version>12.2.2</com.crystaldecisions.version>
<com.businessobjects.version>12.2.2</com.businessobjects.version>
</properties>
<modules>
</modules>
</project>
ERROR:
Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-dependency-plugin/2.0/maven-dependency-plugin-2.0.pom
19-Nov-2012 11:10:09 [INFO] Unable to find resource 'org.apache.maven.plugins:maven-dependency-plugin:pom:2.0' in repository central (http://repo1.maven.org/maven2)
19-Nov-2012 11:10:09 Downloading: https://oss.sonatype.org/content/repositories/springsource-releases/org/apache/maven/plugins/maven-dependency-plugin/2.0/maven-dependency-plugin-2.0.pom
19-Nov-2012 11:10:10 [WARNING] Unable to get resource 'org.apache.maven.plugins:maven-dependency-plugin:pom:2.0' from repository Sonatype (https://oss.sonatype.org/content/repositories/springsource-releases): Error transferring file: oss.sonatype.org
19-Nov-2012 11:10:10 Downloading: https://repository.jboss.org/nexus/content/repositories/org/apache/maven/plugins/maven-dependency-plugin/2.0/maven-dependency-plugin-2.0.pom
19-Nov-2012 11:10:10 [WARNING] Unable to get resource 'org.apache.maven.plugins:maven-dependency-plugin:pom:2.0' from repository JBoss (https://repository.jboss.org/nexus/content/repositories): Error transferring file: repository.jboss.org
19-Nov-2012 11:10:10 Downloading: http://download.java.net/maven/2//org/apache/maven/plugins/maven-dependency-plugin/2.0/maven-dependency-plugin-2.0.pom
19-Nov-2012 11:10:10 [INFO] Unable to find resource 'org.apache.maven.plugins:maven-dependency-plugin:pom:2.0' in repository Java.net (http://download.java.net/maven/2/)
19-Nov-2012 11:10:10 Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-dependency-plugin/2.0/maven-dependency-plugin-2.0.pom
19-Nov-2012 11:10:10 [INFO] Unable to find resource 'org.apache.maven.plugins:maven-dependency-plugin:pom:2.0' in repository central (http://repo1.maven.org/maven2)
19-Nov-2012 11:10:10 [INFO] ------------------------------------------------------------------------
19-Nov-2012 11:10:10 [ERROR] BUILD ERROR
19-Nov-2012 11:10:10 [INFO] ------------------------------------------------------------------------
19-Nov-2012 11:10:10 [INFO] Error building POM (may not be this project's POM).
19-Nov-2012 11:10:10
19-Nov-2012 11:10:10
19-Nov-2012 11:10:10 Project ID: org.apache.maven.plugins:maven-dependency-plugin
19-Nov-2012 11:10:10
19-Nov-2012 11:10:10 Reason: POM 'org.apache.maven.plugins:maven-dependency-plugin' not found in repository: Unable to download the artifact from any repository
19-Nov-2012 11:10:10
19-Nov-2012 11:10:10 org.apache.maven.plugins:maven-dependency-plugin:pom:2.0
19-Nov-2012 11:10:10
19-Nov-2012 11:10:10 from the specified remote repositories:
19-Nov-2012 11:10:10 central (http://repo1.maven.org/maven2),
19-Nov-2012 11:10:10 Sonatype (https://oss.sonatype.org/content/repositories/springsource-releases),
19-Nov-2012 11:10:10 JBoss (https://repository.jboss.org/nexus/content/repositories),
19-Nov-2012 11:10:10 Java.net (http://download.java.net/maven/2/)
19-Nov-2012 11:10:10
19-Nov-2012 11:10:10 for project org.apache.maven.plugins:maven-dependency-plugin
19-Nov-2012 11:10:10
19-Nov-2012 11:10:10
19-Nov-2012 11:10:10 [INFO] ------------------------------------------------------------------------
19-Nov-2012 11:10:10 [INFO] Trace
19-Nov-2012 11:10:10 org.apache.maven.lifecycle.LifecycleExecutionException: Unable to build project for plugin 'org.apache.maven.plugins:maven-dependency-plugin': POM 'org.apache.maven.plugins:maven-dependency-plugin' not found in repository: Unable to download the artifact from any repository
19-Nov-2012 11:10:10
19-Nov-2012 11:10:10 org.apache.maven.plugins:maven-dependency-plugin:pom:2.0
19-Nov-2012 11:10:10
19-Nov-2012 11:10:10 from the specified remote repositories:
19-Nov-2012 11:10:10 central (http://repo1.maven.org/maven2),
19-Nov-2012 11:10:10 Sonatype (https://oss.sonatype.org/content/repositories/springsource-releases),
19-Nov-2012 11:10:10 JBoss (https://repository.jboss.org/nexus/content/repositories),
19-Nov-2012 11:10:10 Java.net (http://download.java.net/maven/2/)
19-Nov-2012 11:10:10
19-Nov-2012 11:10:10 for project org.apache.maven.plugins:maven-dependency-plugin
19-Nov-2012 11:10:10 at org.apache.maven.lifecycle.DefaultLifecycleExecutor.verifyPlugin(DefaultLifecycleExecutor.java:1557)
19-Nov-2012 11:10:10 at org.apache.maven.lifecycle.DefaultLifecycleExecutor.bindPluginToLifecycle(DefaultLifecycleExecutor.java:1503)
19-Nov-2012 11:10:10 at org.apache.maven.lifecycle.DefaultLifecycleExecutor.constructLifecycleMappings(DefaultLifecycleExecutor.java:1282)
19-Nov-2012 11:10:10 at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:534)
19-Nov-2012 11:10:10 at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
19-Nov-2012 11:10:10 at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
19-Nov-2012 11:10:10 at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
19-Nov-2012 11:10:10 at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
19-Nov-2012 11:10:10 at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
19-Nov-2012 11:10:10 at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
19-Nov-2012 11:10:10 at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
19-Nov-2012 11:10:10 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
19-Nov-2012 11:10:10 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
19-Nov-2012 11:10:10 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
19-Nov-2012 11:10:10 at java.lang.reflect.Method.invoke(Method.java:597)
19-Nov-2012 11:10:10 at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
19-Nov-2012 11:10:10 at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
19-Nov-2012 11:10:10 at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
19-Nov-2012 11:10:10 at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
19-Nov-2012 11:10:10 Caused by: org.apache.maven.plugin.InvalidPluginException: Unable to build project for plugin 'org.apache.maven.plugins:maven-dependency-plugin': POM 'org.apache.maven.plugins:maven-dependency-plugin' not found in repository: Unable to download the artifact from any repository
19-Nov-2012 11:10:10
19-Nov-2012 11:10:10 org.apache.maven.plugins:maven-dependency-plugin:pom:2.0
19-Nov-2012 11:10:10
19-Nov-2012 11:10:10 from the specified remote repositories:
19-Nov-2012 11:10:10 central (http://repo1.maven.org/maven2),
19-Nov-2012 11:10:10 Sonatype (https://oss.sonatype.org/content/repositories/springsource-releases),
19-Nov-2012 11:10:10 JBoss (https://repository.jboss.org/nexus/content/repositories),
19-Nov-2012 11:10:10 Java.net (http://download.java.net/maven/2/)
19-Nov-2012 11:10:10
19-Nov-2012 11:10:10 for project org.apache.maven.plugins:maven-dependency-plugin
19-Nov-2012 11:10:10 at org.apache.maven.plugin.DefaultPluginManager.checkRequiredMavenVersion(DefaultPluginManager.java:293)
19-Nov-2012 11:10:10 at org.apache.maven.plugin.DefaultPluginManager.verifyVersionedPlugin(DefaultPluginManager.java:205)
19-Nov-2012 11:10:10 at org.apache.maven.plugin.DefaultPluginManager.verifyPlugin(DefaultPluginManager.java:184)
19-Nov-2012 11:10:10 at org.apache.maven.plugin.DefaultPluginManager.loadPluginDescriptor(DefaultPluginManager.java:1642)
19-Nov-2012 11:10:10 at org.apache.maven.lifecycle.DefaultLifecycleExecutor.verifyPlugin(DefaultLifecycleExecutor.java:1540)
19-Nov-2012 11:10:10 ... 18 more
19-Nov-2012 11:10:10 Caused by: org.apache.maven.project.ProjectBuildingException: POM 'org.apache.maven.plugins:maven-dependency-plugin' not found in repository: Unable to download the artifact from any repository
19-Nov-2012 11:10:10
19-Nov-2012 11:10:10 org.apache.maven.plugins:maven-dependency-plugin:pom:2.0
19-Nov-2012 11:10:10
19-Nov-2012 11:10:10 from the specified remote repositories:
19-Nov-2012 11:10:10 central (http://repo1.maven.org/maven2),
19-Nov-2012 11:10:10 Sonatype (https://oss.sonatype.org/content/repositories/springsource-releases),
19-Nov-2012 11:10:10 JBoss (https://repository.jboss.org/nexus/content/repositories),
19-Nov-2012 11:10:10 Java.net (http://download.java.net/maven/2/)
19-Nov-2012 11:10:10
19-Nov-2012 11:10:10 for project org.apache.maven.plugins:maven-dependency-plugin
19-Nov-2012 11:10:10 at org.apache.maven.project.DefaultMavenProjectBuilder.findModelFromRepository(DefaultMavenProjectBuilder.java:605)
19-Nov-2012 11:10:10 at org.apache.maven.project.DefaultMavenProjectBuilder.buildFromRepository(DefaultMavenProjectBuilder.java:251)
19-Nov-2012 11:10:10 at org.apache.maven.plugin.DefaultPluginManager.checkRequiredMavenVersion(DefaultPluginManager.java:277)
19-Nov-2012 11:10:10 ... 22 more
19-Nov-2012 11:10:10 Caused by: org.apache.maven.artifact.resolver.ArtifactNotFoundException: Unable to download the artifact from any repository
19-Nov-2012 11:10:10
19-Nov-2012 11:10:10 org.apache.maven.plugins:maven-dependency-plugin:pom:2.0
19-Nov-2012 11:10:10
19-Nov-2012 11:10:10 from the specified remote repositories:
19-Nov-2012 11:10:10 central (http://repo1.maven.org/maven2),
19-Nov-2012 11:10:10 Sonatype (https://oss.sonatype.org/content/repositories/springsource-releases),
19-Nov-2012 11:10:10 JBoss (https://repository.jboss.org/nexus/content/repositories),
19-Nov-2012 11:10:10 Java.net (http://download.java.net/maven/2/)
19-Nov-2012 11:10:10
19-Nov-2012 11:10:10
19-Nov-2012 11:10:10 at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:228)
19-Nov-2012 11:10:10 at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:90)
19-Nov-2012 11:10:10 at org.apache.maven.project.DefaultMavenProjectBuilder.findModelFromRepository(DefaultMavenProjectBuilder.java:558)
19-Nov-2012 11:10:10 ... 24 more
19-Nov-2012 11:10:10 Caused by: org.apache.maven.wagon.ResourceDoesNotExistException: Unable to download the artifact from any repository
19-Nov-2012 11:10:10 at org.apache.maven.artifact.manager.DefaultWagonManager.getArtifact(DefaultWagonManager.java:404)
19-Nov-2012 11:10:10 at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:216)
19-Nov-2012 11:10:10 ... 26 more
19-Nov-2012 11:10:10 [INFO] ------------------------------------------------------------------------
19-Nov-2012 11:10:10 [INFO] Total time: 2 seconds
19-Nov-2012 11:10:10 [INFO] Finished at: Mon Nov 19 11:10:10 EST 2012
19-Nov-2012 11:10:10 [INFO] Final Memory: 4M/57M
答案 0 :(得分:0)
您是否坐在代理服务器后面(我刚刚通过浏览器对其进行了测试,效果很好)?此外,我强烈建议开始使用存储库管理器。你是否有充分理由放弃Maven约定(src / main / java等?)。如果你需要在maven-jar-plugin中排除这是一个指示器,它有几个独立的maven模块而不是一个模块。 maven-dependency-plugin将工件复制到另一个文件夹的想法是什么?为什么不使用Maven 3.0.X而不是2.2.1? BTW:Spring框架在Maven Central中可用,因此无需单独提供存储库。除此之外,SpringSource存储库的给定URL是SpringSource到Maven Central的暂存存储库。