首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Maven、plugins和JIRA

Maven、plugins和JIRA
EN

Stack Overflow用户
提问于 2013-11-25 23:35:10
回答 1查看 2K关注 0票数 1

我一直在浏览JIRA(https://developer.atlassian.com/display/DOCS/Getting+Started)中的hello示例。

Eclipse (开普勒)为我的项目在pom中给出了大量错误列表。特别是在第一个插件标签上。所有这些都是不同的

生命周期配置未涵盖的插件执行: com.atlassian.maven.plugins:maven-jira- Plugin :4.2.10:filter-test-plugin-描述符(执行:默认过滤器-测试-插件-描述符,阶段:过程-测试-资源)

第二个冒号之后的描述。我认为这些就是目标。

我遇到过,但这对那些对这一切完全陌生的人没有多大帮助。

下面是由亚特兰西安生成的pom

代码语言:javascript
复制
<?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.atlassian.tutorial</groupId>
    <artifactId>helloworld</artifactId>
    <version>1.0-SNAPSHOT</version>

    <organization>
        <name>HelloGoodby Inc.</name>
        <url>http://www.helloworldgoodbye.com</url>
    </organization>

    <name>helloworld</name>
    <description>This is the com.atlassian.tutorial:helloworld 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 -->
        <dependency>
            <groupId>com.atlassian.jira</groupId>
            <artifactId>jira-core</artifactId>
            <version>${jira.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.10</version>
            <scope>test</scope>
        </dependency>

        <!-- WIRED TEST RUNNER DEPENDENCIES -->
        <dependency>
            <groupId>com.atlassian.plugins</groupId>
            <artifactId>atlassian-plugins-osgi-testrunner</artifactId>
            <version>${plugin.testrunner.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>javax.ws.rs</groupId>
            <artifactId>jsr311-api</artifactId>
            <version>1.1.1</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.google.code.gson</groupId>
            <artifactId>gson</artifactId>
            <version>2.2.2-atlassian-1</version>
        </dependency>

        <!-- Uncomment to use TestKit in your project. Details at https://bitbucket.org/atlassian/jira-testkit -->
        <!-- You can read more about TestKit at https://developer.atlassian.com/display/JIRADEV/Plugin+Tutorial+-+Smarter+integration+testing+with+TestKit -->
        <!-- <dependency>
            <groupId>com.atlassian.jira.tests</groupId>
            <artifactId>jira-testkit-client</artifactId> 
            <version>${testkit.version}</version>
            <scope>test</scope>
        </dependency> -->
        <dependency>
            <groupId>com.atlassian.maven.plugins</groupId>
            <artifactId>maven-amps-plugin</artifactId>
            <version>4.2.10</version>
        </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>
                    <!-- Uncomment to install TestKit backdoor in JIRA. -->
                    <!-- <pluginArtifacts> <pluginArtifact> <groupId>com.atlassian.jira.tests</groupId> 
                        <artifactId>jira-testkit-plugin</artifactId> <version>${testkit.version}</version> 
                        </pluginArtifact> </pluginArtifacts> -->
                </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.1.3</jira.version>
        <amps.version>4.2.10</amps.version>
        <plugin.testrunner.version>1.1.2</plugin.testrunner.version>
        <!-- TestKit version 5.x for JIRA 5.x, 6.x for JIRA 6.x -->
        <testkit.version>5.2.26</testkit.version>
    </properties>
</project>
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2013-11-26 06:45:50

然而,"“将为您解决问题。

尽管Maven只是直截了当地执行配置好的插件,但是Eclipse中的Maven集成(m2e)不太愿意这样做。并不是所有在命令行上有意义的执行都应该在Eclipse中执行。现在,一些常见的插件,它将自动照顾,但当它遇到亚特兰西安插件,它似乎不知道做什么,并希望你的帮助。

根据所讨论的插件,您可以:

  1. 为这个特定的插件安装一个m2e连接器(这将知道该做什么)
  2. 在POM文件(pom.xml)中配置要执行的操作
  3. 在本地Eclipse中配置要做的事情

这些是按我的优先顺序给出的。在任何情况下,2都很有意义,因为每个导入POM文件的开发人员都会考虑这一点。POM文件中的配置可以告诉m2e向ignoreexecute执行插件,在后一种情况下,是否在增量构建(runOnIncremental)上运行。

"链接“给出了此配置的示例,该配置在POM的pluginManagement下的插件配置中被配置为lifecycleMappingMetadata。好消息是,Eclipse可以使用快速修复您所看到的错误来帮助您完成上述三种解决方案。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/20205710

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档