How do you construct your project?

In IDEA 6, default project's structure has some changes and everybody has his own way to construct his project. But I want to know what is best way to organize it (at least, the best way with IDEA).

In my opinion, I construct my projects like this

How about your opinion?

0
Avatar
Permanently deleted user

Fairly close to what I do, except that I rarely find it worthwhile to have multiple Ant files (I suppose really large projects need that), and I try to put build and dist somewhere other than under the project root (why make the tools work harder than they have to to ignore file changes).

If necessary, I also have a resources dir at the same level as source, as I like keeping compilable and non-compilable build inputs separate.

--Dave Griffith

0
Avatar
Permanently deleted user

Dave,

Would you mind terribly sharing a sample such as the one above? I'd like to compare notes as I was forced to use Eclipse for most of the life of IDEA 5.x and now want to get back to using IDEA. I'm having to relearn stuff. Thanks.

Joe

0
Avatar
Permanently deleted user

Here's the diagram, which I've found workable for non-web projects up to about 2000 classes in up to fifty modules. (Web projects are more complicated, since resource files become much more important to manage than in non-web projects, so having more structure than just a "resources" directory is valuable.)




\Module1


module1.iml


\src


\test


\resources


\Module2


module2.iml


\src


\test


\resources


project.ipr


project.iml


build.xml


build.properties

|-------\lib

The locations of "build" and "dist" directories are specified in build.properties, so you could put them under the project root if you wanted, but I don't. Note that the project has a top-level module, named after itself. That module has no source roots. This is an unfortunate hack necessary to be able to see the build.xml and build.properties files.

It's pretty simple, and won't scale much beyond the limits I noted above, but it suits my needs.

--Dave Griffith

0
Avatar
Permanently deleted user

Dave,

why make the tools work harder than they have to to ignore file changes


Do you mean synchronization problem?

About your project's structure, where do you put "javadoc" folder? Outside of project root like "build" and "dist"?

Thanks

0
Avatar
Permanently deleted user

One useful thing i do is to always prefix directories that contain only
generated files with a '_', so that it's obvious what is generated and
what isn't. (i.e. _build rather than build )

t800t8 wrote:

In IDEA 6, default project's structure has some changes and everybody has his own way to construct his project. But I want to know what is best way to organize it (at least, the best way with IDEA).

>

In my opinion, I construct my projects like this

>

 [project-root]
>         |
>         |------- \Module1
>         |               |
>         |               |------- \src
>         |               |------- \test
>         |               |------- \javadoc
>         |               |------- build.properties
>         |               |------- build.xml
>         |
>         |------- \Module2
>         |               |
>         |               |------- \src
>         |               |------- \test
>         |               |------- \javadoc
>         |               |------- build.properties
>         |               |------- build.xml
>         |
>         |------- \build
>         |               |
>         |               |------- \production
>         |               |                 |
>         |               |                 |-------- \Module1
>         |               |                 |-------- \Module2
>         |               |                 
>         |               |------- \test
>         |                                 |
>         |                                 |-------- \Module1
>         |                                 |-------- \Module2
>         |
>         |------- \dist
>         |               |
>         |               |------- \Module1
>         |               |------- \Module2
> ]]>

How about your opinion?

0

请先登录再写评论。