Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » AJDT » How to obtain org.aspectj.(runtime|weaver) from update site?
How to obtain org.aspectj.(runtime|weaver) from update site? [message #658337] Mon, 07 March 2011 23:58 Go to next message
Eric Jain is currently offline Eric JainFriend
Messages: 266
Registered: July 2009
Senior Member
I have an RCP application that uses the org.aspectj.runtime and org.aspectj.weaver bundles. The update site at http://download.eclipse.org/tools/ajdt/36/update/ has a feature called org.eclipse.contribution.weaving that includes both bundles, but also several other JDT-related bundles. How do I get just the two required bundles (using the standard PDE build tools)?
Re: How to obtain org.aspectj.(runtime|weaver) from update site? [message #658528 is a reply to message #658337] Tue, 08 March 2011 20:32 Go to previous messageGo to next message
Andrew Eisenberg is currently offline Andrew EisenbergFriend
Messages: 382
Registered: July 2009
Senior Member
I'm guessing that you are running the p2 directory app to headlessly install features/bundles. Here is the way that we install IUs during the PDE build of AJDT. With the p2 director, you don't need to specify a feature id, you can specify a bundle and install that. We use the following ant macro:

<!--
    Copyright (c) 2009, 2010 Tasktop Technologies and others.
    All rights reserved. This program and the accompanying materials
    are made available under the terms of the Eclipse Public License v1.0
    which accompanies this distribution, and is available at
    http://www.eclipse.org/legal/epl-v10.html
   
    Contributors:
         Tasktop Technologies - initial API and implementation
         Andrew Eisenberg     - install-bundle macro
 -->
<project name="Download files and provide provisioning for existing eclipse installatins">
	<macrodef name="install-bundle" description="Install a bundle into a given Eclipse">
		<attribute name="eclipse.loc" />
		<attribute name="updatesite.url" />
		<attribute name="install.iu" />

		<sequential>
			<echo message="Installing @{feature.id} into @{eclipse.loc} from @{updatesite.url}" />
			<java fork="true" failonerror="true"
			  classname="org.eclipse.core.launcher.Main">

				<arg line= "-application org.eclipse.equinox.p2.director" />
				<arg line= "-metadataRepository @{updatesite.url}" />
				<arg line= "-artifactRepository @{updatesite.url}" />
				<arg line= "-installIU @{finstall.iu" />
				<arg value="-nosplash" />

				<classpath>
					<fileset dir="@{eclipse.loc}/plugins">
						<include name="org.eclipse.equinox.launcher_*.jar"/>
					</fileset>
				</classpath>
			</java>
		</sequential>
	</macrodef>
</project>


And it can be invoked like this:

		<install-bundle 
			eclipse.loc="${build.dest}/eclipse" 
			updatesite.url="http://download.eclipse.org/tools/ajdt/36/update" 
			feature.id="org.aspectj.runtime" />
		<install-bundle 
			eclipse.loc="${build.dest}/eclipse" 
			updatesite.url="http://download.eclipse.org/tools/ajdt/36/update" 
			feature.id="org.aspectj.weaver" />
Re: How to obtain org.aspectj.(runtime|weaver) from update site? [message #658546 is a reply to message #658528] Tue, 08 March 2011 21:52 Go to previous message
Eric Jain is currently offline Eric JainFriend
Messages: 266
Registered: July 2009
Senior Member
Andrew Eisenberg wrote on Tue, 08 March 2011 15:32
I'm guessing that you are running the p2 directory app to headlessly install features/bundles.


I'm using .target files. This lets me share the configuration between the IDE and headless builds (Tycho).

Target files do have an includeBundles element that could be used to restrict the bundles. I've been reluctant to make use of this so far as PDE often clobbers the list, but perhaps that's the way to go...
Previous Topic:Joinpoint for java.util.List
Next Topic:JST refactory participation
Goto Forum:
  


Current Time: Fri Dec 15 16:06:35 GMT 2017

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

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