缺少org.apache.maven.plugins:maven-deploy-plugin:jar:2.7的POM,没有可用的依赖项信息

时间:2018-08-08 21:45:21

标签: jenkins jenkins-plugins maven-3 maven-plugin nexus

这是我的环境。 Java版本“ 1.8.0_181” Java(TM)SE运行时环境(内部版本1.8.0_181-b13) Java HotSpot(TM)64位服务器VM(内部版本25.181-b13,混合模式)

Apache Maven 3.5.4 Nexus 2.14.8-01 詹金斯2.136

我的问题是,如果没有发出错误,我将无法在Jenkins中执行mvn干净部署。错误:


[警告]缺少org.apache.maven.plugins:maven-deploy-plugin:jar:2.7的POM,没有可用的依赖项信息 [错误]插件org.apache.maven.plugins:maven-deploy-plugin:2.7或其依赖项之一无法解析:在以下位置找不到org.apache.maven.plugins:maven-deploy-plugin:jar:2.7 http://137.27.68.182:8082/nexus/content/groups/public已缓存在本地存储库中,直到ge-ip-nexus的更新间隔或强制执行更新后,解析方案才会重新尝试-> [帮助1]

我很新,每次经历都使我更加接近,但是,我感到困惑。

在Nexus Maven Central中,我查看Nexus存储库,在“浏览索引”下,存在maven-deploy-plugin:jar:2.7,但是在浏览存储下,仅存在2.8.2。

我没有指定或据我所知没有特定版本,并且想知道为什么不只使用maven-deploy-plugin:jar:2.8.2?而不是2.7。而且我找不到2.7的声明位置。 ??

非常感谢您提供有关如何解决或解释到底发生了什么的任何建议,IOU啤酒和更多啤酒。 :)

牛仔裤的设置

<settings
  xmlns="http://maven.apache.org/SETTINGS/1.0.0"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
                      http://maven.apache.org/xsd/settings-1.0.0.xsd">

  <!-- The path to the local repository -->
  <localRepository>/Users/212555427/devel/maven/repositories/ge-ip-jenkins-repository</localRepository>

  <offline>false</offline>

  <servers>
    <server>
      <id>com.ge.ip.snapshot.local</id>
      <username>xxxxx</username>
      <password>xxxxxx</password>
    </server>
  </servers>

  <mirrors>

    <mirror>
      <id>ge-ip-nexus</id>
      <name>Nexus Repository Manager</name>
      <mirrorOf>*,!jbossRepos(x)</mirrorOf> 
      <url>http://137.277.686.182:8082/nexus/content/groups/public</url> 
    </mirror>

  </mirrors>

  <profiles>

    <!-- A definition of a development profile -->
    <profile>
      <id>development</id>
      <repositories>

        <repository>
          <snapshots>
            <enabled>false</enabled>
          </snapshots>
          <id>com.ge.ip.release</id>
          <name>Release Repository</name>
          <url>http://137.277.686.182:8082/nexus/content/groups/public</url> 
        </repository>

        <!-- The specified location of where all snapshot artifacts are retrieved from.  -->

        <repository>
          <snapshots>
            <enabled>true</enabled>
          </snapshots>
          <id>com.ge.ip.snapshot</id>
          <name>Snapshot Repository</name>
          <url>http://137.277.686.182:8082/nexus/content/groups/public</url> 
        </repository>

      </repositories>

      <pluginRepositories>

        <!-- The specified location of where all released plugins are retrieved from.  -->

        <pluginRepository>
          <snapshots>
            <enabled>false</enabled>
          </snapshots>
          <id>com.ge.ip.plugin.release</id>
          <name>Plugin Release Repository</name>
          <url>http://137.277.686.182:8082/nexus/content/groups/public</url> 
        </pluginRepository>

        <!-- The specified location of where all snapshot plugins are retrieved from.  -->

        <pluginRepository>
          <snapshots>
            <enabled>true</enabled>
          </snapshots>
          <id>com.ge.ip.plugin.snapshot</id>
          <name>Plugin Snapshot Repository</name>
          <url>http://137.277.686.182:8082/nexus/content/groups/public</url> 
        </pluginRepository>

      </pluginRepositories>
    </profile>

  </profiles>

  <!-- Specify the default active profile. -->
  <activeProfiles>
    <activeProfile>development</activeProfile>
  </activeProfiles>

</settings>

POM:

<?xml version="1.0" encoding="UTF-8"?>
<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>com.ge.digital.fleet</groupId>
  <artifactId>ge.digital.fleet.parent</artifactId>
  <version>1.0.1-SNAPSHOT</version>




 <packaging>pom</packaging>

  <name>DIGITAL Fleet Parent</name>

  <properties>

    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

    <compiler.source.version>1.8</compiler.source.version>
    <compiler.target.version>1.8</compiler.target.version>

    <!-- JBoss Fuse Properties -->
    <jboss.fuse.bom.version>6.3.0.redhat-310</jboss.fuse.bom.version>
    <jboss.fuse.install>6.3.0.redhat-310</jboss.fuse.install>

    <!-- Versions pulled from JBoss Fuse BOM for Dependency Management. -->
    <cxf-version>2.17.0.redhat-630310</cxf-version>
    <camel-version>2.17.0.redhat-630310</camel-version>
    <activemq-version>5.11.0.redhat-630310</activemq-version>
    <karaf-version>2.4.0.redhat-630310</karaf-version>
    <hawtio-version>1.4.0.redhat-630310</hawtio-version>
    <fabric-version>1.2.0.redhat-630310</fabric-version>
    <junit-version>4.11</junit-version>
    <log4j-version>1.2.17</log4j-version>
    <velocity-bundle-version>2.17.0.redhat-630310</velocity-bundle-version> 
    <velocity-version>2.17.0.redhat-630310</velocity-version>
    <joda-time-version>2.9.2</joda-time-version>

    <!-- Versions of 3rd Party Dependencies -->
    <ibm-mq-version>7.5.0.8</ibm-mq-version>

    <!-- Test Dependencies -->
    <ftpserver-version>1.0.6</ftpserver-version>
    <sshd-version>0.10.0</sshd-version>
    <greenmail-version>1.4.0</greenmail-version>

    <!-- Plugin Versions-->
    <version.maven-compiler-plugin>2.5.1</version.maven-compiler-plugin>
    <bundle-plugin-version>2.3.7</bundle-plugin-version>
    <build-helper-plugin-version>1.8</build-helper-plugin-version>
    <resources-plugin-version>2.4.3</resources-plugin-version>
    <felix-bundle-plugin-version>2.3.7</felix-bundle-plugin-version>
    <lifecycle-mapping-version>1.0.0</lifecycle-mapping-version>
    <maven-failsafe-plugin-version>2.8.1</maven-failsafe-plugin-version>
    <depends-maven-plugin-version>1.2</depends-maven-plugin-version>

  </properties>

  <dependencyManagement>
    <dependencies>
      <!-- Import Fuse Dependency Management via BOM -->
      <dependency>
        <groupId>org.jboss.fuse.bom</groupId>
        <artifactId>jboss-fuse-parent</artifactId>
        <version>${jboss.fuse.bom.version}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
      <dependency>
        <groupId>jcifs</groupId>
        <artifactId>jcifs</artifactId>
        <version>1.3.17</version>
      </dependency>
      <dependency>
        <groupId>joda-time</groupId>
        <artifactId>joda-time</artifactId>
        <version>${joda-time-version}</version>
      </dependency>
      <!-- Spring Dependencies -->
      <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-jdbc</artifactId>
        <version>4.0.4.RELEASE</version>
      </dependency>
      <dependency>
        <groupId>com.mchange</groupId>
        <artifactId>c3p0</artifactId>
        <version>0.9.2.1</version>
      </dependency>
      <dependency>
        <groupId>mysql</groupId>
        <artifactId>mysql-connector-java</artifactId>
        <version>5.7.21</version>  <!-- 5.7.21 5.1.27-->
      </dependency>
      <dependency>
        <groupId>org.apache.servicemix.bundles</groupId>
        <artifactId>org.apache.servicemix.bundles.dom4j</artifactId>
        <version>1.6.1_5</version>
      </dependency>
      <dependency>
          <groupId>org.apache.servicemix.bundles</groupId>
          <artifactId>org.apache.servicemix.bundles.poi</artifactId>
          <version>3.9_2</version>
      </dependency>
      <dependency>
          <groupId>org.apache.poi</groupId>
          <artifactId>poi-ooxml-schemas</artifactId>
          <version>3.9</version>
      </dependency>
      <dependency>
        <groupId>org.apache.poi</groupId>
        <artifactId>poi-ooxml</artifactId>
        <version>3.9</version>
      </dependency>
    </dependencies>
  </dependencyManagement>

 <dependencies> 
      <dependency>
        <groupId>org.apache.camel</groupId>
        <artifactId>camel-quartz</artifactId>
      </dependency>
      <dependency>
        <groupId>org.apache.camel</groupId>
        <artifactId>camel-bindy</artifactId>
      </dependency>
      <dependency>
        <groupId>org.apache.camel</groupId>
        <artifactId>camel-http4</artifactId>
      </dependency>
      <dependency>
        <groupId>org.apache.camel</groupId>
        <artifactId>camel-jackson</artifactId>
      </dependency>
      <dependency>
        <groupId>org.apache.httpcomponents</groupId>
        <artifactId>httpmime</artifactId>
        <version>4.3.1</version>
      </dependency>
      <dependency>
        <groupId>org.apache.camel</groupId>
        <artifactId>camel-csv</artifactId>
      </dependency>
      <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
      </dependency>
      <dependency>
        <groupId>log4j</groupId>
        <artifactId>log4j</artifactId>
      </dependency>
      <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-log4j12</artifactId>
      </dependency>
      <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-api</artifactId>
      </dependency>
 </dependencies>     

  <build>
    <defaultGoal>install</defaultGoal>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>${version.maven-compiler-plugin}</version>
        <configuration>
          <source>${compiler.source.version}</source>
          <target>${compiler.target.version}</target>
        </configuration>
      </plugin>
    </plugins>
  </build>

  <!-- 
    TODO
    The url needs to be updated to the Corporate Nexus Instance.
    This includes the hostname, port, and directory structure.
    The <id> must match the <server> id in the settings.xml.
    The settings.xml will contain the username/password.
    Also note that only Jenkins should be doing the deploy, therefore
    developer settings.xml SHOULD NOT contain the user name / password
    of the <server>
   -->

  <distributionManagement>
    <repository>
      <id>com.ge.ip.snapshot.local</id>
      <name>GE IP Releases</name>
      <url>http://137.277.686.182:8082/nexus/content/repositories/releases</url>
    </repository>
    <snapshotRepository>
      <id>com.ge.ip.snapshot.local</id>
      <name>GE IP Snapshots</name>
      <url>http://137.277.686.182:8082/nexus/content/repositories/snapshots</url>
    </snapshotRepository>
  </distributionManagement>

</project>

3 个答案:

答案 0 :(得分:1)

可以直接下载吗?

http://137.27.68.182:8082/nexus/content/groups/public/org/apache/maven/plugins/maven-deploy-plugin/2.7/maven-deploy-plugin-2.17.pom

如果没有,请检查nexus.log文件。您可能会发现从Nexus到Maven Central的网络连接由于某种原因无法正常工作(例如,防火墙可能阻止了该连接)。

答案 1 :(得分:0)

好吧,无法访问内联存储库的原因是由于公司vpn安全-目前尚不确定是代理还是证书。

但是,如果有人知道Maven如何确定插件的版本或版本,请发布答案。例如,如果您仅发出mvn clean deploy-maven如何知道选择2.7或2.8部署插件?

谢谢!

答案 2 :(得分:0)

指定部署插件的版本/发行版

清理软件包org.apache.maven.plugins:maven-deploy-plugin:2.8.2:deploy