Community
Participate
Working Groups
On the AJDT newsgroup, a question was asked about how to get a headless pde build to be aspectj aware. http://dev.eclipse.org/mhonarc/newsLists/news.eclipse.technology.ajdt/msg01849.html This is currently not possible with the current release of AJDT. However, internally, we use a modified pde builder to run our headless builds with the aspectj compiler. This pde builder is not meant to be publicly released. With some modification, I can make this builder public. What kind of interest from the community is there for a headless pde builder for AspectJ? Please vote or comment on this bug so that we can guage its importance. If you require the builder immediately, contact me directly and I can send you our internal builder with instructions on how to use it.
Hi, in a project I am working on we use PDE build headless and we have lots of AspectJ projects. The development is currently based on RSA 7.0.x so it is Eclipse 3.2 based. I made a patch to the pdebuild-ant.jar file to enable PDE to build a whole product with aspects. In the future, I would be glad if I could just use what is there in Eclipse 3.4 and AJDT. So I am voting for this bug.
I need to correct myself regarding the comment I made above. We are using RSA 7.0.x based on Eclipse 3.2 for development but for the actual PDE build I made a patch for Eclipse 3.3 to build our product.
If this enhancement is implemented, it would have to wait until AJDT 1.7 and it would target Eclipse 3.5. Would you be able to use this?
Created attachment 118114 [details] pde-build script Here is the pde-build jar for AspectJ aware headless building in eclipse 3.4. I can't guarantee that it will work in all situations. However, this is what we use to build AJDT itself. To run, replace the file in eclipse/plugins/org.eclipse.pde.build_3.4.1.XXX/lib/pdebuild-ant.jar with this version. Then you can export plugins as usual. Please let me know if you have success with this.
Once we migrate to an eclipse 3.4 based IDE I will provide you with feedback. Unfortunately, I cannot tell you when that will be.
Any progress with this?
Andrew, I tried using the pdebuild-ant.jar you provided but I'm getting a NPE: Caused by: java.lang.NullPointerException at org.eclipse.pde.internal.build.tasks.AJModelBuildScriptGenerator.bundleToCP(AJModelBuildScriptGenerator.java:1542) at org.eclipse.pde.internal.build.tasks.AJModelBuildScriptGenerator.generateCompilationTarget(AJModelBuildScriptGenerator.java:1206) at org.eclipse.pde.internal.build.tasks.AJModelBuildScriptGenerator.generateBuildJarsTarget(AJModelBuildScriptGenerator.java:1043) at org.eclipse.pde.internal.build.tasks.AJModelBuildScriptGenerator.generateBuildScript(AJModelBuildScriptGenerator.java:368) at org.eclipse.pde.internal.build.tasks.AJModelBuildScriptGenerator.generate(AJModelBuildScriptGenerator.java:242) This occurs with eclipse 3.4.1 with ajdt 1.6.1 and 1.6.2 and I think this is related to the bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=244735 Can you provide a jar with the newer AJModelBuildScriptGenerator which is contained in org.eclipse.ajdt.core_1.6.2.20090105113441.jar or give an advice how to do this on my own? I'm also interested in the internal builder you're using.
The version of AJModelBiuldScriptGenerator that you are using is the most recent. Are the weaver, ajde, and aj runtime included in your target platform? Even if these bundles are not actually used in the final release, they are required to be in existance to compile against. Let me know if this works.
I tried that, but the problem persists. The NPE occurs at line AJModelBuildScriptGenerator:1542, method bundleToCP, with the source if(bundle.getName().equals("org.apache.ant")) Since the version here: the http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.ajdt/AJDT_src/org.eclipse.ajdt.core/src/org/eclipse/ajdt/core/exports/AJModelBuildScriptGenerator.java?root=Tools_Project&view=markup contains a not null test on bundle.getSymbolicName() I thought it was newer and maybe could help here, sorry if I mixed things up.
The file you are looking at is not the one that is included in the jar attached to this bug. Similar, but some slight differences. That line is one of the differences. As I said before, this jar was not designed to build anything but AJDT.
Created attachment 122612 [details] New version of jar This version of the jar makes changes to AJModelBuildScriptGenerator so that the null pointer exception should be avoided. Please try this out and let me know if it works for you.
Created attachment 122760 [details] NEW- org.eclipse.ajdt.pde.build plugin This attachment contains the org.eclipse.ajdt.pde.build plugin. This plugin provides aspectj-aware pde headless build capability for eclipse. To use this plugin do the following: 1. unzip the plugin into your eclipse/dropins directory. 2. run eclipse once so that this plugin is recognized and installed by the P2 installer 3. in your headless build script, make sure that the eclipse antrunner points to the org.eclipse.ajdt.pde.build/scripts/build.xml ant script 4. ensure that the following property is available to ant: ajdt.pdebuild.home = <path_to_ajdt.pde_plugin> (you can add this as a vm arg to -Dajdt.pdebuild.home=<path_to_ajdt.pde_plugin>) 5. run your build script Several things to note here: 1. this plugin is meant for *headless* builds only 2. many of the ant tasks available in standard eclipse headless builds are available here, but the names are prefixed with "ajdt.". Eg- eclipse.build becomes ajdt.eclipse.build 3. this plugin includes the sources, so you can browse and see how things are implemented 4. also take a look at the ant scripts Please try this out and if this plugin is sufficient for your purpose, I will include this in AJDT 1.6.3 (perhaps as an optional add-on).
Created attachment 141032 [details] org.eclipse.ajdt.pde.build plugin for 3.5 Updated org.eclipse.ajdt.pde.build plugin for Eclipse 3.5.
Hi, currently I am working in the team of Thomas Hofmann (see above) on the migration of PDE build scripts for Eclipse 3.3 to Eclipse 3.4. Because of that I tried your provided "pdebuild-antnew.jar"-file to solve the descripted problem of not aspectj-aware PDE builds. A new problem occurred while running our script, which includes some targets to sign jars. For that job the class org.eclipse.pde.internal.build.jarprocessor.JarProcessorTask.class is required, but the class couldn't be found. The folder "jarprocessor" exists in the original jar-file, but is missing in your modified version. Is there a reason for that? How is it possible to sign jars wihtout that class? Thanks!
Benjamin, The pde build plugin was never intended to support jar signing (it wasn't our intention *not* to support it either). It was just not implemented. I'll take a look at it this week and see if there is anything I can do about that. You are working on 3.4, right?
Hey Andrew, thanks for the fast response! You are right, I am working on Eclipse 3.4. I await your replay intently.
Hey! Today, I have just tried to solve the problem with jar-signing by copying the jarprocessor-folder from the original pdebuild-ant.jar into your provided one. Obviously, it works!
Hello Andrew, after trying your first described solution with the the pdebuild-antnew.jar, which was successful, I attempted the second way with your org.eclipse.ajdt.pde.build plugin. At the first step, I got an exception. But after some research, I found out, that there is a mistake in the productBuild.xml file in the script folder. In line seven the value of the property "allElementsFile" has to be corrected to "${ajdt.pdebuild.scripts}/productBuild/allElements.xml". The prefix ${ajdt.pdebuild.scripts} is just missing. Now, your plugin in addition with the corrected productBuild.xml is working. It would be great if your plugin gets an regluar one, which is inclusive of the next AJDT releases. Thank you!
Move to the 2.0.2 release.
Working on this now. An optional ajdt-pde feature should be available soon.
Done. Latest dev build for 3.5 stream includes pde build scripts in the update site. Look in the Optional category of the update site.
Hi, I use the buckminster headless build to build my eclipse product. The buckminster build uses a headless eclipse environment to build the products. The problem with the org.eclipse.pde.build is, that it does not implement the required extension point "org.eclipse.core.resources.builders" in order to serve the "org.eclipse.ajdt.core.ajbuilder" buildcommand (in the .project file). Is there a plan to support the org.eclipse.ajdt.core.ajbuilder headlessly? Thanks for your response, Alain
(In reply to comment #22) > Is there a plan to support the org.eclipse.ajdt.core.ajbuilder headlessly? This is not something we have thought about yet, but it is something that we can do. I would appreciate it if you could raise an enhancement request for this.
(In reply to comment #23) Thanks a lot for your answer. This task is very critical at my place, because the migration of our product-build-environment to buckminster will fail if we can't build the plugins using aspectj. Where should I raise this enhancement request? As bug in this bugzila? Could you plese tell me, how long it will take, until it will be possible to get a (dev)release of such a headless-ajbuilder feature? Thanks, Alain.
(In reply to comment #24) > Where should I raise this enhancement request? As bug in > this bugzila? Yes, please do. > Could you plese tell me, how long it will take, until it will be possible to > get a (dev)release of such a headless-ajbuilder feature? I don't want to give any estimates since I don't know the scope of this problem. I have never used Buckminster, and I don't know what the requirements are. If you have some experience with Buckminster and can sketch out a solution or point me in the right direction, this would vastly speed up the process.
> If you have some experience with Buckminster and can sketch out a solution or > point me in the right direction, this would vastly speed up the process. And what I mean here is for you to describe *exactly* what you need. What extension point should AJDT be extending that it is not? What API should it expose that it is not? What precisely is the behavior that you require that is non-existent?
Thanks for your answer. I opened a issue: Bug 297713 - AJDT for Headless Buckminster build process Regards, Alain.
Hi Andrew, I'm am into this once more finally trying to move our PDE build process for an RCP application to RSA 7.5. I started of with the version Benjamin modified. I needed to make some more tweaks (I don't know why) but now it looks like I cannot continue any further. The ajde.classpath in the generated build.xml files is always empty. Therefore, the iajc task is not found. I saw bug 288020 and I wonder if that has to do with it. I would now like to know if there is some newer version that has fixes (especially bug 288020) built into it and where I can find it. I looked in my plugins dir but nothing is there. I would then begin from scratch using the latest version and reporting back what I find one issue at a time.
As you might know RSA 7.5 is based on Eclipse 3.4.x but there are some differences in regard of the location the bundles are stored on disk.
Hi Thomas, The fix for bug 288020 was back ported to 3.4. If you are using RSA as the build Eclipse, make sure that the ajde bundle is in your target platform. You also need to make sure that all of ajde's required bundles are in your target platform. These are: org.apache.ant, org.eclipse.core.resources, org.eclipse.core.runtime, org.eclipse.core.runtime.compatibility, org.eclipse.text, org.aspectj.weaver Please let me know if this helps you. Unfortunately, I cannot spend too much time on this because I am on leave, taking care of my new baby girl. :) However, I would be interested in knowing what changes you made to the build scripts.