[Yanel-dev] Building resource types in wrong directory due to
Eclipse
Paul Bakker
p.bakker at sourcesense.com
Tue Oct 5 23:17:08 CEST 2010
Hi all,
Today we discovered on the project that I'm working on, that Eclipse can
screw up your build process by outputting your compiled classes to the wrong
folder.
In the realm that we're developing, xyz-yanel-realm, there are several
resource-types, each of which can be configured to have their source
directories for java classes and test classes. I build the realm and the
resource types essentially using the procedure outlined in
http://www.yanel.org/en/documentation/best-practices/rapid-development-of-c=
omponents.html,
i.e. on the command line.
Sometimes the changes in the resource type classes would not seem to get
picked up after a rebuild of the resource type. It appeared, after looking
inside both the jars built for the resource type and the realm itself, that
the class files for the resource type were in both jars.
Looking inside the realms build/classes directory (in subdirectories
corresponding the resource type's package), I could see the compiled classes
there. They should of course not be there.
The culprit in this case was Eclipse, due to the following conditions that
are set up by default:
- For each resource type, on the source directory of the java classes,
there is a "Source Folder Output Location" defined, which you can see by
right-clicking in the IDE on folder icon representing that directory. Th=
ere
are two options there:
- Project's default output folder ('xyz-yanel-realm/build/classes').
[This is the default]
- Specific output folder (path relative to 'xyz-yanel-realm'). [This
lets you enter a folder]
- Eclipse has the "Build Automatically" feature in the "Project" menu by
default turned on.
In summary, the built classes are output to the realms build directory
instead of the resource types' directory and this happens automatically when
you save/update a class file, resulting in a rather useless build.
Hope this helps,
Paul Bakker
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.wyona.org/pipermail/yanel-development/attachments/2010100=
5/a8bcc373/attachment.html
More information about the Yanel-development
mailing list