Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Kim Anna Kunc
Maven Support in Beta 4 ?
November 15, 2011 5:22 AM
Answer

Kim Anna Kunc

Rank: Junior Member

Posts: 30

Join Date: February 18, 2009

Recent Posts

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 ?
November 15, 2011 7:11 AM
Answer

Kim Anna Kunc

Rank: Junior Member

Posts: 30

Join Date: February 18, 2009

Recent Posts

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 ?
November 15, 2011 10:47 AM
Answer

Mika Koivisto

LIFERAY STAFF

Rank: Liferay Legend

Posts: 1501

Join Date: August 7, 2006

Recent Posts

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 ?
November 29, 2011 5:19 AM
Answer

Kim Anna Kunc

Rank: Junior Member

Posts: 30

Join Date: February 18, 2009

Recent Posts

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 ?
November 30, 2011 1:33 AM
Answer

Kim Anna Kunc

Rank: Junior Member

Posts: 30

Join Date: February 18, 2009

Recent Posts

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>