Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "Hello XML World Example (Buckminster)"

Line 19: Line 19:
 
</pre>
 
</pre>
  
* The first three lines are the usual XML incantations - this is XML, and this is the syntax of the XML - i.e. CQuery-1.0.
+
This is what the XML in the CQUERY means:
*  
+
* The first three lines are the usual XML incantations - this is XML, and this is the syntax of the XML - i.e. CQuery-1.0 and the namespace is called "cq".
 +
* Next line declares where the resourcemap to use when resolving components is found (we will look at the resource map next).
 +
* Next line states that the wanted (root) component is called <tt>org.demo.hello.xml.world</tt>, that is is a plugin and that it follows the OSGi versioning scheme.
 +
* Then there are two advisor node lines. The first declares that the demo component should be re-materialized even if it already has been materialized (i.e. give me a fresh copy). The second declares that components with "tada" in their name should reuse already materialized results.
  
 +
For more details see [[Buckminster Component Query|CQUERY]]
 +
==The RMAP==
 +
This is what the RMAP looks like:
 +
<pre>
 +
<?xml version="1.0" encoding="UTF-8"?>
 +
<rm:rmap
 +
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 +
    xmlns:rm="http://www.eclipse.org/buckminster/RMap-1.0"
 +
    xmlns:pv="http://www.eclipse.org/buckminster/Provider-1.0"
 +
    xmlns:mp="http://www.eclipse.org/buckminster/MavenProvider-1.0"
 +
    xmlns:bc="http://www.eclipse.org/buckminster/Common-1.0">
 +
 +
    <rm:searchPath name="default">
 +
    <rm:provider readerType="cvs" componentType="eclipse-project" mutable="true" source="true">
 +
        <pv:uri format=":pserver:anonymous@dev.eclipse.org:/cvsroot/technology,org.eclipse.buckminster/org.eclipse.buckminster/demo/{0}">
 +
        <bc:propertyRef key="buckminster.component" />
 +
    </pv:uri>
 +
</rm:provider>
 +
    </rm:searchPath>
 +
 +
    <rm:searchPath name="maven">
 +
    <rm:provider xsi:type="mp:MavenProvider" readerType="maven" componentType="maven" mutable="false" source="false">
 +
    <pv:uri format="http://www.ibiblio.org/maven"/>
 +
<mp:mappings>
 +
<mp:entry name="se.tada.util.sax" groupId="se.tada" artifactId="tada-sax"/>
 +
</mp:mappings>
 +
</rm:provider>
 +
    </rm:searchPath>
 +
 +
    <rm:locator searchPathRef="maven" pattern="^se\.tada\..*" />
 +
    <rm:locator searchPathRef="default" pattern="^org\.demo\..*" />
 +
 +
</rm:rmap>
 +
</pre>
 +
 +
This is what the RMAP XML means:
 +
* The 7 first lines declares the name spaces and syntax of the rmap and the repository providers needed.
 
{{BMTodo|Describe what the demo does}}
 
{{BMTodo|Describe what the demo does}}
 
[[Category:Buckminster]]
 
[[Category:Buckminster]]
 
[[Category:Buckminster Examples]]
 
[[Category:Buckminster Examples]]

Revision as of 10:25, 9 October 2006

< To: Buckminster Project
This examples shows several Buckminster features in action.

To run the example, use the File > Open dialog in Eclipse, and enter this URL:

That will start the Buckminster materialization of the project.

The CQUERY

The CQuery looks like this:

<?xml version="1.0" encoding="UTF-8"?>
<cq:componentQuery xmlns:cq="http://www.eclipse.org/buckminster/CQuery-1.0"
resourceMap="http://www.eclipse.org/buckminster/samples/rmaps/demo.rmap">
    <cq:rootRequest name="org.demo.hello.xml.world" category="plugin" versionType="OSGi"/>
    <cq:advisorNode namePattern="org\.demo\..*" whenNotEmpty="OVERWRITE" useInstalled="false" useMaterialization="false"/>
    <cq:advisorNode namePattern="se\.tada\..*" whenNotEmpty="REUSE" useInstalled="false"/>
</cq:componentQuery>

This is what the XML in the CQUERY means:

  • The first three lines are the usual XML incantations - this is XML, and this is the syntax of the XML - i.e. CQuery-1.0 and the namespace is called "cq".
  • Next line declares where the resourcemap to use when resolving components is found (we will look at the resource map next).
  • Next line states that the wanted (root) component is called org.demo.hello.xml.world, that is is a plugin and that it follows the OSGi versioning scheme.
  • Then there are two advisor node lines. The first declares that the demo component should be re-materialized even if it already has been materialized (i.e. give me a fresh copy). The second declares that components with "tada" in their name should reuse already materialized results.

For more details see CQUERY

The RMAP

This is what the RMAP looks like:

<?xml version="1.0" encoding="UTF-8"?>
<rm:rmap
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:rm="http://www.eclipse.org/buckminster/RMap-1.0"
    xmlns:pv="http://www.eclipse.org/buckminster/Provider-1.0"
    xmlns:mp="http://www.eclipse.org/buckminster/MavenProvider-1.0"
    xmlns:bc="http://www.eclipse.org/buckminster/Common-1.0">

    <rm:searchPath name="default">
    	<rm:provider readerType="cvs" componentType="eclipse-project" mutable="true" source="true">
    	    <pv:uri format=":pserver:anonymous@dev.eclipse.org:/cvsroot/technology,org.eclipse.buckminster/org.eclipse.buckminster/demo/{0}">
	        <bc:propertyRef key="buckminster.component" />
	    </pv:uri>
	</rm:provider>
    </rm:searchPath>

    <rm:searchPath name="maven">
    	<rm:provider xsi:type="mp:MavenProvider" readerType="maven" componentType="maven" mutable="false" source="false">
    		<pv:uri format="http://www.ibiblio.org/maven"/>
		<mp:mappings>
			<mp:entry name="se.tada.util.sax" groupId="se.tada" artifactId="tada-sax"/>
		</mp:mappings>
	</rm:provider>
    </rm:searchPath>

    <rm:locator searchPathRef="maven" pattern="^se\.tada\..*" />
    <rm:locator searchPathRef="default" pattern="^org\.demo\..*" />

</rm:rmap>

This is what the RMAP XML means:

  • The 7 first lines declares the name spaces and syntax of the rmap and the repository providers needed.

Describe what the demo does

Back to the top