You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Kent Närling <ke...@seamless.se> on 2009/01/23 11:11:40 UTC

Re: How to import multi-module projects in Eclipse through mvn eclipse:eclipse

If you want to do this, why not use one of the maven eclipse plugins?
At least I know m2eclipse supports this very nicely...

2009/1/23 Jaikiran <ja...@yahoo.co.in>

>
> I have a multiple module project with this parent pom containing this:
>
> <module>myappone</module>
> <module>myapptwo</module>
>
>
> The myappone and myapptwo have their own poms and are jar artifacts. From
> the top level parent i do a
>
> mvn eclipse:clean eclipse:eclipse
>
>
> And then from Eclipse (which does not have any plugins) i do a File ->
> Import -> Top level Project. At this point, i expected to see myappone and
> myapptwo availble for selection, in the list of projects to be selected.
> But
> i only see the top level parent in the selection. When i import this top
> level project, the child modules myappone and myapptwo are imported as
> resources for the top level project. As a result, whenever i want to
> traverse between the java classes of these projects (the "F3" way) i get a
> pop-up saying (The resource is not in build path).
>
> Is there a way through which i can import these child projects as java
> projects all at once from the top level instead of having to import them
> one
> at a time?
> --
> View this message in context:
> http://www.nabble.com/How-to-import-multi-module-projects-in-Eclipse-through-mvn-eclipse%3Aeclipse-tp21621731p21621731.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>


-- 
Kent Närling

System Architect
SEAMLESS
Dalagatan 100, 8 tr, 113 43 Stockholm, Sweden
Phone: +46 8 5648 7800, fax: +46 8 5648 7823
Mobile: +46 70 836 9925
Mail: kent.narling@seamless.se
www.seamless.se

Re: How to import multi-module projects in Eclipse through mvn eclipse:eclipse

Posted by Jaikiran <ja...@yahoo.co.in>.
Thanks everyone for the inputs. Let me give the Eclipse plugin a try :)


Eugene Kuleshov wrote:
> 
> Rusty,
> 
>   The startup issue been fixed while ago. The project import and updating
> dependencies may take some time for large project, but nothing like that
> is happening at Eclipse startup anymore.
> 
>   regards,
>   Eugene
> 
-- 
View this message in context: http://www.nabble.com/How-to-import-multi-module-projects-in-Eclipse-through-mvn-eclipse%3Aeclipse-tp21621731p21638772.html
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: How to import multi-module projects in Eclipse through mvn eclipse:eclipse

Posted by Eugene Kuleshov <eu...@md.pp.ru>.
Rusty,

  The startup issue been fixed while ago. The project import and updating
dependencies may take some time for large project, but nothing like that is
happening at Eclipse startup anymore.

  regards,
  Eugene



Rusty Wright-2 wrote:
> 
> I forgot to add, I agree with Kent; using the m2eclipse plugin really
> makes it much nicer; it keeps your classpath up to date and all kinds of
> other nice stuff.  Just learn to get in the habit of sitting back and
> waiting for it to finish doing its stuff when you start eclipse; for me
> the price is well worth it.
> 
> 
> Rusty Wright wrote:
>> I think you may be able to do it if you put the parent and child 
>> projects at the same level in the filesystem; don't nest the child 
>> modules in the parent's directory.  Thus, your parent pom will have
>> 
>>    <module>../myappone</module>
>>    <module>../myapptwo</module>
>> 
>> And the child poms will have something like
>> 
>>    <parent>
>>        <artifactId>parentArtifactId</artifactId>
>>        <groupId>myGroupId</groupId>
>>        <version>whatever</version>
>>        <relativePath>../parent/pom.xml</relativePath>
>>    </parent>
>> 
>> Get that to work outside of eclipse, then start over with eclipse and 
>> import each one separately.
>> 
>> Jaikiran wrote:
>>>
>>>
>>> Kent Narling wrote:
>>>> If you want to do this, why not use one of the maven eclipse plugins?
>>>> At least I know m2eclipse supports this very nicely...
>>>>
>>>
>>> The only reason i stay away from adding plugins (any plugins) to 
>>> eclipse is
>>> because
>>>
>>> 1) It makes Eclipse slow
>>> 2) The plugins sometimes start off uncontrollable actions (ex: 
>>> downloading
>>> dependencies etc...)
>>>
>>> But if that's the only way to do this, then maybe, i'll have to rethink.
>>> Isn't this supported from mvn plugins instead?
>>>
>>>
>>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/How-to-import-multi-module-projects-in-Eclipse-through-mvn-eclipse%3Aeclipse-tp21621731p21637043.html
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: How to import multi-module projects in Eclipse through mvn eclipse:eclipse

Posted by Rusty Wright <ru...@gmail.com>.
I forgot to add, I agree with Kent; using the m2eclipse plugin really makes it much nicer; it keeps your classpath up to date and all kinds of other nice stuff.  Just learn to get in the habit of sitting back and waiting for it to finish doing its stuff when you start eclipse; for me the price is well worth it.


Rusty Wright wrote:
> I think you may be able to do it if you put the parent and child 
> projects at the same level in the filesystem; don't nest the child 
> modules in the parent's directory.  Thus, your parent pom will have
> 
>    <module>../myappone</module>
>    <module>../myapptwo</module>
> 
> And the child poms will have something like
> 
>    <parent>
>        <artifactId>parentArtifactId</artifactId>
>        <groupId>myGroupId</groupId>
>        <version>whatever</version>
>        <relativePath>../parent/pom.xml</relativePath>
>    </parent>
> 
> Get that to work outside of eclipse, then start over with eclipse and 
> import each one separately.
> 
> Jaikiran wrote:
>>
>>
>> Kent Narling wrote:
>>> If you want to do this, why not use one of the maven eclipse plugins?
>>> At least I know m2eclipse supports this very nicely...
>>>
>>
>> The only reason i stay away from adding plugins (any plugins) to 
>> eclipse is
>> because
>>
>> 1) It makes Eclipse slow
>> 2) The plugins sometimes start off uncontrollable actions (ex: 
>> downloading
>> dependencies etc...)
>>
>> But if that's the only way to do this, then maybe, i'll have to rethink.
>> Isn't this supported from mvn plugins instead?
>>
>>
>>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: How to import multi-module projects in Eclipse through mvn eclipse:eclipse

Posted by Rusty Wright <ru...@gmail.com>.
I think you may be able to do it if you put the parent and child projects at the same level in the filesystem; don't nest the child modules in the parent's directory.  Thus, your parent pom will have

    <module>../myappone</module>
    <module>../myapptwo</module>

And the child poms will have something like

    <parent>
        <artifactId>parentArtifactId</artifactId>
        <groupId>myGroupId</groupId>
        <version>whatever</version>
        <relativePath>../parent/pom.xml</relativePath>
    </parent>

Get that to work outside of eclipse, then start over with eclipse and import each one separately.

Jaikiran wrote:
> 
> 
> Kent Narling wrote:
>> If you want to do this, why not use one of the maven eclipse plugins?
>> At least I know m2eclipse supports this very nicely...
>>
> 
> The only reason i stay away from adding plugins (any plugins) to eclipse is
> because
> 
> 1) It makes Eclipse slow
> 2) The plugins sometimes start off uncontrollable actions (ex: downloading
> dependencies etc...)
> 
> But if that's the only way to do this, then maybe, i'll have to rethink.
> Isn't this supported from mvn plugins instead?
> 
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: How to import multi-module projects in Eclipse through mvn eclipse:eclipse

Posted by Jaikiran <ja...@yahoo.co.in>.


Kent Narling wrote:
> 
> If you want to do this, why not use one of the maven eclipse plugins?
> At least I know m2eclipse supports this very nicely...
> 

The only reason i stay away from adding plugins (any plugins) to eclipse is
because

1) It makes Eclipse slow
2) The plugins sometimes start off uncontrollable actions (ex: downloading
dependencies etc...)

But if that's the only way to do this, then maybe, i'll have to rethink.
Isn't this supported from mvn plugins instead?



-- 
View this message in context: http://www.nabble.com/How-to-import-multi-module-projects-in-Eclipse-through-mvn-eclipse%3Aeclipse-tp21621731p21622164.html
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org