Fórumok

Sharing projects in SVN doesn't work, guide is flawed

Paul Solecki, módosítva 11 év-val korábban

Sharing projects in SVN doesn't work, guide is flawed

New Member Bejegyzések: 20 Csatlakozás dátuma: 2012.07.31. Legújabb bejegyzések
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.
thumbnail
David H Nebinger, módosítva 11 év-val korábban

RE: Sharing projects in SVN doesn't work, guide is flawed

Liferay Legend Bejegyzések: 14915 Csatlakozás dátuma: 2006.09.02. Legújabb bejegyzések
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, módosítva 11 év-val korábban

RE: Sharing projects in SVN doesn't work, guide is flawed

New Member Bejegyzések: 20 Csatlakozás dátuma: 2012.07.31. Legújabb bejegyzések
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.
thumbnail
David H Nebinger, módosítva 11 év-val korábban

RE: Sharing projects in SVN doesn't work, guide is flawed

Liferay Legend Bejegyzések: 14915 Csatlakozás dátuma: 2006.09.02. Legújabb bejegyzések
There should be a wiki page which talks about how to add the ECJ stuff for Eclipse...
thumbnail
Hitoshi Ozawa, módosítva 11 év-val korábban

RE: Sharing projects in SVN doesn't work, guide is flawed

Liferay Legend Bejegyzések: 7942 Csatlakozás dátuma: 2010.03.24. Legújabb bejegyzések
It's a little bit old, but wiki page below has some explanation.

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