Dreaming of a real powerful New Project Wizard

Wouldn't it be fantastic if Idea could set up projects not only based on existing sources, but would consider also build artifacts (jars, wars, ear, sars).
Quite often you have existing, working builds (from eclipse, ant, maven whatever).

Just tell Idea:
- here's my project root (sources, web resources, ...)
- here are root folder where 3rd party jars can be found
- here are build artifacts, for example an ear file

Now go ahead and create a project that compiles out-of-the-box to exactly the build artifacts I specified.

Shouldn't be impossible, right?

I am currently (once more) getting frustrated in setting up a web project and clicking my way through the project settings ad infinitum without ever getting it right.

What do you think?

5 comments
Comment actions Permalink

Hi Stephen,
We're doing almost the same thing you described. Though not all the things will be made into Selena...
Currently we have several plugins that handle importing projects from other IDEs or tools (Eclipse, Maven etc). It is planned to
extend them so that they provide wizard's "autodetect" steps.
J2EE articats autodetection is being implemented as well (Facets autoconfiguration).
The "from existing sources" option assists in creating a java project from a number of source files and jars when there is no
additional information about project layout.

--
Best regards,
Eugene Zhuravlev
Software Developer
JetBrains Inc.
http://www.jetbrains.com
"Develop with pleasure!"

"Stephen Friedrich" <no_reply@jetbrains.com> wrote in message news:774065.1185987771742.JavaMail.itn@is.intellij.net...

Wouldn't it be fantastic if Idea could set up projects not only based on existing sources, but would consider also build artifacts
(jars, wars, ear, sars).
Quite often you have existing, working builds (from eclipse, ant, maven whatever).

>

Just tell Idea:
- here's my project root (sources, web resources, ...)
- here are root folder where 3rd party jars can be found
- here are build artifacts, for example an ear file

>

Now go ahead and create a project that compiles out-of-the-box to exactly the build artifacts I specified.

>

Shouldn't be impossible, right?

>

I am currently (once more) getting frustrated in setting up a web project and clicking my way through the project settings ad
infinitum without ever getting it right.

>

What do you think?



0
Comment actions Permalink

Well, currently we're far away from that:
- Most importantly there is no automatic setup of library deployment options: ignore (for compilation only, jars are JEE defaults in app server), to WEB-INF/lib, to ear root, to ear/lib, ...
That's the source of a real click-orgy after initial setup.
Idea should take existing build artifacts into account. Even worse, those are not even ignored, but cause problems. For example when an exploded ear build dir is beneath the project root you'll get bogus facet detections.
- There's no way to specify an additional separate root folder for libraries. I have often seen those in a separate folder altogether from the project root. (Because project root is under VCS, but 3rd party libs aren't.)
You also can't trigger "necessary jar detection" in that folder after initial setup. You just have to setup libraries completely manually.
- There are dozens of usability problems, but true enough I hope that most of them are fixed before Selena goes gold.

0
Comment actions Permalink

P.S. Here's a definition of reaching a milestone:
Download JBoss Seam.
Use ant to build one of the examples.
Point the project wizard at the example's folder (project root), at Seam root folder (look here for libraries) and at the built ear file.
Idea brings up a wizard that let's configure an app server, then automatically creates a run configuration for the project (ear) and that app server.

Click on "Run" and Idea builds successfully. The ear produced by Idea is the same as that built by ant (including the location of custom deployment resources like JBoss' import.sql and trinidad's trinidad-config.xml).
The app just starts and works fine.

Currently I do a lot of folder comparison between the Idea generated exploded ear folder and the ant build results. Then go back to settings dialog tweak and twiddle somemore. Build. Compare again. That is so tedious work...

0
Avatar
Nikolay Chashnikov
Comment actions Permalink

Hello Stephen,

Idea should take existing build artifacts into account. Even worse,
those are not even ignored, but cause problems. For example when an
exploded ear build dir is beneath the project root you'll get bogus
facet detections.


Can you suggest any way to determine exploded directory for j2ee facet?


0
Comment actions Permalink

First of all if I were able to specify that exploded directory as a pattern for project setup then that problem would vanish.

Otherwise it obviously needs some heuristics.
For example finding the exactly identical web.xml twice in the project strongly suggests that one of them is bogus.

Then you would need to check the "grandparent" directory if it conforms to the standard deployment structure for the resource type, e.g. war format for a web.xml.
- if there's a WEB-INF/lib or WEB-INF/classes it's probably exploded (esp. if the very same libs are also found elsewhere).
- if there are other resource descriptor types (e.g. application.xml) on the same level as web.xml it most probably not exploded
- if there are java sources somewhere in the folder it's probably not exploded
- etc. pp...

0

Please sign in to leave a comment.