代码之家  ›  专栏  ›  技术社区  ›  GLMills

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

  •  0
  • GLMills  · 技术社区  · 6 年前

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

    阿帕奇Maven 3.5.4 联系2.14.8-01 詹金斯2.136


    [警告]缺少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 in http://137.27.68.182:8082/nexus/content/groups/public 已缓存在本地存储库中,在ge ip nexus的更新间隔已过或强制更新之前,不会重新尝试解析->[帮助1]

    我是新来的,每次经历都让我更亲近,但是,我很困惑。

    在Nexus Maven Central中,我查看Nexus RePo,并且在浏览索引下,Maven部署插件:jar:2.7存在,但是,在浏览存储下,只有2.8存在。

    据我所知,我并没有指定一个特定的版本,我想知道为什么它不直接使用maven部署插件: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 回复  |  直到 6 年前
        1
  •  1
  •   rseddon    6 年前

    直接下载有用吗?

    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的网络连接由于某种原因无法工作(例如,它可能被防火墙阻止)。

        2
  •  0
  •   GLMills    6 年前

    好吧,无法访问nexus中的回购协议的原因是由于公司vpn安全性-目前不确定它是代理还是证书。

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

    谢谢您!

        3
  •  0
  •   GLMills    6 年前

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

    干净包org.apache.maven.plugins:maven deploy plugin:2.8.2:deploy