掲示板

Maven artifacts for Liferay CE 7.0.3 GA4

thumbnail
6年前 に Tobias Liefke によって更新されました。

Maven artifacts for Liferay CE 7.0.3 GA4

Junior Member 投稿: 78 参加年月日: 12/11/23 最新の投稿
I'm just building a project against Liferay CE 7.0.3 GA4 and I can't find the matching artifacts, neither in https://repository.liferay.com/nexus nor in maven central.

For now I'm going with the previous versions, but I'm worried that they might differ and that this may lead eventually to problems.

Missing artifacts from liferay-ce-portal-tomcat-7.0-ga4-20170613175008905.zip:
  • com.liferay.registry.api:1.2.0 (1.1.0 is the latest available)
  • com.liferay.portal.kernel:2.32.1 (but 2.32.0 and 2.33.0 are available)
  • com.liferay.util.bridges: 2.0.3 (2.0.2 is the latest available)
  • com.liferay.util.java: 2.3.0 (2.2.2 is the latest available)
  • com.liferay.util.slf4j:1.0.2 (1.0.1 is the latest available)
  • com.liferay.util.taglib:2.9.0 (2.8.0 is the latest available)

Does anybody know if the release of these maven artifacts is discontinued or if it just was overlooked?
thumbnail
6年前 に Andy Wu によって更新されました。

RE: Maven artifacts for Liferay CE 7.0.3 GA4

Regular Member 投稿: 195 参加年月日: 15/05/05 最新の投稿
Hi Tobias,
What is your previous version of Liferay bundle ? How do you determine artifacts version adapt to it ?
If you can provide more info , that would be helpful.
thumbnail
6年前 に Tobias Liefke によって更新されました。

RE: Maven artifacts for Liferay CE 7.0.3 GA4

Junior Member 投稿: 78 参加年月日: 12/11/23 最新の投稿
Hi Andy,

what do you mean with "previous version"? I just started a new bundle.

I determined the versions by checking the MANIFEST.MF of the artifact, e.g. for util-bridges.jar in
liferay-ce-portal-tomcat-7.0-ga4-20170613175008905.zip/liferay-ce-portal-7.0-ga4/tomcat-8.0.32/webapps/ROOT/WEB-INF/lib/util-bridges.jar/META-INF/MANIFEST.MF:
Bundle-Version: 2.0.3
thumbnail
6年前 に Andy Wu によって更新されました。

RE: Maven artifacts for Liferay CE 7.0.3 GA4

Regular Member 投稿: 195 参加年月日: 15/05/05 最新の投稿
Oh , sorry , I just mistook your mean , I thought you are using a earlier version of liferay 7 (e.g. ga3).

I think it is ok if you just use the most close version with embedded artifact version , as you know the embedded artifact verison is sometime not in maven central repo. And also if would be ok if your version is lower than latest version. We are working on some issue for help developers to be clear about the dependencies.

And by the way , the artifacts you depend on is for compile time , not run time (unless you include the classes in to your jar), so if compile is ok and when run your jar in OSGi container , it actuallly calls the liferay bundle classes. So don't warry too much about this.
thumbnail
6年前 に Tobias Liefke によって更新されました。

RE: Maven artifacts for Liferay CE 7.0.3 GA4

Junior Member 投稿: 78 参加年月日: 12/11/23 最新の投稿
I hope that "help developers to be clear about the dependencies" means that you are creating release specific "BOM" that I can include in my dependencyManagement section?

It is correct that I only compile against the libraries with the wrong version. And as long as the method signatures do not change, it will run without problems. But I will have problems during debugging, as the line numbers may change between versions. And as I often not only report bugs but create workarounds or patches as well, it helps to have the exact source code available in the dependency, line by line.
thumbnail
6年前 に Andy Wu によって更新されました。

RE: Maven artifacts for Liferay CE 7.0.3 GA4

Regular Member 投稿: 195 参加年月日: 15/05/05 最新の投稿
Yeah , something like that, but I still don't exactly know how to use the BOM , also we are improving our targetplatform in Liferay IDE.

Also for debugging requirement , we also do some work on Liferay IDE to let developers match the correct source.
thumbnail
6年前 に Tobias Liefke によって更新されました。

RE: Maven artifacts for Liferay CE 7.0.3 GA4

Junior Member 投稿: 78 参加年月日: 12/11/23 最新の投稿
An example of a release BOM can be found in WildFly, which provides some for every release.
For example: org.wildfly.bom:wildfly-javaee7:10.1.0.Final

You can include that one in a pom.xml with:

	<dependencymanagement>
		<dependencies>
			<dependency>
				<groupid>org.wildfly.bom</groupid>
				<artifactid>wildfly-javaee7</artifactid>
				<version>10.1.0.Final</version>
				<type>pom</type>
				<scope>import</scope>
			</dependency>
		</dependencies>
	</dependencymanagement>


If I now want to compile against one of the provided server libraries, I don't need to know the exact version:

	<dependencies>
		<dependency>
			<groupid>org.jboss.resteasy</groupid>
			<artifactid>resteasy-jaxrs</artifactid>
			<scope>provided</scope>
		</dependency>
		...
	 <dependencies></dependencies></dependencies>


That makes it easy to build your project-pom and to migrate to new WildFly-versions.