Upgrading Liferay 6.2 maven plugins into Liferay 7 module - liferay

There are many sites which provides articles for upgrading liferay 6.2 to dxp but only for ant project. How can we upgrade liferay 6.2 maven project to liferay dxp gradle project ?

The strategy to upgrade your code is exactly the same. Liferay's Plugins SDK defaulted to Ant until 6.2, now you have the choice between liferay-workspace (gradle based), gradle and maven - just choose the build environment you'd like (sounds like you'd like to continue with maven) and add your code to an empty blueprint for the project of your choice.
There's an upgrade tool in Liferay IDE that might help you - even if it doesn't use the build tool of your choice or if eclipse isn't the IDE of your choice: The upgrade tool is a one-off tool to use during upgrade. No matter what the result is on: You can always check (for example) Liferay's blade-sample project to find the proper build descriptors for Maven - and adapt them to your project.
Edit: After the clarification: Your main task is still the upgrade of the code. As of moving from Maven to gradle: Identify the dependencies and translate from pom.xml syntax to gradle's declaration - the contents are similar (e.g. group, name, version), only how you're writing them down is different. If you have made elaborate custom modifications to your pom.xml try to go without them first. You can start with a stock build.gradle (e.g. from blade-samples that most closely match your project) and then fix compile-time dependencies as you go.
I'm not aware of an automated process that does this translation for you (and most likely you'd bump up a few version numbers in the process anyway)

Related

Orchard AutoFac Conflicts

I am currently working on a project in Orchard. We are looking to wrap up an existing .NET MVC Web application within an Orchard Module. Currently, we are having issues with AutoFac.
The original site was built using AutoFac 3.5, however the latest stable version of Orchard is still running on 3.0. The application requires features introduced in 3.3. If I install 3.0 into the module, the features do not work, if I have 3.5 in the module, it produces a conflict.
Can anybody suggest a way of handling this conflict? Or, is it safe to upgrade AutoFac 3.0 in Orchard and if so how should I perform this without breaking it?
Thanks,
If I may suggest, Orchard 1.9 should be released soon™ and it already has dependency on latest stable Autofac 3.5.2. If you don't want to wait you can grab latest repository from GitHub
https://github.com/OrchardCMS/Orchard/tree/1.9-int
It's perfectly stable in my opinion and I find released 1.8.1 to be much more buggy :D.
Copy the web.config file runtime Node from Existing Module (Lucene or Markdown or like) and add the runtime node on conflicts Module Web.Config file. After Compile then clear the Conflict

Using Maven dependencies in JDeveloper 12c

I'd like to know how I can use a dependency provided by Maven in JDeveloper.
For example: I define a dependency in my pom.xml for primefaces UI components.
Why I can't use it in JDeveloper?
In the components window there are no primefaces components!
The WAR project is build properly with jars in WEB-INF/lib.
Adding those kind of dependencies is not IDE depentend. It rather depends on the project type, in this case you should use a Maven Project. It has it's own structure organization. So the first option would be to create such a project (JDev does even have an include option for maven projects).
Nevertheless JDev 12C has it's own support mechanism, but you need to do some little configuration into your project. Here you have a good tutorial explaining it: Introducing Maven Support in JDev 12C

Eclipse Indigo for Java EE + Maven plugin = the Maven menu does not appear in import and preference

I have used Indigo Java (not Java EE) and the maven plugin is already installed. Or at least, I know I have the possibility to import a Maven Project without installing anything.
But then I wanted to use Eclipse Indigo for Java EE developers. This version does not have maven already installed. I can not import a maven project. So I decided to install the m2e plugin.
And I have tried to install it many different ways (information on theses sites):
http://code.google.com/p/google-web-toolkit/wiki/WorkingWithMaven
http://googlewebtoolkit.blogspot.com/2011/09/working-with-maven-and-requestfactory.html
http://code.google.com/p/listwidget
I also tried to use the Eclispe market place for the installation of the plugins. The installation process does not fail. But the Maven menu in import and Windows->Preference does not appear inside Indigo Java EE?
NB: I am running Windows 7, 64 bit edition
Here's what I did in Indigo.
Go to Help>>Install New Software
Paste the below URL over there
http://download.eclipse.org/releases/indigo/
You will see a list below. From the list expand "Collaboration" and you can see m2e - maven integration for eclipse.
select that and click next. Got one error in between but it's working now.
This software repository, http://download.eclipse.org/releases/indigo/, provides access to the software for the Eclipse indigo release. It contains code from the release, June 2011, and SR1, September 2011 and SR2, February 2012.
The repository site URL is typically pre-populated in the list of software repositories when you install the Eclipse Platform or SDK.
For more information about installing or updating software, see the Eclipse Platform Help.
There is also a collection of handy, downloadable all-in-one zip files available for many interests and platforms. Many people find these all-in-one packages the easiest way to get started.
I,m using Eclipse INDIGO.
try this link. It works for me.
http://download.eclipse.org/technology/m2e/releases
ECLIPSE INDIGO
Go to Help>>Install New Software
Paste the below URL over there http://download.eclipse.org/releases/indigo/
You will see a list below. From the list expand "Collaboration" and you can see m2e - maven integration for eclipse.
select that and click next. Got one error in between but it's working now.
http://download.eclipse.org/releases/indigo/ worked foe me.
You will see a list below. From the list expand "Collaboration" and you can see m2e - maven integration for eclipse.
eclipse Indigo : Build id: 20110615-0604

Maven workspace resolution missing jars for local Tomcat testing

I have a mavenized project with dependencies upon 4 others mavenized projects that my team is currently working on. We have "workspace resolution" enabled.
If I publish to Tomcat, jars are not available for the 4 projects so I see all sorts of NoClassDefFoundError exceptions.
I don't see any problems with JUnit testing or packaging. (I run the package goal and the resulting war file includes the SNAPSHOT jars that I expect.)
I see a lot of people advocating for using workspace resolution, but if we need to test in Tomcat should we disable this? Or what else might I be missing?
We use Eclipse Helios, the m2eclipse plugin, Maven 3.0.3. I even installed m2extras to see if that helped, but I didn't see any difference.
Thanks
You can get this setup to work (we have been working with the same toolchain and setup here) if you can live with some manual refreshes, after you have been using m2eclipse goals to build.
The problem is, that not all external changes via m2eclipse builds to workspace projects are synched correctly to your deployed web application in tomcat.
So if you are experiencing NoClassDefFoundError exceptions after building via m2eclipse the following should help (not all are necessary everytime):
Do a Project/Clean on your maven projects
Do a Refresh (F5) on your maven projects
Clean the deployed web application (Server Context menu)
Yes, it is cumbersome but one can live with it.
Remove the dependency project from the workspace.
Delete .settings directory and .project files.
Import the project again.
Update maven dependencies in all projects.

How to use groovy inside a Eclipse RCP project?

I have a Eclipse RCP project, and I want to use Groovy inside it. what I try to do is :
1) add "Groovy Nature"
2) create Groovy files under the "src" folder
3) call the groovy class from the "View"'s createPartControl() method.
But I got the “java.lang.ClassNotFoundException: fly.island.jface.Test”, and the "fly.island.jface.Test" is a groovy class.
What should I do to use groovy inside the Eclipse RCP project?
Use the latest version of Groovy-Eclipse 2.1.0 (or one of the dev builds). Update site is here:
http://dist.codehaus.org/groovy/distributions/greclipse/snapshot/e3.6/
Additionally, there are some steps you need to do to compile the groovy plugins when you the PDE build. I'd recommend reading:
http://contraptionsforprogramming.blogspot.com/2010/08/groovy-pde-redux.html
Essentially, you need to include the org.codehaus.groovy bundle in your rcp app, and then you need to make some changes to the build.properties file of your Groovy plugins (explained in detail on the blog post).
Are you using the latest Version of eclipse (3.6) and the groovy plugin? I recall occasionally having problems with the Java and Groovy compilers not finding each other's classes (in the first version of the plugin, it took a lot of fiddling and luck to get it to work at all). The most recent version seems to be pretty good in that regard, though I've been using it only for a few days myself.

Resources