留言板

Maven Support in Beta 4 ?

thumbnail
Kim A Kunc,修改在12 年前。

Maven Support in Beta 4 ?

Junior Member 帖子: 37 加入日期: 09-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
thumbnail
Kim A Kunc,修改在12 年前。

RE: Maven Support in Beta 4 ?

Junior Member 帖子: 37 加入日期: 09-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.
thumbnail
Mika Koivisto,修改在12 年前。

RE: Maven Support in Beta 4 ?

Liferay Legend 帖子: 1519 加入日期: 06-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
ant -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
    lp.maven.release.repository.id=sonatype-staging
    lp.maven.release.repository.url=http://oss.sonatype.org/service/local/staging/deploy/maven2
    lp.maven.snapshot.repository.id=sonatype-snapshot
    lp.maven.snapshot.repository.url=http://oss.sonatype.org/content/repositories/snapshots
thumbnail
Kim A Kunc,修改在12 年前。

RE: Maven Support in Beta 4 ?

Junior Member 帖子: 37 加入日期: 09-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
ant -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
    lp.maven.release.repository.id=sonatype-staging
    lp.maven.release.repository.url=http://oss.sonatype.org/service/local/staging/deploy/maven2
    lp.maven.snapshot.repository.id=sonatype-snapshot
    lp.maven.snapshot.repository.url=http://oss.sonatype.org/content/repositories/snapshots
thumbnail
Kim A Kunc,修改在12 年前。

RE: Maven Support in Beta 4 ?

Junior Member 帖子: 37 加入日期: 09-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.


  <repository>
     <id>springsource-external</id>
     <name>SpringSource Enterprise Bundle</name>
      <url>http://repository.springsource.com/maven/bundles/external</url>
      <releases>
        <enabled>true</enabled>
        </releases>
       <snapshots>
           <enabled>false</enabled>
        </snapshots>
  </repository>