Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » Classpath Build Order Changes (.classpath's build order changes)
Classpath Build Order Changes [message #635471] Tue, 26 October 2010 23:54 Go to next message
Missing name Mising name is currently offline Missing name Mising nameFriend
Messages: 2
Registered: October 2010
Junior Member
I am using Eclipse3.5 JEE 64 bit on OS X Snow Leopard.

Was wondering how the .classpath file's <classpathentry> tag's order gets changed everytime I run a standard Ant build script.

When I manually change the build path order like this (via Eclipse):

(1) Right click on project in Project Explorer.

(2) A context menu opens up

(3) Go to Build Path

(4) Configure Build Path

(5) Click on the Java Build Path Order and Export Tab

(6) Modified the order to look like this:

myproject/work/src (moved this to the top)
myproject/work/test/unit
myproject/work/impl/src (this is a linked resource which points to a 2nd Eclipse project which is open in Eclipse at the same time)

The myproject/work/impl/src by default is at the first position for the order. Manually moved myproject/work/src to the top (by clicking on the Up button).

When I run my build script, it seems that the .classpath file (which this order is written to behind-the-scenes) is reset to how it was before:

<?xml version="1.0" encoding="UTF-8"?>
<classpath>
	<classpathentry kind="src" path="impl"/>
	<classpathentry kind="src" path="test/unit/impl"/>
	<classpathentry kind="src" path="work/src"/>
</classpath>


Why is this? Where and when does Eclipse modify the .classpath file? How can it be set so people can change the build order manually through Eclipse but the .classpath's build order never gets reset to its defaults? After setting this and building the project by right mouse clicking on my project (not the impl one) and going to Build Project, the order never gets changed. It only resets when the Ant build script is run.

Thank you for taking the time to read this.

[Updated on: Wed, 27 October 2010 00:12]

Report message to a moderator

Re: Classpath Build Order Changes [message #638520 is a reply to message #635471] Thu, 11 November 2010 14:42 Go to previous message
Dani Megert is currently offline Dani MegertFriend
Messages: 3802
Registered: July 2009
Senior Member
Socalguy wrote:
> I am using Eclipse3.5 JEE 64 bit on OS X Snow Leopard.
> Was wondering how the .classpath file's <classpathentry> tag's order
> gets changed everytime I run a standard Ant build script.
>
> When I manually change the build path order like this (via Eclipse):
>
> (1) Right click on project in Project Explorer.
>
> (2) A context menu opens up
>
> (3) Go to Build Path
>
> (4) Configure Build Path
>
> (5) Click on the Java Build Path Order and Export Tab
>
> (6) Modified the order to look like this:
>
> myproject/work/src (moved this to the top)
> myproject/work/test/unit
> myproject/work/impl/src (this is a linked resource which points to a
> 2nd Eclipse project which is open in Eclipse at the same time)
>
> The myproject/work/impl/src by default is at the first position for
> the order. Manually moved myproject/work/src to the top (by clicking
> on the Up button).
>
> When I run my build script, it seems that the .classpath file (which
> this order is written to behind-the-scenes) is reset to how it was
> before:
>
>
> <?xml version="1.0" encoding="UTF-8"?>
> <classpath>
> <classpathentry kind="src" path="impl"/>
> <classpathentry kind="src" path="test/unit/impl"/>
> <classpathentry kind="src" path="work/src"/>
> </classpath>
>
>
> Why is this?
That's not what I see. For me it works as expected (3.6.1 and 3.7 M3).

Dani
> Where and when does Eclipse modify the .classpath file? How can it be
> set to people can change the build order manually through Eclipse but
> the .classpath's build order never gets reset to its defaults?
>
> Thank you for taking the time to read this.
Previous Topic:Code Snap in Editor Window
Next Topic:Listening to changes in the java model - IJavaElementDelta
Goto Forum:
  


Current Time: Tue Mar 19 11:13:35 GMT 2024

Powered by FUDForum. Page generated in 0.02080 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top