Forums

Home » Liferay IDE » English

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Paul Solecki
Sharing projects in SVN doesn't work, guide is flawed
October 19, 2012 3:52 AM
Answer

Paul Solecki

Rank: New Member

Posts: 20

Join Date: July 31, 2012

Recent Posts

Hi folks,

We're just starting with Liferay development using the IDE in Eclipse but are running into numerous problems sharing projects in SVN.

There are several issues:

1. If you follow the guide (http://www.liferay.com/community/wiki/-/wiki/Main/Liferay+IDE+Sharing+Projects) and set your workspace to the <SDK>/portlets directory then you can't create themes because they're in <SDK>/themes meaning the build won't run for themes. Also creating new projects won't work because Eclipse is trying to create a folder in the workspace at the same time the Liferay plugin is trying to create the portlet with the same name, resulting in a <path> overlaps the location of another project: '<project>' error.

2. If you have a separate workspace and then share the project, the project is put in the other developer's Eclipse workspace. Liferay does not put it in the relevant directory to work properly, i.e. <SDK>/portlets, <SDK>/themes etc. Meaning none of the IDE functionality can work.

The second way of sharing in your guide seems very convoluted and would end up creating problems when updating the SDK.

Surely there should be some way to resolve this? Can you not create an ANT script or similar that copies the relevant files from the project into the relevant SDK sub-folder?

This is really critical for us as there will always be multiple developers working on a project.

Any solutions would be gratefully received.

Cheers,
Paul.
David H Nebinger
RE: Sharing projects in SVN doesn't work, guide is flawed
October 19, 2012 5:41 AM
Answer

David H Nebinger

Rank: Liferay Legend

Posts: 7252

Join Date: September 1, 2006

Recent Posts

Option 1 is the way to go, but you don't set your default workspace to SDK/portlets.

Use an external folder outside of the SDK as the workspace default. This will also help to keep non-Liferay projects outside of the SDK directory.

When you check out a plugin, the key is to uncheck the 'use workspace default' checkbox on where to put the project. Developer must manually navigate to the SDK/{plugin type} directory manually and check the project out there.

The second option eliminates the manual jumping around. Updates to the SDK for this path are still easy to do. Developer checks out the SDK project, overlays the Liferay SDK files from the update, then the project is refreshed and checked in using IDE. Other developers will just need to sync to get the update.

The problem I have with the second option is you're left with a single project in SVN that has all of your individual plugins in there, including the SDK which, for all intents and purposes, are static files (they only change when you do an update).

And I don't think the guide is flawed. The guide doesn't tell you to set your workspace to SDK/portlets, it's just explaining how to uncheck the box and choose the location for the project manually. For #2, developers must get used to the manual choosing of directory to check out to and, after they do it a few times, will typically remember the process and understand why they have project errors when they didn't.

The biggest issue is the IDE doesn't really know anything about the SDK or projects during checkout, so some sort of ant script really doesn't end up being a solution.
Paul Solecki
RE: Sharing projects in SVN doesn't work, guide is flawed
October 22, 2012 1:14 AM
Answer

Paul Solecki

Rank: New Member

Posts: 20

Join Date: July 31, 2012

Recent Posts

Thanks for the reply David, I think I read it too quickly!

I still came across the ECJ problem in Eclipse and the only way around it was to use 'Run As->Ant Build...' and then add the ecj.jar to the buildpath. Just copying it to the Eclipse ANT directory made no difference.

All checked out and building now.

Cheers again!
Paul.
David H Nebinger
RE: Sharing projects in SVN doesn't work, guide is flawed
October 23, 2012 1:53 PM
Answer

David H Nebinger

Rank: Liferay Legend

Posts: 7252

Join Date: September 1, 2006

Recent Posts

There should be a wiki page which talks about how to add the ECJ stuff for Eclipse...
Hitoshi Ozawa
RE: Sharing projects in SVN doesn't work, guide is flawed
November 12, 2012 3:12 AM
Answer

Hitoshi Ozawa

Rank: Liferay Legend

Posts: 7954

Join Date: March 23, 2010

Recent Posts

It's a little bit old, but wiki page below has some explanation.

http://www.liferay.com/community/wiki/-/wiki/Main/ECJ