2012-10-16 2 views
1

나는 liferay 테마를 만들고 싶다. 그래서 나는 원형으로부터 Maven 프로젝트를 만들었다. 내 pom.xml 파일 :Liferay theme + maven

<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: 
[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 

잘못 무엇입니까? 나는 변화 버전 liferay-maven-plugin을 시도하고있다. 그러나 그것은 나의 문제를 해결하지 못한다.

+0

빌드 CSS가 아니다 이 플러그인이 지원하는 목표에 나열된 목표 중 (사용자의 maven 오류로 인한) 당신의 출력물은 당신이 플러그인 버전 6.1.0을 사용하고 있다고 생각하는 것 같지만 당신의 pom은 6.1.20을 제안합니다 - 당신이 목록 화 한 출력물은 무엇입니까? – DaveRlz

+0

그렇다면 pom.xml을 어떻게 변경해야합니까? – witek010

+0

POM의 플러그인 버전을 6.1.0으로 변경 했는데도 여전히 오류가 있습니다. – witek010

답변

0

'build-css'라는 목표가 없습니다. 구성 파일에 groovy를 사용하고 있습니까? 여기에 붙여 넣은 것은 메이븐의 사용을위한 빌드 파일 일뿐입니다. "build-thumbnail"및 "theme-merge"와 같은 다른 목표는 어디에 있습니까? 이 Maven 빌드 파일이 읽는 구성 파일에 있어야합니다. 다른 목표가있는 곳에서 목표를 만들거나 비슷한 파일을 만들어야합니다. 그런 다음 다시 빌드하십시오.

2

사용 버전 6.1.1

가능한 목표에 liferay-maven-plugin.jar/META-INF/maven/plugin.xml를 살펴 보자 liferay-maven-plugin.jar 버전 6.1.0의에는 build-css 목표 없기 때문에. 다른 사람이 쓴 것처럼

0

- 6.1.0은 '빌드 CSS'를 지원하지 않는 목표를 삭제하거나 귀하의 pom.xml에 선 다음 주석 처리해야하므로 :

<goal>build-css</goal>