Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [lyo-dev] UPDATE: Storing eclipse IDE specific files in eclipse/Lyo repositories

Hi Jim,

I think it is a sensible idea to keep .project file alone, but only as long as it works well for those who use Eclipse. For all Lyo projects except code generation and modelling tools, I use IntelliJ and never had issues with its project import from maven. I do this once per repository cloning.

There are 2 places where keeping as many settings from Eclipse as possible may be useful (at least I would test them twice before removing extra files):

1) In the Eclipse p2 update site project that seems to have regular build issues if we don’t retain the project state.
2) Projects with launch configurations that we distribute with some maven projects (most of them in lyo.docs, usually under src/test/resources/launches, but I am not sure if Eclipse points to them somehow in the project settings).

As you are raising this question, I will take a moment to suggest a set of common code formatting rules. I wrote some internal guidelines at KTH, we may use them as a starting point. Find them and my Eclipse style settings file attached.

– Andrew

On 14. Feb. 2017, 20:16 +0100, Jim Amsden <jamsden@xxxxxxxxxx>, wrote:
UPDATE: On second thought, maybe there's a compromise. We can store the eclipse .project files in the Git repository, but ignore .classpath and .settings/ since these may not be in sync with Maven pom.xml files and can be easily set using m2e Maven > Update Project if desired.

So my modified proposal is to only ignore eclipse .classpath and .settings/ resources, but not .project.

--- previous post ---


The question came up about a consistent policy with respect to ignoring or including eclipse IDE specific files in eclipse/Lyo repositories. The files are .project, .classpath and .settings.

The .project file contains the eclipse project definition and is useful for loading eclipse project directly from the eclipse.org Git repositories using Egit. The .classpath file contains the classpath entries used by the eclipse builder. The .settings folder contains additional eclipse resource, jdk and m2e preferences.

Although OSLC4J is built using Maven (and m2e in eclipse), it is also convenient to have your eclipse environment in sync with the maven pom.xml file so that you can leave eclipse automatic project build on and see compilation errors and other problems directly in the problems view without having to execut an m2e command. You can make sure your eclipse environment is in sync with Maven pom.xml by using m2e Maven > Update Project. This updates the eclipse project setting to correspond to the directives in the pom.xml file.

If a user of OSLC4J is not developing using eclipse, then these files are of no use and could be seen as cluttering their working directories.

However, eclipse/Lyo is an eclipse.org Technolgoy project, eclipse is often used in OSLC development, and the various folders in the eclipse/Lyo Git repositories were and are eclipse projects. Since these eclipse environment files are small, and typically hidden from view, I think the benefit of saving these files in the Git repositories to simplify OSLC development using eclipse outweighs the costs.

So unless anyone disagrees, we should not include .project, .classpath and/or .settings/ in the .gitignore files so that these files are available for reuse in eclipse.

Note that there may be no guarantee that these eclipse property files are in sync with any particular nightly or other build of eclipse/Lyo or OSLC4J. Eclipse developers are advised to ensure their environments and the pom.xml files for any eclipse/Lyo project are in sync if they wish to leverage eclipse build.






Jim Amsden, Senior Technical Staff Member
OSLC and Linked Lifecycle Data
919-525-6575

Attachment: codestyle.pdf
Description: codestyle.pdf

Attachment: formatter.xml
Description: formatter.xml


Back to the top