org.apache.maven.plugins的pOM:maven-deploy-plugin:jar:2.7丢失,没有可用的依赖项信息

问题描述 投票:0回答:3

这是我的环境。 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 Jenkins 2.136

我的问题是我无法在Jenkins中执行mvn clean部署而不会发出错误。错误:


[警告] org.apache.maven.plugins:maven-deploy-plugin:jar:2.7的POM丢失,没有可用的依赖项信息[ERROR]插件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 repo,在浏览索引下,maven-deploy-plugin:jar:2.7存在,但是,在浏览存储下,只存在2.8.2。

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

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

JENKINS的设定

<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>
jenkins jenkins-plugins maven-3 maven-plugin nexus
3个回答
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的网络连接由于某种原因无法正常工作(例如,它可能会被防火墙阻止)。


0
投票

好吧,无法在nexus中访问repos的原因是由于公司的VPN安全性 - 不确定它是否是此时的代理或证书。

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

谢谢!


0
投票

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

clean package org.apache.maven.plugins:maven-deploy-plugin:2.8.2:deploy

© www.soinside.com 2019 - 2024. All rights reserved.