【问题标题】:build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missingorg.apache.maven.plugins:maven-compiler-plugin 的 build.plugins.plugin.version' 缺失
【发布时间】:2015-03-01 13:30:12
【问题描述】:

我正在努力让这个项目工作,https://bitbucket.org/doklovic_atlassian/atlassian-beer-supply/downloads

我必须获得几个库才能获得依赖项。但我仍然收到一个错误:

     在处理 POM 时遇到了一些问题:[警告] org.apache.maven.plugins:maven-compiler-plugin 的“build.plugins.plugin.version”缺失。 @ 第 156 行,第 21 列 [错误] 无法解析的构建扩展:插件 com.atlassian.maven.plugins:maven-jira-plugin:6.0.0 或其依赖项之一无法解析:无法收集 com.atlassian 的依赖项。 maven.plugins:maven-jira-plugin:jar:6.0.0 () @ [ERROR] Unknown Packaging: atlassian-plugin @ line 14, column 16 (at line 3)

这是项目的 pom.xml,


http://maven.apache.org/maven-v4_0_0.xsd">

<modelVersion>4.0.0</modelVersion>
<groupId>com.example.beersupply</groupId>
<artifactId>atlassian-beer-supply</artifactId>
<version>1.0-SNAPSHOT</version>
<organization>
    <name>Example Company</name>
    <url>http://www.example.com/</url>
</organization>
<name>atlassian-beer-supply</name>

<description>This is the com.example.beersupply:atlassian-beer-supply plugin for Atlassian JIRA.</description>

<packaging>atlassian-plugin</packaging>
<dependencies>
    <dependency>
        <groupId>com.atlassian.jira</groupId>
        <artifactId>jira-api</artifactId>
        <version>${jira.version}</version>
        <scope>provided</scope>
    </dependency>
    <!-- Add dependency on jira-core if you want access to JIRA implementation classes as well as the sanctioned API. -->
    <!-- This is not normally recommended, but may be required eg when migrating a plugin originally developed against JIRA 4.x -->
    <!-- WE ARE ADDING THIS IN SO WE HAVE THE CORE CLASSES NEEDED TO CREATE A WORKFLOW -->
    <dependency>
        <groupId>com.atlassian.jira</groupId>
        <artifactId>jira-core</artifactId>
        <version>${jira.version}</version>
        <scope>provided</scope>
    </dependency>
    <dependency>
        <groupId>com.atlassian.plugins</groupId>
        <artifactId>atlassian-plugins-core</artifactId>
        <version>3.2.5</version>
        <scope>provided</scope>
    </dependency>
    <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>4.8.1</version>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>com.atlassian.jira</groupId>
        <artifactId>jira-tests</artifactId>
        <version>${jira.version}</version>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>org.mockito</groupId>
        <artifactId>mockito-all</artifactId>
        <version>1.9.0</version>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>javax.servlet</groupId>
        <artifactId>servlet-api</artifactId>
        <version>2.4</version>
        <scope>provided</scope>
    </dependency>
    <!-- added this for activeobjects support -->
    <dependency>
        <groupId>com.atlassian.activeobjects</groupId>
        <artifactId>activeobjects-plugin</artifactId>
        <version>0.29.3</version>
        <scope>provided</scope>
    </dependency>
    <dependency>
        <groupId>net.java.dev.activeobjects</groupId>
        <artifactId>activeobjects-test</artifactId>
        <version>0.29.3</version>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>com.atlassian.activeobjects</groupId>
        <artifactId>activeobjects-test</artifactId>
        <version>0.29.3</version>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>org.apache.derby</groupId>
        <artifactId>derby</artifactId>
        <version>10.4.2.0</version>
        <scope>test</scope>
    </dependency>
    <!-- added this for template renderer support -->
    <dependency>
        <groupId>com.atlassian.templaterenderer</groupId>
        <artifactId>atlassian-template-renderer-api</artifactId>
        <version>1.5.7</version>
        <scope>provided</scope>
    </dependency>
    <!-- added this to parse json responses -->
    <dependency>
        <groupId>com.google.code.gson</groupId>
        <artifactId>gson</artifactId>
        <version>1.7.2</version>
    </dependency>
    <!-- rest junk -->
    <dependency>
        <groupId>javax.ws.rs</groupId>
        <artifactId>jsr311-api</artifactId>
        <version>1.1</version>
        <scope>provided</scope>
    </dependency>
    <dependency>
        <groupId>javax.xml.bind</groupId>
        <artifactId>jaxb-api</artifactId>
        <version>2.1</version>
        <scope>provided</scope>
    </dependency>
    <dependency>
        <groupId>com.atlassian.plugins.rest</groupId>
        <artifactId>atlassian-rest-common</artifactId>
        <version>2.9.10</version>
        <scope>provided</scope>
    </dependency>
    <dependency>
        <groupId>com.atlassian.jira</groupId>
        <artifactId>atlassian-jira-pageobjects</artifactId>
        <version>${jira.version}</version>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>org.apache.httpcomponents</groupId>
        <artifactId>httpclient</artifactId>
        <version>4.3.3</version>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>org.apache.wink</groupId>
        <artifactId>wink-client-apache-httpclient</artifactId>
        <version>1.1.3-incubating</version>
        <scope>test</scope>
    </dependency>
</dependencies>
<build>
    <plugins>
        <plugin>
            <groupId>com.atlassian.maven.plugins</groupId>
            <artifactId>maven-jira-plugin</artifactId>
            <version>${amps.version}</version>
            <extensions>true</extensions>
            <configuration>
                <productVersion>${jira.version}</productVersion>
                <productDataVersion>${jira.version}</productDataVersion>
                <instructions/>
            </configuration>
        </plugin>
        <plugin>
            <artifactId>maven-compiler-plugin</artifactId>
            <configuration>
                <source>1.6</source>
                <target>1.6</target>
            </configuration>
        </plugin>
    </plugins>
</build>
<properties>
    <jira.version>6.3.4</jira.version>
    <jira.data.version>6.3.4</jira.data.version>
    <amps.version>6.0.0</amps.version>
</properties>

***

如果有人能指出我在这里可能遗漏的内容,我将不胜感激。谢谢。

【问题讨论】:

  • 你试过什么?因为您粘贴的 pom 与 bitbucket 中的 POM 不同。
  • 我尝试使用较新版本的 Jira、amps 等。除此之外我没有更改任何内容。

标签: maven jira-plugin


【解决方案1】:

我只添加了 maven-compiler-plugin 的版本并将其设置为 3.3,如下所示:

<artifactId>maven-compiler-plugin</artifactId>
<version>3.3</version>

这样警告就消失了。

【讨论】:

    【解决方案2】:

    我解决了这个问题,这是由于我的 m2 存储库中的 maven-jira-plugin 6.0.0 中缺少一个文件 - "_remote.repositories"

    当我将版本更改为具有上述文件的 5.0.13 时,POM 没有给出错误。

    【讨论】:

      猜你喜欢
      • 2013-05-30
      • 2017-07-01
      • 1970-01-01
      • 2020-09-02
      • 1970-01-01
      • 1970-01-01
      • 2021-03-11
      • 2015-05-03
      • 1970-01-01
      相关资源
      最近更新 更多