IntelliJ IDEA project layout, want to break assemblies for re-usabliity with web app and console
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?
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.
精彩评论