组合视图 统一视图 树状图
讨论主题 [ 上一个 | 下一个 ]
toggle
Kim Anna Kunc
Maven Support in Beta 4 ?
2011年11月15日 上午5:22
答复

Kim Anna Kunc

等级: Junior Member

帖子: 30

加入日期: 2009年2月18日

最近的帖子

Hi guys, I've been trying out the liferay maven archetypes for portlets and service builder projects.
I built all maven artefacts from 6.1 beta 3 and installed them to my local repository.

Today I wanted to test with beta 4 but the portal source I downloaded has no "support-maven" folder.
Does anyone know why it is missing ?

Has anyone sucessfuly built and deployed a service builder portlet on 6.1. Beta 3 or 4 with maven ?
When I deploy with maven, I have NoSuchMethodError Exceptions when initializing com.liferay.portal.kernel.dao.orm.FinderPath.
I made a diff between the sources generated from ant and maven builds.
It seems to me service builder generates persistence classes differently from the maven build than from the (plugins-sdk) ant build.

Thanks,
Kim
Kim Anna Kunc
RE: Maven Support in Beta 4 ?
2011年11月15日 上午7:11
答复

Kim Anna Kunc

等级: Junior Member

帖子: 30

加入日期: 2009年2月18日

最近的帖子

I think I found the reason for my build problems. If I rebuild all maven artifacts with a new version (not with 6.1.0-SNAPSHOT)
and set this version in the portlet POM, I have compile errors in the *PersistenceImpl.
So the problem is that the "maven plugin" in portal src is not built locally when executing mvn install, but is loaded from the liferay repository and this version has older dependencies (not matching the bundle). So in short services are not built for the current bundle version.
Mika Koivisto
RE: Maven Support in Beta 4 ?
2011年11月15日 上午10:47
答复

Mika Koivisto

LIFERAY STAFF

等级: Liferay Legend

帖子: 1499

加入日期: 2006年8月7日

最近的帖子

It's changed I just haven't had time to blog about it. We've separated all the maven archetypes and plugins into it's own project on github. See https://github.com/liferay/liferay-maven-support

For portal artifacts we are now providing a installer in addition to deploying them to central (for CE only). If you want to install the artifacts from source you can run
1ant -f build-maven.xml install-snapshot-artifacts


If you want to deploy them edit release.${username}.properties and set following properties to match your environment
1    lp.maven.release.repository.id=sonatype-staging
2    lp.maven.release.repository.url=http://oss.sonatype.org/service/local/staging/deploy/maven2
3    lp.maven.snapshot.repository.id=sonatype-snapshot
4    lp.maven.snapshot.repository.url=http://oss.sonatype.org/content/repositories/snapshots
Kim Anna Kunc
RE: Maven Support in Beta 4 ?
2011年11月29日 上午5:19
答复

Kim Anna Kunc

等级: Junior Member

帖子: 30

加入日期: 2009年2月18日

最近的帖子

Hi Mika, I downloaded the github project and it workds fine, thanks!

But trying to build the portal jars "portal-impl" and so on, I noticed that in the portal source for beta 4, which I downloaded from your SF site, there are no ANT build files in the zip at all.
Where are build.xml and build-maven.xml ?

Thanks,
Kim

Mika Koivisto:
It's changed I just haven't had time to blog about it. We've separated all the maven archetypes and plugins into it's own project on github. See https://github.com/liferay/liferay-maven-support

For portal artifacts we are now providing a installer in addition to deploying them to central (for CE only). If you want to install the artifacts from source you can run
1ant -f build-maven.xml install-snapshot-artifacts


If you want to deploy them edit release.${username}.properties and set following properties to match your environment
1    lp.maven.release.repository.id=sonatype-staging
2    lp.maven.release.repository.url=http://oss.sonatype.org/service/local/staging/deploy/maven2
3    lp.maven.snapshot.repository.id=sonatype-snapshot
4    lp.maven.snapshot.repository.url=http://oss.sonatype.org/content/repositories/snapshots
Kim Anna Kunc
RE: Maven Support in Beta 4 ?
2011年11月30日 上午1:33
答复

Kim Anna Kunc

等级: Junior Member

帖子: 30

加入日期: 2009年2月18日

最近的帖子

Ok, I now build the portal dependencies from trunk (the portal src beta4 download is missing some build files)
and using the maven plugin from github mvn:liferay goals and archetypes work for me!

It seems http://issues.liferay.com/browse/LPS-19353 is still an issue.
Add his repository to the plugin pom, if it's not present.

 1
 2  <repository>
 3     <id>springsource-external</id>
 4     <name>SpringSource Enterprise Bundle</name>
 5      <url>http://repository.springsource.com/maven/bundles/external</url>
 6      <releases>
 7        <enabled>true</enabled>
 8        </releases>
 9       <snapshots>
10           <enabled>false</enabled>
11        </snapshots>
12  </repository>