How easy is it to create an IDEA project outside IDEA

Howdy, all.

One of my clients has started showing interest in IDEA. They have an
unusual requirement.

They need to have projects generated from a dependency list outside of
the IDEA IDE. This should produce an IDEA project that can work on the
source in place, build jars like the outside ANT script, and debug
across projects without pain.

The details:

They have roughly a hundred interlinked projects. All of them are built
with ANT. Each ANT project is checked out from cvs and compiled to a
jar, which is then used by projects that depend on it. We track and
enforce these dependencies based an a master project list that shows
what is checked out from where, and what depends on what.

A section might look like:

To make this all work, we generate the ANT build file via an XSLT transform from a source list of projects. ]]>

This all works now, and they want to keep using the project list as the
repository of dependency information. They would become very unhappy if
they had to hand tweak an IDEA project when the dep list changes.

I would be the one writing a new .xsl file to generate IDEA project
files, so that a user who wanted to work on userthingie would just check
out the project list and source, and run the transform. Without them
having to do anything else, the built IDEA project would be able to
debug into dependent projects, build appropriate jars, and the like.

Is this feasible? (In other words, is the project format something that
can be generated, like XML or plain text, without mystery keys.)

Scott

9 comments

The project file (.ipr) is just plain ole' XML.


"Scott Ellsworth" <scott@alodar.com> wrote in message
news:scott-4891C9.16244905022003@news.intellij.net...

Howdy, all.

>

One of my clients has started showing interest in IDEA. They have an
unusual requirement.

>

They need to have projects generated from a dependency list outside of
the IDEA IDE. This should produce an IDEA project that can work on the
source in place, build jars like the outside ANT script, and debug
across projects without pain.

>

The details:

>

They have roughly a hundred interlinked projects. All of them are built
with ANT. Each ANT project is checked out from cvs and compiled to a
jar, which is then used by projects that depend on it. We track and
enforce these dependencies based an a master project list that shows
what is checked out from where, and what depends on what.

>

A section might look like:

>

<project name="dbaccess" cvs="projects/dbaccess" />
<project name="xmlaccess" cvs="projects/xmlaccess" />
<project name="userthingie" cvs="com/us/apps/userthingie">
<depend type="project" name="dbaccess.jar">
<depend type="project" name="xmlaccess.jar">
<depend type="library" name="xerces.jar">
</project>

>

To make this all work, we generate the ANT build file via an XSLT
transform from a source list of projects.

>

<target name="builduserthingie" depends="bulidxmlaccess,builddbaccess"/>
<target name="builddbaccess"/>
<target name="buildxmlaccess"/>

>

This all works now, and they want to keep using the project list as the
repository of dependency information. They would become very unhappy if
they had to hand tweak an IDEA project when the dep list changes.

>

I would be the one writing a new .xsl file to generate IDEA project
files, so that a user who wanted to work on userthingie would just check
out the project list and source, and run the transform. Without them
having to do anything else, the built IDEA project would be able to
debug into dependent projects, build appropriate jars, and the like.

>

Is this feasible? (In other words, is the project format something that
can be generated, like XML or plain text, without mystery keys.)

>

Scott



0

If I'm not mistaken there's even Maven task that can do it (sorry did not try it myself).

--

Best regards,
Eugene Zhuravlev
JetBrains, Inc, http://www.intellij.com
"Develop with pleasure!"


0

In article <b28d3a$gb9$1@is.intellij.net>,
"Eugene Zhuravlev" <jeka@intellij.com> wrote:

If I'm not mistaken there's even Maven task that can do it (sorry did not try
it myself).


Very cool. We have not yet started using Maven, but I keep eyeing it
and Anthill as potential master build systems.

Scott

0

In article <b1se2s$q70$1@is.intellij.net>,
"Josh Knowles" <josh@wwp.com> wrote:

The project file (.ipr) is just plain ole' XML.


Very cool. Much easier to understand than the Eclipse binary format.

Scott

0

eclipse also uses xml. and maven can generate projects for both. -chris
On Mon, 10 Feb 2003 15:55:02 -0800, Scott Ellsworth <scott@alodar.com>
wrote:

In article <b1se2s$q70$1@is.intellij.net>,
"Josh Knowles" <josh@wwp.com> wrote:

>
>> The project file (.ipr) is just plain ole' XML.
>

Very cool. Much easier to understand than the Eclipse binary format.

>

Scott

>



--
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/

0

In article <oprmothaqhz8wbqv@news.mcmarketing.at>,
Christoph Sturm <csturm@mcmarketing.at> wrote:

eclipse also uses xml. and maven can generate projects for both. -chris


I can generate the xml .project and .classpath files which eclipse
needs, but I found no way to add them to the workspace. It is not hard
to select 'new project', type in the correct name, and then tell it to
base out of the directory with the created .classpath and .project
files, but it is terribly fragile and fraught.

I created an Eclipse plugin to do the same, but I was not happy with how
it worked, then ran out of time to make it better.

I thus currently generate .classpath and .project files, and create the
projects within eclipse that use them as needed. Clunky, but working
If IDEA makes this easier with their nested project approach, I will
be much happier.

On Mon, 10 Feb 2003 15:55:02 -0800, Scott Ellsworth <scott@alodar.com>
wrote:

In article <b1se2s$q70$1@is.intellij.net>,
"Josh Knowles" <josh@wwp.com> wrote:

>
>> The project file (.ipr) is just plain ole' XML.
>

Very cool. Much easier to understand than the Eclipse binary format.

0

Extremely cool. We actually take an existing project file, and customize it using ]]> from ANT. (I wish IntelliJ would support environment variables, or at least do path variable replacement from the items in the Run menu)

I'm actually tempted to write an ANT task to manipulate intellij projects. Anybody think this would be useful?

0

Matthew Inger wrote:

Extremely cool. We actually take an existing project file, and customize it using <xmltask> from ANT. (I wish IntelliJ would support environment variables, or at least do path variable replacement from the items in the Run menu)

I'm actually tempted to write an ANT task to manipulate intellij projects. Anybody think this would be useful?


Variable Paths will replace actual paths with variables, but those
variables have to exist in your IDE for them to work right.

R

0

In article <3385340.1078270469093.JavaMail.itn@is.intellij.net>,
Matthew Inger <no_mail@jetbrains.com> wrote:

Extremely cool. We actually take an existing project file, and customize it
using <xmltask> from ANT. (I wish IntelliJ would support environment
variables, or at least do path variable replacement from the items in the Run
menu)

I'm actually tempted to write an ANT task to manipulate intellij projects.
Anybody think this would be useful?


I wrote some xslt last year to create version three projects, and found
even that limited functionality very useful. If you create an ant task
to generate and manipulate intellij projects from ant, I would be very
happy indeed.

Scott

0

Please sign in to leave a comment.