1

首先,我使用 Eclipse 下载了 Liferay。我创建了一个 Liferay 项目,并在我的 portlet(在我的 Liferay 项目中)中添加了一个 service.xml 以使用 Service Builder。当我点击构建服务按钮(看图片)按钮构建服务

我有那个错误:`

[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO] 
[INFO] Net'COFILMO - Pom parent
[INFO] Net'AVEO - Portlets - Pom parent
[INFO] app_chequier
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building Net'COFILMO - Pom parent 1.0.0.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] Net'COFILMO - Pom parent ........................... FAILURE [  0.002 s]
[INFO] Net'AVEO - Portlets - Pom parent ................... SKIPPED
[INFO] app_chequier ....................................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.206 s
[INFO] Finished at: 2017-11-16T14:13:33+01:00
[INFO] Final Memory: 6M/77M
[INFO] ------------------------------------------------------------------------
[ERROR] Unknown lifecycle phase "build-service". You must specify a valid lifecycle phase or a goal in the format <plugin-prefix>:<goal> or <plugin-group-id>:<plugin-artifact-id>[:<plugin-version>]:<goal>. Available lifecycle phases are: validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy, pre-clean, clean, post-clean, pre-site, site, post-site, site-deploy. -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/LifecyclePhaseNotFoundException

`

我不知道我该如何解决这个问题。

提前致谢。

4

1 回答 1

0
I use the Liferay version 7 and that it's my POM.xml

`<?xml version="1.0"?>
 <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.utlimate</groupId>
    <artifactId>UltimateTesting</artifactId>
    <packaging>pom</packaging>
    <name>UltimateTesting</name>
    <version>1.0.0-SNAPSHOT</version>
    <build>
        <plugins>
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>2.5</version>
                <configuration>
                    <encoding>UTF-8</encoding>
                    <source>1.6</source>
                    <target>1.6</target>
                </configuration>
            </plugin>
            <plugin>
                <groupId>com.liferay</groupId>
                <artifactId>com.liferay.portal.tools.service.builder</artifactId>
                <version>1.0.175</version>
            </plugin>
            <plugin>
                <artifactId>maven-resources-plugin</artifactId>
                <version>2.5</version>
                <configuration>
                    <encoding>UTF-8</encoding>
                </configuration>
            </plugin>
        </plugins>
    </build>
    <modules>
        <module>UltimateTesting-portlet</module>
        <module>UltimateTesting-portlet-service</module>
    </modules>
 </project>`
于 2017-11-17T09:11:42.003 回答