Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Maven Integration (M2E) » import projects from SCM: choose base folder?
import projects from SCM: choose base folder? [message #500216] Wed, 25 November 2009 12:21 Go to next message
Kristian Rink is currently offline Kristian RinkFriend
Messages: 64
Registered: July 2009
Member
Folks;

while importing maven2 projects from SCM (SVN actually, in our case), I
usually ended up with my projects being dumped somewhere to

<workspace>/maven.<some-identifier>/...

and generally I don't really care. However, in some cases, in example after
discarding and re-importing a project from SCM, it gets dumped into another

<workspace>/maven.<whatever>/

folder, essentially in some cases messing up the project structure. So, how
to state that I want to have maven2 projects checked out, say, not to some
randomly generated folder but i.e. to <workspace>/maven-artifacts/ instead?

TIA and all the best,
Kristian
Re: import projects from SCM: choose base folder? [message #501451 is a reply to message #500216] Wed, 02 December 2009 12:14 Go to previous messageGo to next message
Igor Fedorenko is currently offline Igor FedorenkoFriend
Messages: 14
Registered: July 2009
Junior Member
When you checkout projects into Eclipse workspace, m2e is expected to rename folder to match project name... What version of m2e are you using? Do you see anything interesting in eclipse .log or maven console?

--
Regards,
Igor
Re: import projects from SCM: choose base folder? [message #502510 is a reply to message #501451] Tue, 08 December 2009 15:38 Go to previous messageGo to next message
Kristian Rink is currently offline Kristian RinkFriend
Messages: 36
Registered: July 2009
Member
Igor Fedorenko schrieb:
> When you checkout projects into Eclipse workspace, m2e is expected to
> rename folder to match project name... What version of m2e are you
> using? Do you see anything interesting in eclipse .log or maven console?

No real error messages to be found in any of these places. Using the
latest stable m2eclipse in Eclipse 3.5.1 as far as I can tell. All my
maven2 artifacts live in an SVN repository

http://dev/pcsvn/bf4j/tags/stable-20091201-consolidated/

which I use to checkout / import them to Eclipse. The "stable-..."
parent folder, however, is not a maven2 project itself but "just" a
folder containing artifacts. Is this a problem?


Cheers,
Kristian
Re: import projects from SCM: choose base folder? [message #502513 is a reply to message #502510] Tue, 08 December 2009 16:07 Go to previous messageGo to next message
Igor Fedorenko is currently offline Igor FedorenkoFriend
Messages: 14
Registered: July 2009
Junior Member
I am not able to access the url you provided. Can you provide publicly accessible url or describe layout of the project you're trying to import?
Re: import projects from SCM: choose base folder? [message #502568 is a reply to message #502513] Tue, 08 December 2009 20:30 Go to previous messageGo to next message
Kristian Rink is currently offline Kristian RinkFriend
Messages: 36
Registered: July 2009
Member
Igor;

sorry, I should have been more careful - indeed the SVN repository is
internally available only. As I am not allowed to open it up:

Igor Fedorenko schrieb:
> I am not able to access the url you provided. Can you provide publicly
> accessible url or describe layout of the project you're trying to import?

Well, it basically comes down to something like this

/
/trunk
|
/tags
|
/stable-20091202-consolidated/
|
/lib-core-api
/lib-core-impl
/pom-parent-basic
/...


So, basically, checking out the "stable-20091202-consolidated" tag ends
up with a handful of maven2 artifacts (pom, jar, war) in this very
folder. Hmmm, hard to describe - what kind of information would help you
any further here? In my case, it would just suffice being capable if,
i.e. checking out a tag or a branch like I did here, m2eclipse would use
the name of the tag/branch (stable-2009..., in this case) rather than
"maven.123124323" as project name in <workspace>.

TIA and all the best,
K.
Re: import projects from SCM: choose base folder? [message #502571 is a reply to message #502568] Tue, 08 December 2009 20:36 Go to previous messageGo to next message
Igor Fedorenko is currently offline Igor FedorenkoFriend
Messages: 14
Registered: July 2009
Junior Member
This structure does not look like a maven project and checkout as maven project won't help you here, unless I am missing something.
Re: import projects from SCM: choose base folder? [message #502582 is a reply to message #502571] Tue, 08 December 2009 21:29 Go to previous messageGo to next message
Kristian Rink is currently offline Kristian RinkFriend
Messages: 36
Registered: July 2009
Member
Igor Fedorenko schrieb:
> This structure does not look like a maven project and checkout as maven
> project won't help you here, unless I am missing something.

Yes, that's eventually the problem: It's not a "maven2" project of
nested projects; at checkout time it basically is a collection of (just
loosely associated) artifacts. The only way "dependency" between these
is enforced is one project used for building them all easily, containing
something like

<modules>
<module>../mod1</module>
<module>../mod2</module>
<module>../mod3</module>
</modules>

which, in my case, fails if I delete and checkout one of mod[1|2|3]
again as by then it will end up in a different folder in <workspace>,
not where the projects checked out before did end up. Agreed, this
project structure eventually could be done smarter, but then again, it's
not totally against maven2 multi-module setup (especially in a "flat"
multiproject layout), and it generally works, IDE tooling support let
aside...

Cheers,
Kristian
Re: import projects from SCM: choose base folder? [message #502895 is a reply to message #502582] Thu, 10 December 2009 08:38 Go to previous messageGo to next message
Kristian Rink is currently offline Kristian RinkFriend
Messages: 36
Registered: July 2009
Member
Kristian Rink schrieb:
[...]
> not where the projects checked out before did end up. Agreed, this
> project structure eventually could be done smarter, but then again, it's
> not totally against maven2 multi-module setup (especially in a "flat"
> multiproject layout), and it generally works, IDE tooling support let
> aside...

On second thought, I did a little restructuring of my maven2 project
layout in SVN, so now things behave the way they are supposed to do.
Good. :) Thanks a bunch for your help on that!

K.
Re: import projects from SCM: choose base folder? [message #504195 is a reply to message #501451] Thu, 17 December 2009 16:06 Go to previous message
Jens Ohlsson is currently offline Jens OhlssonFriend
Messages: 8
Registered: July 2009
Junior Member
It would be nice to have the same behavior when checking out to a custom
location. Could it be done?

Igor Fedorenko skrev 2009-12-02 13.14:
> When you checkout projects into Eclipse workspace, m2e is expected to
> rename folder to match project name... What version of m2e are you
> using? Do you see anything interesting in eclipse .log or maven console?
>
> --
> Regards,
> Igor
Previous Topic:True Multi Module Support?
Next Topic:DisplayTag Maven Dependencies Error
Goto Forum:
  


Current Time: Thu Apr 25 06:16:37 GMT 2024

Powered by FUDForum. Page generated in 0.03571 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top