首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Liferay6.2maven主题--救生筏--看上去--感觉到了什么?

Liferay6.2maven主题--救生筏--看上去--感觉到了什么?
EN

Stack Overflow用户
提问于 2014-02-18 10:09:51
回答 1查看 3.7K关注 0票数 1

我使用救生筏的maven原型生成一个主题,如下所示:

代码语言:javascript
复制
mvn archetype:generate \
-DarchetypeGroupId=com.liferay.maven.archetypes \
-DarchetypeArtifactId=liferay-theme-archetype \
-DarchetypeVersion=6.2.0

看一看这里,以供参考。

奇怪的是,这个过程并没有给我liferay-look-and-feel.xml

现在,由于我从Liferay6.0迁移了一个旧主题,所以我尝试在liferay-look-and-feel.xml上复制,采用新的环境(即6.2):

代码语言:javascript
复制
<?xml version="1.0"?>
<!DOCTYPE look-and-feel PUBLIC "-//Liferay//DTD Look and Feel 6.2.0//EN" "http://www.liferay.com/dtd/liferay-look-and-feel_6_2_0.dtd">
<look-and-feel>
    <compatibility>
        <version>6.2.0+</version>
    </compatibility>
    <theme id="test-theme" name="Test Theme" />
</look-and-feel>

但是,mvn package似乎一点也不喜欢这个文件:

代码语言:javascript
复制
$ mvn package -e
[INFO] Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building test-theme Theme 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- liferay-maven-plugin:6.2.0-RC5:theme-merge (default) @ test-theme ---
[INFO] Parent theme group ID com.liferay.portal
[INFO] Parent theme artifact ID portal-web
[INFO] Parent theme version 6.2.10-GA1
[INFO] Parent theme ID _styled
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 15.803s
[INFO] Finished at: Tue Feb 18 11:02:32 CET 2014
[INFO] Final Memory: 7M/244M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.liferay.maven.plugins:liferay-maven-plugin:6.2.0-RC5:theme-merge (default) on project test-theme: www.liferay.com Nested exception: www.liferay.com -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.liferay.maven.plugins:liferay-maven-plugin:6.2.0-RC5:theme-merge (default) on project test-theme: www.liferay.com Nested exception: www.liferay.com
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:216)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
        at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
        at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:317)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:152)
        at org.apache.maven.cli.MavenCli.execute(MavenCli.java:555)
        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:158)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
        at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
        at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.plugin.MojoExecutionException: www.liferay.com Nested exception: www.liferay.com
        at com.liferay.maven.plugins.AbstractLiferayMojo.execute(AbstractLiferayMojo.java:82)
        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:106)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
        ... 19 more
Caused by: org.dom4j.DocumentException: www.liferay.com Nested exception: www.liferay.com
        at org.dom4j.io.SAXReader.read(SAXReader.java:484)
        at org.dom4j.io.SAXReader.read(SAXReader.java:264)
        at com.liferay.maven.plugins.util.SAXReaderUtil.read(SAXReaderUtil.java:30)
        at com.liferay.maven.plugins.ThemeMergeMojo.doExecute(ThemeMergeMojo.java:141)
        at com.liferay.maven.plugins.AbstractLiferayMojo.execute(AbstractLiferayMojo.java:75)
        ... 21 more
[ERROR]
[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/MojoExecutionException

删除liferay-look-and-feel.xml会给我我想要的结果,所以我问你:如果这个文件是必需的和记录在案,那么为什么救生衣maven插件会有问题呢?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2014-02-19 03:08:05

您需要在pom.xml中添加以下条目。

代码语言:javascript
复制
<properties>
    <liferay.theme.parent>classic</liferay.theme.parent>
    <liferay.theme.type>vm</liferay.theme.type>
</properties>

您可以根据需要将父主题指定为_styled、_unstyled或经典主题。

在生还者的外观和感觉,我们指定themeId,版本等,而插件开发使用maven,我们必须指定这些值在pom.xml。因此,不需要救生筏外观和感觉。

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

https://stackoverflow.com/questions/21850392

复制
相关文章

相似问题

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