maven alfresco项目创建了有缺陷的pom.xml

时间:2014-12-20 10:42:37

标签: maven eclipse-plugin alfresco pom.xml

我对露天非常陌生,并试图制造一些简单的helloworld,但不断遇到任何问题。现在,当我尝试使用alfresco-amp-archetype在eclipse中创建一个新的maven项目时,它会生成pom.xml文件出现以下错误的项目:

Plugin execution not covered by lifecycle configuration: org.codehaus.mojo:build-helper-maven-plugin:1.8:add-test-resource (execution: add-env-test-properties, phase: generate-resources)

在这个地方:

<parent>
   <groupId>org.alfresco.maven</groupId>
   <artifactId>alfresco-sdk-parent</artifactId>
   <version>1.1.1</version>
</parent>

也许最好使用maven-alfresco-share-archetype,因为我想为露天创建一个工作流程?或该怎么处理这个问题?

然而mvn integration-test -Pamp-to-war -Dmaven.tomcat.port=8081没有给出任何错误,并且露天开始了,但是当我尝试登录时,露天给了我答案: 远程服务器可能不可用或您的身份验证详细信息未被识别

UPD:这是洞pom.xml:

<?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.someco</groupId>
    <artifactId>workflow-tutorial-repo</artifactId>
    <version>1.0-SNAPSHOT</version>
    <name>workflow-tutorial-repo AMP project</name>
    <packaging>amp</packaging>
    <description>Manages the lifecycle of the workflow-tutorial-repo AMP (Alfresco Module Package)</description>

    <parent>
        <groupId>org.alfresco.maven</groupId>
        <artifactId>alfresco-sdk-parent</artifactId>
        <version>1.1.1</version>
    </parent>


    <properties>
        <alfresco.groupId>org.alfresco</alfresco.groupId>
        <alfresco.version>4.2.e</alfresco.version>
        <app.log.root.level>WARN</app.log.root.level>
        <alfresco.data.location>alf_data_dev</alfresco.data.location>
         <alfresco.client.war>alfresco</alfresco.client.war>
        <alfresco.client.war.groupId>org.alfresco</alfresco.client.war.groupId>
        <alfresco.client.war.version>4.2.e</alfresco.client.war.version>
        <env>local</env>
    </properties>

     <dependencyManagement>
        <dependencies>
             <dependency>
                <groupId>${alfresco.groupId}</groupId>
                <artifactId>alfresco-platform-distribution</artifactId>
                <version>${alfresco.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>
     <dependencies>
        <dependency>
            <groupId>${alfresco.groupId}</groupId>
            <artifactId>alfresco-repository</artifactId>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.8.1</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <repositories>
        <repository>
            <id>alfresco-public</id>
            <url>https://artifacts.alfresco.com/nexus/content/groups/public</url>
        </repository>
        <repository>
            <id>alfresco-public-snapshots</id>
            <url>https://artifacts.alfresco.com/nexus/content/groups/public-snapshots</url>
            <snapshots>
                <enabled>true</enabled>
                <updatePolicy>daily</updatePolicy>
            </snapshots>
        </repository>
    </repositories>
</project>

2 个答案:

答案 0 :(得分:1)

我认为你有两个不同的问题。

i)运行分享 ii)解决Maven问题

首先,当您运行4.2版本时,还需要创建一个带有alfresco_target_amp_client_war = alfresco的AMP项目,然后首先从存储库AMP项目中启动命令mvn integration-test -Pamp-to-war -Dmaven.tomcat.port=8080

第二点,它不应该阻止你运行项目,而是与Maven无法管理插件版本相关,因此如果你在Eclipse中运行项目,请尝试右键单击pom.xml并找到像"mark goal set-version as ignored in build"

这样的项目

答案 1 :(得分:0)

在eclipse中安装m2e build-helper连接器。您可以从Window&gt;安装它。偏好&gt; Maven&gt;发现&gt;打开目录。那样build-helper-maven-plugin:在eclipse中调用add-sources而不需要你改变你的pom.xml。