views:

24

answers:

1

I have a web application that I am building using IDEA.

There are some libraries that will be used both in the web application, and some that will be run using a cron job.

I'm new to java/IDEA, is there a way to have a solution, and then projects within that solution that compile to seperate .jar files?

+1  A: 

Yes, that is possible using IDEA modules. Create new module with common classes and then add this module to the dependencies of your 2 other modules (web and app).

You don't need to use jars as exploded deployment for the web application would be much faster. For the production you can package your application into jar/war using IDEA Artifacts feature.

Please refer to Help | Help Topics for the details on Library/Dependencies/Artifacts configuration.

CrazyCoder
But if I have another IDEA project, can I add the assembly to it also?
Blankman
You can add existing IDEA modules to multiple IDEA projects, see the New Module dialog, it has an option to import existing module (from the .iml file).
CrazyCoder