首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Liferay主题+ maven

Liferay主题+ maven
EN

Stack Overflow用户
提问于 2012-10-16 20:52:47
回答 4查看 5.3K关注 0票数 1

我想创建救生索主题,所以我从原型创建了一个Maven项目。我的pom.xml:

代码语言:javascript
复制
<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.liferay.sample</groupId>
  <artifactId>sample-theme</artifactId>
  <packaging>war</packaging>
  <name>sample-theme Theme</name>
  <version>0.0.1-SNAPSHOT</version>
  <build>
    <plugins>
      <plugin>
        <groupId>com.liferay.maven.plugins</groupId>
        <artifactId>liferay-maven-plugin</artifactId>
        <version>6.1.20</version>
        <executions>
          <execution>
            <phase>generate-sources</phase>
            <goals>
              <goal>theme-merge</goal>
              <goal>build-css</goal>
              <goal>build-thumbnail</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <autoDeployDir>${liferay.auto.deploy.dir}</autoDeployDir>
          <appServerDeployDir>${liferay.app.server.deploy.dir}</appServerDeployDir>
          <appServerLibGlobalDir>${liferay.app.server.lib.global.dir}</appServerLibGlobalDir>
          <appServerPortalDir>${liferay.app.server.portal.dir}</appServerPortalDir>
          <liferayVersion>${liferay.version}</liferayVersion>
          <parentTheme>${liferay.theme.parent}</parentTheme>
          <pluginType>theme</pluginType>
          <themeType>${liferay.theme.type}</themeType>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-resources-plugin</artifactId>
        <version>2.5</version>
        <configuration>
          <encoding>UTF-8</encoding>
        </configuration>
      </plugin>
    </plugins>
  </build>
  <dependencies>
    <dependency>
      <groupId>com.liferay.portal</groupId>
      <artifactId>portal-service</artifactId>
      <version>6.1.0</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>com.liferay.portal</groupId>
      <artifactId>util-bridges</artifactId>
      <version>6.1.0</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>com.liferay.portal</groupId>
      <artifactId>util-taglib</artifactId>
      <version>6.1.0</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>com.liferay.portal</groupId>
      <artifactId>util-java</artifactId>
      <version>6.1.0</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>javax.portlet</groupId>
      <artifactId>portlet-api</artifactId>
      <version>2.0</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>javax.servlet</groupId>
      <artifactId>servlet-api</artifactId>
      <version>2.4</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>javax.servlet.jsp</groupId>
      <artifactId>jsp-api</artifactId>
      <version>2.0</version>
      <scope>provided</scope>
    </dependency>
  </dependencies>
  <properties>
    <liferay.theme.parent>_styled</liferay.theme.parent>
    <liferay.theme.type>vm</liferay.theme.type>
  </properties>
</project>And I use maven:package and I see an error:
代码语言:javascript
复制
[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building sample-theme Theme 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.400s
[INFO] Finished at: Tue Oct 16 14:47:58 CEST 2012
[INFO] Final Memory: 2M/15M
[INFO] ------------------------------------------------------------------------
[ERROR] Could not find goal 'build-css' in plugin com.liferay.maven.plugins:liferay-maven-plugin:6.1.0 among available goals build-lang, build-wsdd, build-ext, build-service, direct-deploy, theme-merge, build-thumbnail, 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/MojoNotFoundException

怎么啦?

EN

回答 4

Stack Overflow用户

发布于 2012-10-17 21:40:21

使用版本6.1.1,因为在6.1.0版本的liferay-maven-plugin.jar中没有build-css目标

请查看liferay-maven-plugin.jar/META-INF/maven/plugin.xml,了解可用的目标。

票数 2
EN

Stack Overflow用户

发布于 2012-10-17 05:38:18

您没有名为'build-css‘的目标,您是否使用groovy作为配置文件?你的其他目标在哪里,例如,寻找“构建缩略图”和“主题合并”?无论其他目标在哪里,您都需要在那里或在类似的文件中创建您的目标。然后重新构建。

票数 0
EN

Stack Overflow用户

发布于 2012-10-17 13:55:33

删除条目build-css和build- the,然后重新部署它,或者您可以检查pom.xml文件作为以下链接中给出的引用。

http://www.liferay.com/community/forums/-/message_boards/message/5220131

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

https://stackoverflow.com/questions/12915172

复制
相关文章

相似问题

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