Bug 266139 - Cycle detected creating Ant Build File
Summary: Cycle detected creating Ant Build File
Status: RESOLVED FIXED
Alias: None
Product: PDE
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.5   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.5 M6   Edit
Assignee: Chris Aniszczyk CLA
QA Contact:
URL:
Whiteboard:
Keywords: bugday
Depends on:
Blocks:
 
Reported: 2009-02-25 10:18 EST by Chris Barlock CLA
Modified: 2009-02-25 14:01 EST (History)
5 users (show)

See Also:


Attachments
org.eclipse.pde.ui.patch (2.67 KB, patch)
2009-02-25 11:29 EST, Chris Aniszczyk CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Barlock CLA 2009-02-25 10:18:23 EST
Build ID: 3.5.0 I20090217-2200

Steps To Reproduce:
1. Right click on plugin.xml.
2. Select PDE Tools > Create Ant Build File
3. In my project, I get an error "A cycle was detected when generating the classpath..."


More information:
Reference bug 251170.  This same problem is fixed in the latest 3.5.0 integration build if you use the File > Export > Plug-in development > Deployable plug-ins and fragments, but it is not fixed when creating an Ant build file.
Comment 1 Andrew Niefer CLA 2009-02-25 10:32:21 EST
UI will need to set the "allowBinaryCycles" property like they do on export if they want this.
Comment 2 Darin Wright CLA 2009-02-25 10:34:28 EST
Seems like we should be consistent.
Comment 3 Curtis Windatt CLA 2009-02-25 10:38:17 EST
Here is something straightforward if you want something other than UI work Ankur.
Comment 4 Chris Aniszczyk CLA 2009-02-25 11:22:01 EST
Why are people using that Ant file btw? It's terrible, filled with hardcoded paths.
Comment 5 Chris Aniszczyk CLA 2009-02-25 11:29:09 EST
Created attachment 126737 [details]
org.eclipse.pde.ui.patch

A patch to add binary cycles support.
Comment 6 Chris Barlock CLA 2009-02-25 11:30:32 EST
1. It is, at least, a starting point.

2. If it stinks, it should be made better.

3. It doesn't really matter.  The incorrect circular reference makes the
"create Ant build file" function useless.  This needs to be fixed.
Comment 7 Chris Aniszczyk CLA 2009-02-25 11:31:56 EST
(In reply to comment #6)
> 1. It is, at least, a starting point.

Starting point for what? You shouldn't need this file if you're using PDE Build.

> 2. If it stinks, it should be made better.

It should be removed.

> 3. It doesn't really matter.  The incorrect circular reference makes the
> "create Ant build file" function useless.  This needs to be fixed.

How about getting rid of your circular references ;)?

Comment 8 Chris Aniszczyk CLA 2009-02-25 11:36:42 EST
(In reply to comment #6)
> 1. It is, at least, a starting point.

Starting point for what? You shouldn't need this file if you're using PDE Build.

> 2. If it stinks, it should be made better.

It should be removed.

> 3. It doesn't really matter.  The incorrect circular reference makes the
> "create Ant build file" function useless.  This needs to be fixed.

How about getting rid of your circular references ;)?
Comment 9 Chris Barlock CLA 2009-02-25 11:41:15 EST
Would love to, but it is buried deep in code I don't own.
Comment 10 Chris Aniszczyk CLA 2009-02-25 11:43:55 EST
(In reply to comment #9)
> Would love to, but it is buried deep in code I don't own.

My first question of about why you're using this file in the first place was never answered. If you're using PDE Build, you shouldn't need to generate this file. The only reason you would generate this build.xml file is if you were trying to hook into some custom build system which is really more difficult than things need to be.
Comment 11 Chris Barlock CLA 2009-02-25 11:46:44 EST
We would use it as a starting point for a build done outside of Eclipse on our
production build servers.  It may be more difficult, but it is a requirement.  We don't ship code built on local machines.

I've no real opinion on your comment that "it should be removed."  Perhaps so, but if it is not, it should work correctly.

Comment 12 Chris Aniszczyk CLA 2009-02-25 11:53:02 EST
(In reply to comment #11)
> We would use it as a starting point for a build done outside of Eclipse on our
> production build servers.  It may be more difficult, but it is a requirement. 
> We don't ship code built on local machines.

I'm not even sure what that means.

I highly recommend you look at using PDE Build to do your builds instead of these generated Ant scripts...

http://www.vogella.de/articles/EclipsePDEBuild/article.html
http://aniefer.blogspot.com/2008/06/example-headless-build-for-rcp-product.html
Comment 13 Chris Barlock CLA 2009-02-25 11:56:26 EST
I will look at it.  Thanks!
Comment 14 Chris Aniszczyk CLA 2009-02-25 12:08:15 EST
done.

> 20090225
Comment 15 Andrew Niefer CLA 2009-02-25 14:01:28 EST
The generated build.xml is meant to be specific to the build it was generated for and we don't generally recommend reusing them.

That said, both org.eclipse.swt.* and org.eclipse.equinox.executable use custom build.xml scripts which are based on editing a build.xml generated this way. 

I also personally use all the time as a debugging aid.  And it is useful to see how the properties in build.properties affect things.