[jboss-user] [JBoss Tools (users)] - Re: package archiover and dependency

rob.stryker@jboss.com do-not-reply at jboss.com
Mon May 4 02:08:52 EDT 2009


Max:

The builder only gets called once when a file is changed, not twice. That one time, I find out fileX changed. I adjust x.jar to include the newly modified fileX. However, at no point in this call do I (the archives builder) check if the OUTPUT file is further included in other archives. 

Additionally, it seems when a refresh is called on changed resources after a build, a new builder does *not* get called. I haven't found the documentation on this, but I believe any files changed DURING the build operation BY a builder are *not* considered changed on the next build (whether you use resource API or file API, doesn't matter). 

Using the resource API actually wouldn't fix anything. Even if you change a raw java.io.File, but *REFRESH* the resource, the behaviour should be exactly the same. 

A quick test has just proved to me that at no point does the first Jar ever get passed in to any builder as a changed item. 

For a while a long time ago marshall and I had come up with a way to make references between one output jar and another. This way if jarX changes as a result of fileX changing,   and jarY *should* change as a result of jarX changing, we can accurately model this in the xml configuration.

This happened, though, as he was passing the product off to me and I was making substantial changes to its underlying infrastructure. I'd say that feature was never complete and so never made it into a successful build. In the end it was removed out of concerns over stack overflows and the lack of a proper cycle-finder. 

There are huge amounts of problems in getting this to work. Basically if I wanted to try to do this, I'd need to keep a list of files changed during my portion of the build. The current API doesn't really support returning which files were changed (I'm  already  using the return types  to return success / failure so a full out API change would be required). If it were only able to do zipped deployment it'd be a lot easier but the nature of using truezip to abstract away folder vs archive makes it even MORE difficult for me to get a list of what files change.

To remind you, the reason I'd need this list is to then see if any of these changed / updated output files are in fact included in any OTHER archive's filesets. 

In short, it was decided long ago that this would not be a supported use-case as-is. To do it via references would require changes to the xml descriptor (to allow for references), the UI (to create these reference types) and the builder (to check for these references). To do it solely in the builder without any additional UI or "reference" concept would require changes to the truezip / archives bridge layer and on a coding level would be much more prone to errors and breakages. 

The proper way to use archives for this usecase (for now) is simply to nest the archives together in one configuration. What the user is asking for is not and has not been a supported usecase throughout the entire life of the plugin. 

View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4228208#4228208

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4228208



More information about the jboss-user mailing list