Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [buckminster-dev] Downloading source jars

Hi Ed,
I have a couple of inline comments.

On 03/04/2010 03:50 PM, Ed Kohlwey wrote:
Hi,
First of all, I apologize if this is not the correct place to ask this
question. I attempted to ask this question via the newsgroup, but was
unable to get my bugzilla account to log in to them.

I would like to materialize all of the projects my organization is
maintaining to the workspace, and materialize the dependency jars
(including source jars) to an external target installation. Presently,
my scheme works, except I have been unable to materialize the source
jars to the target. Buckminster is being invoked by right clicking on
the mspec file and selecting "Import". The rmap below is one of two
rmaps thats aggregated to actually run the query. The other rmap uses a
filter pattern for "com\.myArtifacts\.", and the eclipse plugins rmap is
used as a "catch all". The other files (and the rmap). The dependencies
on eclipse artifacts are declared in the bundle MANIFEST.MF's for my
artifacts. I have tried setting "cbi.include.source=true" in the CQUERY
properties section as well.

The cbi.include.source only applies when you perform an action. An better name for it would perhaps be "cbi.generate.source.bundles.and.features" since that's what it really means. It is not looked at during resolution so having it in the CQUERY will have no effect.


<?xml version="1.0" encoding="UTF-8"?>
<md:mspec xmlns:md="http://www.eclipse.org/buckminster/MetaData-1.0";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xsi:schemaLocation="http://www.eclipse.org/buckminster/MetaData-1.0
http://www.eclipse.org/buckminster/schemas/metadata-1.0.xsd";
materializer="p2"
installLocation="${user.home}/my-target"
name="com.myArtifacts.root:osgi.bundle:1.0.0.qualifier"
url="workspace_and_target.cquery">
<md:mspecNode materializer="workspace"
  conflictResolution="UPDATE" namePattern="com\.myArtifacts\.*">
</md:mspecNode>
</md:mspec>

I would advice you to drop the 'installLocation' for the p2 materializer and instead make sure that the active target platform has one "Directory Location". If no installLocation is given, then Buckminster will select the active target platform.

I would also advice against using a namePattern for the workspace bundles and instead use the filter:

 <md:mspecNode materializer="workspace" filter="(buckminster.source=true)"/>

In essence, that means that if the RMAP provider has source="true", then the result will end up in the workspace.

and the CQUERY

<?xml version="1.0" encoding="UTF-8"?>
<cq:componentQuery
xmlns:cq="http://www.eclipse.org/buckminster/CQuery-1.0";
resourceMap="workspace_and_target.rmap"
properties="testapp_locations.properties" shortDesc="Using This CQUERY">
<cq:documentation xmlns="http://www.w3.org/1999/xhtml";></cq:documentation>
<cq:rootRequest name="com.myArtifacts.root" componentType="osgi.bundle"/>
<cq:property key="target.arch" value="*"/>
<cq:property key="target.os" value="*"/>
<cq:property key="target.ws <http://target.ws>" value="*"/>
<cq:advisorNode namePattern=".*" sourceLevel="DESIRE"
useTargetPlatform="false" useWorkspace="false"/>
<cq:advisorNode namePattern="com\.myArtifacts\..*"
mutableLevel="REQUIRE" sourceLevel="REQUIRE" useTargetPlatform="false"/>
</cq:componentQuery>

Only one advisorNode will be selected for any given component and that's the first advisorNode that matches. You have a node here with the pattern ".*" (match all) which means that all components will use that node. Nodes declared after that node will never be used.

and finally, the relevant RMAP


I suggest you remove the source="true" and "?importType=source" here. From Buckminsters perspective, you are importing a binary jar file into the target platform. The fact that it contains source files is not relevant here.

The source="true" should typically only be used with SCM type providers (cvs, svn, etc.) or if you really want to import a source bundle and expand it as a project into your workspace.

Regards,
Thomas Hallgren



<?xml version="1.0" encoding="UTF-8"?>
<rmap xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xmlns="http://www.eclipse.org/buckminster/RMap-1.0";
xmlns:bc="http://www.eclipse.org/buckminster/Common-1.0";
xmlns:mp="http://www.eclipse.org/buckminster/MavenProvider-1.0";
xmlns:pp="http://www.eclipse.org/buckminster/PDEMapProvider-1.0";>
<searchPath name="org.eclipse.galileo.updates">
<provider readerType="eclipse.import"
componentTypes="osgi.bundle,eclipse.feature"
mutable="false" source="false">
<uri
format="http://download.eclipse.org/eclipse/updates/3.5?importType=source";
/>
</provider>
</searchPath>
<searchPath name="org.eclipse.galileo.download">
<provider readerType="eclipse.import"
componentTypes="osgi.bundle,eclipse.feature"
mutable="false" source="true">
<uri
format="http://download.eclipse.org/releases/galileo?importType=source"; />
</provider>
</searchPath>
<searchPath name="org.eclipse.galileo.buckminster">
<provider readerType="eclipse.import"
componentTypes="osgi.bundle,eclipse.feature"
mutable="false" source="false">
<uri
format="http://download.eclipse.org/tools/buckminster/updates-3.5?importType=source";
/>
</provider>
</searchPath>
<searchPath name="org.eclipse.galileo.epp">
<provider readerType="eclipse.import"
componentTypes="osgi.bundle,eclipse.feature"
mutable="false" source="false">
<uri
format="http://download.eclipse.org/technology/epp/packages/galileo?importType=source";
/>
</provider>
</searchPath>
<searchPath name="org.eclipse.swtbot">
<provider readerType="eclipse.import"
componentTypes="osgi.bundle,eclipse.feature"
mutable="false" source="false">
<uri
format="http://download.eclipse.org/technology/swtbot/galileo/dev-build/update-site?importType=source";
/>
</provider>
</searchPath>
<searchPath name="org.tigris.subclipse">
<provider readerType="eclipse.import"
componentTypes="osgi.bundle,eclipse.feature"
mutable="false" source="false">
<uri format="http://subclipse.tigris.org/update_1.6.x?importType=source"; />
</provider>
</searchPath>
<searchPath name="edu.umd.cs.findbugs">
<provider readerType="eclipse.import"
componentTypes="osgi.bundle,eclipse.feature"
mutable="false" source="false">
<uri format="http://findbugs.cs.umd.edu/eclipse?importType=source"; />
</provider>
</searchPath>
<searchPath name="org.eclipse.orbit">
<provider readerType="eclipse.import"
componentTypes="osgi.bundle,eclipse.feature"
mutable="false" source="false">
<uri format="http://download.eclipse.org/tools/orbit/downloads/drops/R20100114021427/updateSite?importType=source";
/>
</provider>
</searchPath>
<locator searchPathRef="org.eclipse.galileo.buckminster"
pattern="org\.eclipse\.buckminster(\..*)?" />
<locator searchPathRef="org.eclipse.swtbot"
pattern="org\.eclipse\.swtbot(\..*)?" />
<locator searchPathRef="org.tigris.subclipse"
pattern="org\.tigris(\..*)?" />
<locator searchPathRef="edu.umd.cs.findbugs"
pattern="edu\..umd\.cs\.findbugs(\..*)?" />
<locator searchPathRef="org..eclipse.galileo.epp" failOnError="false" />
<locator searchPathRef="org.eclipse.galileo.updates"
failOnError="false" />
<locator searchPathRef="org.eclipse.galileo.download" failOnError="false" />
<locator searchPathRef="org.eclipse.orbit" />
</rmap>




Back to the top