You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Mark Lundquist <ml...@wrinkledog.com> on 2007/01/11 02:28:00 UTC

Importing Cocoon projects into Eclipse

OK...

On Jan 10, 2007, at 2:50 PM, Daniel Fagerstrom wrote:

> For resources it works as you want OOTB, if you run from Eclipse. What 
> is important is that you run "mvn eclipse:eclipse" from top level. If 
> you do that (and import the needed projectts into Eclipse),

I ran "mvn eclipse:eclipse"; now which projects do I need to import, 
and what's the easiest way to do it? :-)

(again, my goal here is to run the cocoon-webapp w/ samples using the 
Eclipse Jetty plugin...)

thx,
—ml—


Re: Importing Cocoon projects into Eclipse

Posted by Mark Lundquist <ml...@wrinkledog.com>.
On Jan 11, 2007, at 12:56 AM, Daniel Fagerstrom wrote:

> File -> Import ... -> General -> Existing projects into workspace -> 
> Point on a directory that contains the project, it will be scanned for 
> Eclipse project descriptors. It takes some time for Eclipse to scan 
> all of cocoon-trunk. Choose the projects you want.

D'oh, I've always just used this to import a single project, never 
noticed the "scanning" business :-o

> Take a look at properties -> Java build path for the project, to see 
> what other projects it depends on and make sure that you import all 
> dependencies.

Well, I'm really a little too lazy for that, but if that's what I have 
to do... :-/.

Has anyone tried the Eclipse Maven plugin [1] ?

—ml—

[1] http://m2eclipse.codehaus.org/



Re: Importing Cocoon projects into Eclipse

Posted by Leszek Gawron <lg...@mobilebox.pl>.
Mark Lundquist wrote:
> 
> On Jan 11, 2007, at 12:35 PM, Grzegorz Kossakowski wrote:
> 
>> You have to set up variable 'M2_REPO' in Eclipse (in build classpath
>> settings somewhere) to point on the directory where your Maven's repo
>> sit.
>>
> 
> yes... thanks :-)
> —ml—
> 
you can also use

mvn eclipse:add-maven-repo -Dworkspace=workspaceLocation

the plugin will take care of M2_REPO variable.

http://maven.apache.org/plugins/maven-eclipse-plugin/add-maven-repo-mojo.html

-- 
Leszek Gawron                                    CTO at MobileBox Ltd.

Re: Importing Cocoon projects into Eclipse

Posted by Mark Lundquist <ml...@wrinkledog.com>.
On Jan 11, 2007, at 12:35 PM, Grzegorz Kossakowski wrote:

> You have to set up variable 'M2_REPO' in Eclipse (in build classpath 
> settings somewhere) to point on the directory where your Maven's repo 
> sit.
>

yes... thanks :-)
—ml—


Re: Importing Cocoon projects into Eclipse

Posted by Grzegorz Kossakowski <gr...@tuffmail.com>.
Mark Lundquist napisał(a):
>
> On Jan 11, 2007, at 12:56 AM, Daniel Fagerstrom wrote:
>
> I just imported all the projects in trunk. I get all kinds of errors 
> of this sort:
>
> Unbound classpath variable: 
> 'M2_REPO/aopalliance/aopalliance/1.0/aopalliance-1.0.jar' in project 
> cocoon-core
You have to set up variable 'M2_REPO' in Eclipse (in build classpath 
settings somewhere) to point on the directory where your Maven's repo sit.

-- 
Grzegorz Kossakowski

Re: Importing Cocoon projects into Eclipse

Posted by Mark Lundquist <ml...@wrinkledog.com>.
On Jan 11, 2007, at 12:56 AM, Daniel Fagerstrom wrote:

> File -> Import ... -> General -> Existing projects into workspace -> 
> Point on a directory that contains the project, it will be scanned for 
> Eclipse project descriptors. It takes some time for Eclipse to scan 
> all of cocoon-trunk. Choose the projects you want.
>
> Take a look at properties -> Java build path for the project, to see 
> what other projects it depends on and make sure that you import all 
> dependencies.

I just imported all the projects in trunk.  I get all kinds of errors 
of this sort:

Unbound classpath variable: 
'M2_REPO/aopalliance/aopalliance/1.0/aopalliance-1.0.jar' in project 
cocoon-core		
—ml—


Re: Importing Cocoon projects into Eclipse

Posted by Daniel Fagerstrom <da...@nada.kth.se>.
Mark Lundquist skrev:
> OK...
>
> On Jan 10, 2007, at 2:50 PM, Daniel Fagerstrom wrote:
>
>> For resources it works as you want OOTB, if you run from Eclipse. 
>> What is important is that you run "mvn eclipse:eclipse" from top 
>> level. If you do that (and import the needed projectts into Eclipse),
>
> I ran "mvn eclipse:eclipse"; now which projects do I need to import, 
> and what's the easiest way to do it? :-)
>
> (again, my goal here is to run the cocoon-webapp w/ samples using the 
> Eclipse Jetty plugin...)
File -> Import ... -> General -> Existing projects into workspace -> 
Point on a directory that contains the project, it will be scanned for 
Eclipse project descriptors. It takes some time for Eclipse to scan all 
of cocoon-trunk. Choose the projects you want.

Take a look at properties -> Java build path for the project, to see 
what other projects it depends on and make sure that you import all 
dependencies.

/Daniel






Re: Importing Cocoon projects into Eclipse

Posted by Joerg Heinicke <jo...@gmx.de>.
On 11.01.2007 02:28, Mark Lundquist wrote:

> I ran "mvn eclipse:eclipse"; now which projects do I need to import, and 
> what's the easiest way to do it? :-)

At least the Eclipse setup works as expected if following the 
description in README.txt in Cocoon trunk's root dir.

Jörg