Grégory Joseph | 9 Feb 11:30
Gravatar

Re: Module development with Tomcat and Eclipse

Hey David,

I think you meant to send your email to the list, ie <user-list <at> magnolia-cms.com>

Cheers,

-greg

On 09 Feb 2012, at 11:09, Toniolo, David wrote:

Hi Magnolians,

 

can anybody help how to setup a development environment for a module without Maven? The module is built with ANT.

 

Currently, I have to build the module JAR and make a complete deployment. L What I search for is a hot deploy configuration with Eclipse, Tomcat and ANT.

 

Greetings,

David




----------------------------------------------------------------
For list details, see http://www.magnolia-cms.com/community/mailing-lists.html
Alternatively, use our forums: http://forum.magnolia-cms.com/
To unsubscribe, E-mail to: <user-list-unsubscribe <at> magnolia-cms.com>
----------------------------------------------------------------
Unger, Richard | 9 Feb 15:08
Picon

AW: Re: Module development with Tomcat and Eclipse

Hi David,

 

Development of a module w/o Maven is no problem:

 

1.    Create a Java-Project

2.    Add 2 Source-Folders: “src” and “resources”

3.    In “src”, put your module’s java code

4.    In “resources”, put the module’s resource dirs and files like “mgnl-resources”, “mgnl-bootstrap” and “META-INF”

 

If you export the resulting project as a JAR, you will have a perfect magnolia module.

 

Getting hot-code-replace to work will be more tricky, I’m not sure it will be possible:

 

1.    Set up a Tomcat 6 instance in Eclipse

2.    Create a new “Dynamic Web Project”, eg: ‘magnoliaAuthor

3.    Copy all of magnolia into the web project. Basically, the contents of “magnoliaAuthor” go inside the “WebContent” directory.

4.    Create a dependency on your module project in the web project. Go to “Properties” on your web project

a.    add the module project to the ‘java build path’ in the tab ‘projects’

b.    add the module project in the ‘java EE module dependencies’

 

At this point, if you start the tomcat server via eclipse, your module will be automatically added to the WEB-INF/lib folder as a jar.

 

However, in my experience hot-code-replace does not work in this scenario, as eclipse or tomcat will restart the web-app (magnolia) when the jar containing your module is changed.

 

In theory, I think you could get hot-code-replace to work in some situations with the following trick:

 

Temporarily move the java code from your module into the “src” folder of your dynamic web project. Changes made to the classes should now get hot-code-replaced (although that depends on the type of change you make).

Once you are happy that everything is working, move the java files back into your module project.

 

Regards from Vienna,


Richard

 

 

 

 

 

On 09 Feb 2012, at 11:09, Toniolo, David wrote:



Hi Magnolians,

 

can anybody help how to setup a development environment for a module without Maven? The module is built with ANT.

 

Currently, I have to build the module JAR and make a complete deployment. L What I search for is a hot deploy configuration with Eclipse, Tomcat and ANT.

 

Greetings,

David

 

 

----------------------------------------------------------------
For list details, see http://www.magnolia-cms.com/community/mailing-lists.html
Alternatively, use our forums: http://forum.magnolia-cms.com/
To unsubscribe, E-mail to: <user-list-unsubscribe <at> magnolia-cms.com>
----------------------------------------------------------------



----------------------------------------------------------------
For list details, see http://www.magnolia-cms.com/community/mailing-lists.html
Alternatively, use our forums: http://forum.magnolia-cms.com/
To unsubscribe, E-mail to: <user-list-unsubscribe <at> magnolia-cms.com>
----------------------------------------------------------------

Gmane