Discussion:
[castor-dev] Mvn build and Eclipse
Werner Guttmann
2010-05-01 14:20:27 UTC
Permalink
Hi everybody,

I'd really like to see .classpath and .project being removed from our
SVN repository. I know there's some resistance, so let's use this thread
to get an complete overview on any objections.

Cheers
Werner

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email
Andras Hatvani
2010-05-03 06:23:23 UTC
Permalink
Hello,

Although I'm not an official committer, but within the scope of a
university course I'm involved in the development and am affected, too
I'd like to share my thoughts.
I completely agree that IDE-specific files shouldn't be part of any
project's source tree, but I also don't like, if one project's modules
fill half of my workspace. Whether one decides for the single- or for
the multi-project method, both require trade-offs:
- clean and compact workspace vs manual classpath maintenance and
- automated classpath maintenance vs "polluted" workspace.
These two factors are which I can think of at first, but I'd be glad to
see a more complete list of benefits and drawbacks.
Btw, did anyone already contact the maven mailing list for further
information?

Andras
Post by Werner Guttmann
Hi everybody,
I'd really like to see .classpath and .project being removed from
our SVN repository. I know there's some resistance, so let's use
this thread to get an complete overview on any objections.
Cheers
Werner
---------------------------------------------------------------------
http://xircles.codehaus.org/manage_email
Werner Guttmann
2010-05-04 07:13:00 UTC
Permalink
Hi Andras,
Post by Andras Hatvani
Hello,
Although I'm not an official committer, but within the scope of a
university course I'm involved in the development and am affected, too
I'd like to share my thoughts.
I completely agree that IDE-specific files shouldn't be part of any
project's source tree, but I also don't like, if one project's modules
fill half of my workspace.
Same here, but I learned to accept that I might have more than one
workspace. And indeed, I do have in average three to four workspaces,
depending on the number of projects I am working on in parallel.
Post by Andras Hatvani
Whether one decides for the single- or for
- clean and compact workspace vs manual classpath maintenance and
- automated classpath maintenance vs "polluted" workspace.
These two factors are which I can think of at first, but I'd be glad to
see a more complete list of benefits and drawbacks.
Btw, did anyone already contact the maven mailing list for further
information?
Andras
Post by Werner Guttmann
Hi everybody,
I'd really like to see .classpath and .project being removed from our
SVN repository. I know there's some resistance, so let's use this
thread to get an complete overview on any objections.
Cheers
Werner
---------------------------------------------------------------------
http://xircles.codehaus.org/manage_email
---------------------------------------------------------------------
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email
Udai Gupta
2010-05-04 21:00:48 UTC
Permalink
Hi folks,

I have few thoughts and questions around this discussion.

How .classpath/.project eclipse files at parent level is a "pain" or
"pollutant"?
I think these files won't even checkout if you just download a specific module.

How does those files are blocking separating out modules OR making
them independent?
I don't think eclipse is being used for this task because without
these files it will be a mess in eclipse, for other editors those
files should not matter.

I think it's very convenient for new folks to have these settings.
These settings give a quick start as most of the people will start
from downloading the whole trunk (unless specified in checkout
instructions).

I can imagine how "not having" these files could be a pain for new folks.
A newbie(with Castor) will go and read the instructions for "svn co"
and after getting that code in eclipse it will be a mess for him/her
as he/she is not familiar with castor's directory structure (or at all
with open source development).

One can imagine the pain to handle questions about setup which will be
thrown by newbies.

If these files is seriously blocking some process then I would say
"YES" go ahead and delete those.

There are many project having project specific eclipse settings to
overcome the bugs of maven-eclipse-plugin or just because it's more
convenient (fast to checkout, less overhead of svn ignore and
generating).

Regards,
Udai

PS: It's more convenient for me to keep those setting (I never use)
which helps someone in my team instead of teaching the other way
around that I use.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email
Dennis Butterstein
2010-05-05 11:41:24 UTC
Permalink
Hi folks,

I'd like to share my thoughts as well.
Post by Andras Hatvani
Hello,
Although I'm not an official committer, but within the scope of a
university course I'm involved in the development and am
affected, too
Post by Andras Hatvani
I'd like to share my thoughts.
I completely agree that IDE-specific files shouldn't be part of any
project's source tree, but I also don't like, if one
project's modules
Post by Andras Hatvani
fill half of my workspace.
Same here, but I learned to accept that I might have more than one
workspace. And indeed, I do have in average three to four workspaces,
depending on the number of projects I am working on in parallel.

I think this problem can be circumnavigated as well by defining
working sets if you don't want multiple workspaces.
Post by Andras Hatvani
How .classpath/.project eclipse files at parent level is a "pain" or
"pollutant"?
I think these files won't even checkout if you just download a specific module.
Additionally I think they won't show up in the workspace even if they
are checked out.
Post by Andras Hatvani
I think it's very convenient for new folks to have these settings.
These settings give a quick start as most of the people will start
from downloading the whole trunk (unless specified in checkout
instructions).
I can imagine how "not having" these files could be a pain for new folks.
A newbie(with Castor) will go and read the instructions for "svn co"
and after getting that code in eclipse it will be a mess for him/her
as he/she is not familiar with castor's directory structure (or at all
with open source development).
As I'm new to castor I completely agree. Without having .classpath &
.project files it would have been harder
to set up a castor workspace. It was not even obvious to me how to do it
now. I've never used maven before so for me setting up my workspace was done
by having checked out svn trunk.

I think I'm not the only one facing this problems, as I've not found a
description about setting up the complete workspace yet. So by deleting
.classpath and .project files I think the hurdle to take before being able
to contribute to castor will get harder. So some attracted people willing to
look at castors' source possibly will be discouraged and in my opinion
that's a bad precondition for opensource projects living on people's
voluntary work.

For developers that have been contributing for a while to castor and which
are using a one project set up, removing the files would result in
superfluous work like having to adapt the files everytime changes to the
build path or similar are done. So every single one of them would have to
adapt the files. So personally I think the time consumed by adapting
.classpath & .project files can be used in a more sensible way.

I agree that these files should not be part of the source tree, but as long
as removing them does more harm than good (correct me if I'm wrong), keeping
the files is a low price to pay I think.

As a conclusion in my opinion the files should be kept to make it easy for
interested developers to get involved as well as enable everybody to work as
he is used to without imposing superfluous work on anybody.

Regards,

Dennis
Werner Guttmann
2010-05-05 15:44:16 UTC
Permalink
Post by Udai Gupta
Hi folks,
I'd like to share my thoughts as well.
Post by Andras Hatvani
Hello,
Although I'm not an official committer, but within the scope of a
university course I'm involved in the development and am
affected, too
Post by Andras Hatvani
I'd like to share my thoughts.
I completely agree that IDE-specific files shouldn't be part of any
project's source tree, but I also don't like, if one
project's modules
Post by Andras Hatvani
fill half of my workspace.
Same here, but I learned to accept that I might have more than one
workspace. And indeed, I do have in average three to four workspaces,
depending on the number of projects I am working on in parallel.
I think this problem can be circumnavigated as well by defining
working sets if you don't want multiple workspaces.
Post by Andras Hatvani
How .classpath/.project eclipse files at parent level is a "pain" or
"pollutant"?
I think these files won't even checkout if you just download a specific module.
You should never check out just one module. In other words, you always
need to checkout SVN trunk at the project root.
Post by Udai Gupta
Additionally I think they won't show up in the workspace even if they
are checked out.
Yes, they will, but in your package explorer, resources with a starting
dot are not visible by default.
Post by Udai Gupta
Post by Andras Hatvani
I think it's very convenient for new folks to have these settings.
Yes, agreed. But I am not asking for them to be removed completely.
Post by Udai Gupta
Post by Andras Hatvani
These settings give a quick start as most of the people will start
from downloading the whole trunk (unless specified in checkout
instructions).
I can imagine how "not having" these files could be a pain for new folks.
A newbie(with Castor) will go and read the instructions for "svn co"
and after getting that code in eclipse it will be a mess for him/her
as he/she is not familiar with castor's directory structure (or at all
with open source development).
I do not see the problem here, to be honest. Right now, when you want to
dig into Castor's sources, you have to
Post by Udai Gupta
svn co
cd <root dir>
mvn clean compile
to have the various classes generated from the XML schemas before you
can run a single test case in Eclipse. In that sense, you have to run
Maven once before you can do anything meaningful with Castor within
Eclipse, anyhow.

Having said that, I cannnot see what#s so bad about asking users to execute
Post by Udai Gupta
mvn eclipse:eclipse
once as well.

The startup sequence (and yes, I agree that docs should be improved)
would change to ...
Post by Udai Gupta
mkdir <somedir>
cd somedir
scn co https://... .
mvn clean compile
mvn eclipse:eclipse
Then, start Eclipse, create a new workspace optionally, and import
existing projects into your workspace, set <root dir> as source .. et
voila, Castor completely imported into your workspace.

That's one more step (tiny), and does not remove any inconvenience.
Post by Udai Gupta
As I'm new to castor I completely agree. Without having .classpath&
.project files it would have been harder
to set up a castor workspace. It was not even obvious to me how to do it
now. I've never used maven before so for me setting up my workspace was done
by having checked out svn trunk.
As I have already said, we ar enot removing this convenient feature. We
just would like to have those files generated.

How about if everybody tried this once, and then provide feedback. Just
delete .classpath, .project and .settings directory before you rnu the
Maven commands.
Post by Udai Gupta
I think I'm not the only one facing this problems, as I've not found a
description about setting up the complete workspace yet. So by deleting
.classpath and .project files I think the hurdle to take before being able
to contribute to castor will get harder. So some attracted people willing to
look at castors' source possibly will be discouraged and in my opinion
that's a bad precondition for opensource projects living on people's
voluntary work.
For developers that have been contributing for a while to castor and which
are using a one project set up, removing the files would result in
superfluous work like having to adapt the files everytime changes to the
build path or similar are done. So every single one of them would have to
adapt the files. So personally I think the time consumed by adapting
.classpath& .project files can be used in a more sensible way.
Gosh, Andras and I spent - each - quote some time to sort this out
manually. And we need to do this every time we upgrade a dependency,
e.g.. move from JUnit 4.4 to 4.8.1 or something similar. Every time we
do this, we risk that soe transitive dependencies change. Why should
anybody have to manually do what Maven gives to you for free ?

I mean, when you want to upgrade a dependency (e.g. increase Spring from
3.0.1 to 3.0.2), simply change the dependency in the POM(s), run
Post by Udai Gupta
mvn eclipse:eclipse
agina, and in an open Eclipse, refresh all the projects. Done. All the
'Referenced JARs' in the Castor modules will be changed within a few
seconds, a workspace build started ... et voila.
Post by Udai Gupta
I agree that these files should not be part of the source tree, but as long
as removing them does more harm than good (correct me if I'm wrong), keeping
the files is a low price to pay I think.
I do not think the price is low to pay. It is the same (heavy) price we
used to pay before we removed any generated classes from the SVN repo.
Before, we had to manually copy genrated files into the SVN repo after
making changes to one of the source XML schemas (e.g. mapping.xsd).
Nowadays it's simply change the XML schema, run
Post by Udai Gupta
mvn clean compile
and refresh your workspace. I am sure you and everybody else enjoyed the
simplicity of this. I would just like to have the same convenience for
Castor when I work on it.
Post by Udai Gupta
As a conclusion in my opinion the files should be kept to make it easy for
interested developers to get involved as well as enable everybody to work as
he is used to without imposing superfluous work on anybody.
Can I kindly ask you to have a look into my above recipe, and provide me
with fedback ?

Werner
Post by Udai Gupta
Regards,
Dennis
---------------------------------------------------------------------
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email
Udai Gupta
2010-05-05 17:44:40 UTC
Permalink
Okay, now I have few suggestions :)

There are two ways people can(or does) import castor project in their
eclipse workspace.

Case 1) Project per module :-
- Checkout from console "svn co http://.."
- Generate settings using eclipse:eclipse
- import project to eclipse (auto-find detects project based on
eclipse settings)

Case 2) Project for whole trunk.
- Checkout using Subclipse (or some other hacky way) and have one
project for whole code base.

"mvn eclipse:eclipse" DOES NOT generate eclipse settings at parent
level so "Case 2" folks will be unhappy and they will lost if those
setting are not there. The parent level setting include classpathentry
elements for src folders.

Now, I agree with the problem of manually maintained classpath for any
change of dependencies in maven configuration. But, "mvn
eclipse:eclipse" does not solve problem for "Case 2" people.

So, I think we can keep the parent level eclipse settings file and
modify them to use m2eclipse plugin so that you don't have to maintain
those class paths manually.

How to add settings for m2eclipse.
- Download and install m2eclipse.
- enable m2eclipse nature.
- remove the settings specifying complete *.jar location in classpath
for maven dependencies and just add these which will take care of
maven class path dependencies.

<classpathentry kind="con"
path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER" />
<classpathentry kind="var" path="M2_REPO"/>

I have seen this at another project Mifos(http://mifos.org), everyone
is fine with using m2eclipse plugin there.

Udai

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email
Werner Guttmann
2010-05-11 06:57:06 UTC
Permalink
Hi Udai,
Post by Udai Gupta
Okay, now I have few suggestions :)
There are two ways people can(or does) import castor project in their
eclipse workspace.
Case 1) Project per module :-
- Checkout from console "svn co http://.."
- Generate settings using eclipse:eclipse
- import project to eclipse (auto-find detects project based on
eclipse settings)
Case 2) Project for whole trunk.
- Checkout using Subclipse (or some other hacky way) and have one
project for whole code base.
"mvn eclipse:eclipse" DOES NOT generate eclipse settings at parent
level so "Case 2" folks will be unhappy and they will lost if those
setting are not there. The parent level setting include classpathentry
elements for src folders.
Udai, can I assume that you have tried option 1) ? I am not sure you
have, because if you do so, you'll see that you'll the very SAME source
folders within the modules that we currently have at the root level.
Personally, I'd say this is minor (unimportant) difference. So why do
you think that folks will be unhappy ? What would make them unhappy ?
There's source folders, there's external JARs available, you can run
unit tests out of the box, etc. So please do explain to us why you think
folks would be unhappy.
Post by Udai Gupta
Now, I agree with the problem of manually maintained classpath for any
change of dependencies in maven configuration. But, "mvn
eclipse:eclipse" does not solve problem for "Case 2" people.
Sorry, it does. What makes you think it does not ?
Post by Udai Gupta
So, I think we can keep the parent level eclipse settings file and
modify them to use m2eclipse plugin so that you don't have to maintain
those class paths manually.
Sorry, but how does m2eclipse come to the equation ? This is an Eclipse
plugin that I am not using (and I do not want to use it as it has
various problems with regards to classpath issues). So please do explain
why you want to keep .classpath and .project at the project root level ?
Post by Udai Gupta
How to add settings for m2eclipse.
- Download and install m2eclipse.
- enable m2eclipse nature.
- remove the settings specifying complete *.jar location in classpath
for maven dependencies and just add these which will take care of
maven class path dependencies.
<classpathentry kind="con"
path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER" />
<classpathentry kind="var" path="M2_REPO"/>
I have seen this at another project Mifos(http://mifos.org), everyone
is fine with using m2eclipse plugin there.
Sorry, your mileage may vary. I have seen quite some projects where
m2eclipse causes (unresolvable issues especially in the context of
containers). So please let's keep the discussion to one where we focus
on what's available with Maven purely.

Cheers
Werner
Post by Udai Gupta
Udai
---------------------------------------------------------------------
http://xircles.codehaus.org/manage_email
---------------------------------------------------------------------
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email
Udai Gupta
2010-05-11 10:16:15 UTC
Permalink
Hi Werner,

I am fine with removing those configuration file.

I did not found "mvn eclipse:eclipse" generating configuration files
at parent level, but as you said it is possible then I need to look
more.

Thanks,
Udai

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

Robert Thurnher
2010-05-06 08:46:58 UTC
Permalink
Hi,
Post by Werner Guttmann
Hi everybody,
I'd really like to see .classpath and .project being removed from our SVN
repository. I know there's some resistance, so let's use this thread to get
an complete overview on any objections.
Like Andras I'm currently only working on Castor within the scope of a
university course, yet, I'd like to share my 2 cents here as well:

In our case, the present state of included Eclipse project files in
Castor's Subversion repo turned out to be actually rather cumbersome
than really useful when first checking out the project.

That is, members of our group using Eclipse were struggling a bit in
the beginning getting a project setup working mainly due to
before-mentioned included .classpath etc. files.
Just when they removed and subsequently generated them via `mvn
eclipse:eclipse` these issues were resolved.

Moreover, members of our group using other IDEs (namely, IntelliJ IDEA
and NetBeans; i.e., equipped with built-in Maven support), naturally,
weren't confronted with such issues at all.

Consequently and generally, I'm all +1 for not bundling any
IDE-specific project files within its source code repo (especially,
when the overhead of having to manage them manually can be avoided).

-- Robert

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email
Philipp Erlacher
2010-05-06 17:58:31 UTC
Permalink
Hello,

My first thought was that in order to use several Castor checkouts
parallel in Eclipse it was already necessary to use an additional
command[1].
When m2eclipse will work I am +1 for stopping manual editing and using
m2eclipse instead.
+ This would save a lot of time for Werner and Andras.
+ Although when upgrading a dependency no more manual editing is
needed and Eclipse related files could remain in the project.
How about if everybody tried this once, and then provide feedback. Just delete .classpath, .project and .settings directory before you rnu the Maven commands.
* svn co http://svn.codehaus.org/castor/castor/trunk
* I removed .classpath, .project and .settings
* mvn clean compile
* mvn eclipse:eclipse

Instead of having one project trunk I do have a project per module.
That's not what we want, is it?


I tried the way Udai mentioned above. It didn't work out for me. Maybe
you could help me on this.
Here is what I did:

* svn co http://svn.codehaus.org/castor/castor/trunk.
* I installed m2eclipse [2].
* Like Udai explained I edited .classpath
* To enable m2eclipse nature I added following buildCommand and nature
to .project

<buildCommand>
<name>org.maven.ide.eclipse.maven2Builder</name><arguments></arguments>
</buildCommand>
<nature>org.maven.ide.eclipse.maven2Nature</nature>

* mvn clean compile
* mvn eclipse:eclipse
* In Eclipse I did 'Import existing Project into Workspace'
I get one big project and 11569 cannot be resolved to type-errors.

I already tried 'mvn install' [3] and 'Import existing Maven Project'
instead of the simple import I did before.
As far as I see there is no difference between this two ways of importing.
In both of there is a Classpath Container in the project. It is called
'Maven Dependencies'.
The properties of Maven Dependencies says to use Maven Project
Settings to configure some Maven Dependency Resolution.

How do I get rid of these errors? What did I miss to do in order to
get this working?

Cheers,
Philipp

[1] http://castor.org/contributing.html#Several-Castor-checkouts-parallel-in-Eclipse
[2] http://m2eclipse.sonatype.org/installing-m2eclipse.html
[3] http://old.nabble.com/org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER-to9470746.html
Hi,
Post by Werner Guttmann
Hi everybody,
I'd really like to see .classpath and .project being removed from our SVN
repository. I know there's some resistance, so let's use this thread to get
an complete overview on any objections.
Like Andras I'm currently only working on Castor within the scope of a
In our case, the present state of included Eclipse project files in
Castor's Subversion repo turned out to be actually rather cumbersome
than really useful when first checking out the project.
That is, members of our group using Eclipse were struggling a bit in
the beginning getting a project setup working mainly due to
before-mentioned included .classpath etc. files.
Just when they removed and subsequently generated them via `mvn
eclipse:eclipse` these issues were resolved.
Moreover, members of our group using other IDEs (namely, IntelliJ IDEA
and NetBeans; i.e., equipped with built-in Maven support), naturally,
weren't confronted with such issues at all.
Consequently and generally, I'm all +1 for not bundling any
IDE-specific project files within its source code repo (especially,
when the overhead of having to manage them manually can be avoided).
-- Robert
---------------------------------------------------------------------
   http://xircles.codehaus.org/manage_email
---------------------------------------------------------------------
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email
Loading...