Community
Participate
Working Groups
In: Buckminster - Core 1.3.1.r11579 org.eclipse.buckminster.core.feature.feature.group To reproduce: 1. Create an rmap with the following pattern: <rm:searchPath name="blah"> <!--Doesn't matter what provider you use--> <rm:provider componentTypes="eclipse.feature" readerType="git" resolutionFilter=""> <rm:uri format="{0},{1}/features/{2}-feature"> <bc:propertyRef key="workspace.root" /> <bc:replace> <bc:propertyRef key="buckminster.component" /> <bc:match pattern="blah" replacement="foo" /> </bc:replace> <bc:propertyRef key="buckminster.component" /> </rm:uri> <rm:property key="git.remote.uri" value="git://foo" /> <rm:property key="git.remote.name" value="foo" /> </rm:provider> </rm:searchPath> 2. Open in RMAP editor. 3. Fails with: org.eclipse.emf.ecore.xmi.FeatureNotFoundException: Feature 'match' not found. (platform:/resource/org.eclipse.amp.releng/releng/test.rmap, 10, 51) 4. Change line to: <bc:matches pattern="blah" replacement="foo" /> 5. Validates in RMAP editor. 6. But that's inconsistent with documentation and fails to parse (in Hudson for example) with SAXException. Workaround: You need to edit the file by hand.
Here is another case of the rmap editor not following the schema: The problem is with a git provider: <rm:provider componentTypes="unknown" readerType="git"> <rm:uri format="{0}/GDALargeTestFiles"> <bc:propertyRef key="workspace.root"/> </rm:uri> <rm:property key="git.remote.uri" value="git://hudson:9418/GDALargeTestFiles"/> <rm:property key="git.auto.fetch" value="true"/> </rm:provider> Note that, within the provider, the uri element comes first, followed by the two property elements. This is correct according to the schema. If I then edit the rmap using the Buckminster editor, and change anything in the rmap, then when the rmap is saved it reverses the order, and puts the property keys before the uri key. Any subsequent attempt to use the rmap gives errors as the rmap is invalid according to the schema (the workaround is to edit the file by hand to restore the correct order). This is with the Eclipse Buckminster feature 1.3.1.r11621, in Helios SR1.
(In reply to comment #1) I'm glad you mentioned that. I ran into the same issue but forgot to note it here.
And another example of the rmap editor not following the schema: If you add a Documentation element to the rmap as a direct child of the rmap, the <rm:documentation> element is added as the LAST child of the element <rm:rmap xmlns:bc="http://www.eclipse.org/buckminster/Common-1.0" xmlns:rm="http://www.eclipse.org/buckminster/RMap-1.0"> <rm:property key="download_location" mutable="true" value="opengda"/> <rm:locator pattern="^uk\.ac.(diamond|gda)(\..+)+" searchPathRef="gda_core_svn" failOnError="false"/> <rm:searchPath name="gda_core_svn"> blah </rm:searchPath> <rm:documentation>a comment</rm:documentation> </rm:rmap> However, according to the schema it should be the first child, like this: <rm:rmap xmlns:bc="http://www.eclipse.org/buckminster/Common-1.0" xmlns:rm="http://www.eclipse.org/buckminster/RMap-1.0"> <rm:documentation>a comment</rm:documentation> <rm:property key="download_location" mutable="true" value="opengda"/> <rm:locator pattern="^uk\.ac.(diamond|gda)(\..+)+" searchPathRef="gda_core_svn" failOnError="false"/> <rm:searchPath name="gda_core_svn"> blah </rm:searchPath> </rm:rmap>
Also there is a problem with the maven provider and the mapping elements within it <rm:provider xsi:type="maven:MavenProvider" readerType="maven2" componentTypes="osgi.bundle" source="false" mutable="false"> <maven:mappings> <maven:entry name="a" groupId="b" artifactId="c"/> </maven:mappings> </rm:provider>
All issues are now fixed. Partly in the RMAP editor and partly in the Buckminster RMAP xsd. The latter because in the editor, the RMAP and Provider inherits an abstract Property class and that means that the properties will be serialized first. The fix is checked in to the helios-maintenance branch, rev 11650.