[ome-devel] Eclipse metadata in bio-formats.git

Curtis Rueden ctrueden at wisc.edu
Thu Aug 11 19:09:32 BST 2011


Hi Ghislain,

When using Eclipse EGit and importing the project in eclipse, I am not quite
> sure that M2E plugin is actually used to load the project.
>

If you use the "Import Existing Maven Projects" or "Check out Maven Projects
from SCM" import source, it will use M2E by default.

However, once the project is imported in Eclipse using EGit plugin, I was
> able to run the “Maven >Enable Dependency Management” after a right click on
> the folder which seem to run properly.
>

I have not tried doing things that way, but it makes sense.


Everything seem to have been configured correctly, except for the fact that
> the projects are not flagged as team projects and also I did not seem to see
> that: “it automatically switches between Project and Library (JAR) build
> path entries when dependent projects are opened and closed”, although
> perhaps something is perhaps not configured perfectly on my end.
>

Perhaps if you import the projects as Maven in the first place, it will
work. You will know M2E is managing your dependencies if you have a "Maven
dependencies" node in the project tree in the Package Explorer.

Also, with the current state of affairs, you have to be very careful to
avoid the .classpath and .project files (which were generated by M2E) being
overwritten by the copies from the Git repository. If Git is allowed to
touch them, Eclipse and M2E will subsequently get very confused. This is why
I proposed removing them from the repository in my initial email.

Regards,
Curtis

On Wed, Aug 10, 2011 at 1:26 PM, Ghislain Bonamy <GBonamy at gnf.org> wrote:

> Hi Curtis,****
>
> ** **
>
> This email was sent a little while ago and I am only getting around
> responding.****
>
> ** **
>
> When using Eclipse EGit and importing the project in eclipse, I am not
> quite sure that M2E plugin is actually used to load the project. However,
> once the project is imported in Eclipse using EGit plugin, I was able to run
> the “Maven >Enable Dependency Management” after a right click on the folder
> which seem to run properly.****
>
> ** **
>
> Everything seem to have been configured correctly, except for the fact that
> the projects are not flagged as team projects and also I did not seem to see
> that: “it automatically switches between Project and Library (JAR) build
> path entries when dependent projects are opened and closed”, although
> perhaps something is perhaps not configured perfectly on my end.****
>
> ** **
>
> Best,****
>
> ** **
>
> Ghislain Bonamy, PhD****
>
> __________________________________________****
>
> Research Investigator****
>
> ** **
>
> *G*enomic Institute of the****
>
> *N*ovartis Research****
>
> *F*oundation****
>
> Department of Informatics, room C117****
>
> 10675 John Jay Hopkins Drive****
>
> San Diego CA 92121****
>
> USA****
>
> ** **
>
> +1 (858) 812-1534 (Work & Fax)****
>
> +1 (757) 941-4194 (Home)****
>
> +1 (858) 354-7388 (Cell)****
>
> www.gnf.org****
>
> ** **
>
> *From:* ome-devel-bounces at lists.openmicroscopy.org.uk [mailto:
> ome-devel-bounces at lists.openmicroscopy.org.uk] *On Behalf Of *Curtis
> Rueden
> *Sent:* Tuesday, May 31, 2011 11:55 PM
> *To:* OME-devel mailing list
> *Subject:* [ome-devel] Eclipse metadata in bio-formats.git****
>
> ** **
>
> Hi everyone,
>
> This is a question for those who use Eclipse to develop Bio-Formats code.
>
> Recently, I added pom.xml files to the Bio-Formats source tree, so that
> Maven can function as a parallel build system. This has the nice side effect
> that it is very easy to import those projects into Eclipse, using the
> m2eclipse plugin. This plugin takes care of generating Eclipse metadata
> files (.classpath, .project, and .settings/*) to match the POM's metadata,
> and keeps it up to date as project dependencies change. In particular, it
> automatically switches between Project and Library (JAR) build path entries
> when dependent projects are opened and closed, which is a very nice feature.
>
> Unfortunately, bio-formats.git already has Eclipse metadata committed to
> the repository. When using m2eclipse with Bio-Formats, these metadata files
> are overwritten, and Git sees a slew of changes in the working copy. While
> it is possible locally to instruct Git to ignore such changes (see
> http://www.pagebakers.nl/2009/01/29/git-ignoring-changes-in-tracked-files/),
> my preference would be to remove the Eclipse metadata files from Git
> altogether, and suggest that people use the m2eclipse plugin to develop
> Bio-Formats from within Eclipse. This solution has the added benefit that we
> no longer need to keep our dependencies in sync between the Ant
> build.properties files, the Maven pom.xml files, and the Eclipse .classpath
> files, but rather only between Ant and Maven.
>
> What do you think?
>
> Thanks,
> Curtis****
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openmicroscopy.org.uk/pipermail/ome-devel/attachments/20110811/72440093/attachment.html>


More information about the ome-devel mailing list