Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Buckminster » Materializing components with "exotic" versions
Materializing components with "exotic" versions [message #380059] Sat, 20 September 2008 11:17 Go to next message
Ismael Teijeiro Florez is currently offline Ismael Teijeiro FlorezFriend
Messages: 12
Registered: July 2009
Junior Member
Hi,

As I said in the previous message I'm working on the IAM / Buckminster
integration, and I intend to generate a CQUERY and a RMAP from a
component's pom.xml so it can be materialized by Buckminster.

I need to materialize specific versions of components and I can't always
rely on version transformations (that way it would be impossible to fully
automatize the CQUERY and RMAP generation and, at the same time, to be
sure that Buckminster finds the requested version in the corresponding
repository). So I'd like to look directly for the name of the version as
it appears in the SVN/CVS connection (for instance, in this connection
" http://svn.apache.org/repos/asf/logging/log4j/tags/v1.3alpha 8", the
version I would be looking for is "v1.3alpha8").

The CQUERY's root request would be generated by a piece of code similar to
the following:

rootRequest = new ComponentRequest( "log4j", "unknown",
"[v1.3alpha8,v1.3alpha8]", IVersionType.STRING );

And the corresponding RMAP is this one:

<rmap xmlns="http://www.eclipse.org/buckminster/RMap-1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:bc="http://www.eclipse.org/buckminster/Common-1.0"
xmlns:mp="http://www.eclipse.org/buckminster/MavenProvider-1.0">
<searchPath name="log4j">
<provider readerType="svn" componentTypes="unknown" source="true">
<uri format="http://svn.apache.org/repos/asf/logging/log4j/trunk"/>
<versionConverter type="tag">
<transform fromPattern="^(.+)$" fromReplacement="$1"
toPattern="^(.+)$" toReplacement="$1"/>
</versionConverter>
</provider>
</searchPath>
<locator searchPathRef="log4j" pattern="log4j"/>
</rmap>

Of course, I won't be writing this message if everything was ok :-) This
is Buckminster's debug output when I execute the query:

log4j:unknown/[v1.3alpha8,v1.3alpha8]#String: Using resolver rmap
Downloading file:/home/isma/dev/xxx/foo.rmap
log4j:unknown/[v1.3alpha8,v1.3alpha8]#String: Using resource map
file:/home/xxx/foo.rmap
log4j:unknown/[v1.3alpha8,v1.3alpha8]#String: Using search path log4j
log4j:unknown/[v1.3alpha8,v1.3alpha8]#String: Trying provider
svn(http://svn.apache.org/repos/asf/logging/log4j/trunk)
log4j:unknown/[v1.3alpha8,v1.3alpha8]#String: Using version converter tag.
trunk/head will not be considered
log4j:unknown/[v1.3alpha8,v1.3alpha8]#String: tags will be searched
Listing remote folder
http://svn.apache.org/repos/asf/logging/log4j/tags#HEAD
log4j:unknown/[v1.3alpha8,v1.3alpha8]#String: Rejecting provider
svn(http://svn.apache.org/repos/asf/logging/log4j/trunk): No component
match was found
log4j:unknown/[v1.3alpha8,v1.3alpha8]#String: No provider was found that
could resolve the request
ERROR [0001] : No suitable provider for component
log4j:unknown/[v1.3alpha8,v1.3alpha8]#String was found in searchPath log4j
ERROR [0001] : Rejecting provider
svn(http://svn.apache.org/repos/asf/logging/log4j/trunk): No component
match was found
Attempt to use an unresolved node. Request is
log4j:unknown/[v1.3alpha8,v1.3alpha8]#String

I supposed I've missed some important point when I read the documentation,
but I just can't see it... Oh, the tag I'm looking for in this example is
here indeed: http://svn.apache.org/repos/asf/logging/log4j/tags/v1.3alpha 8/

Thanks in advance for your help!
Re: Materializing components with "exotic" versions [message #380060 is a reply to message #380059] Sat, 20 September 2008 14:43 Go to previous messageGo to next message
Thomas Hallgren is currently offline Thomas HallgrenFriend
Messages: 3240
Registered: July 2009
Senior Member
Hi Ismael,
The VersionConverter will attempt to create versions of type OSGi if nothing else is
specified. In this case, try using

<versionConverter type="tag" versionType="String">
<transform fromPattern="^(.+)$" fromReplacement="$1" toPattern="^(.+)$"
toReplacement="$1"/>
</versionConverter>

You may wish to use Triplet instead of String. The Triplet parser should be able to
understand a version like 1.3alpha8 and will give you better magnitude comparisons then
the String version. You will need to alter the to/from patterns slightly to accommodate this:

<versionConverter type="tag" versionType="Triplet">
<transform fromPattern="^v(.+)$" fromReplacement="$1" toPattern="^(.+)$"
toReplacement="v$1"/>
</versionConverter>

rootRequest = new ComponentRequest( "log4j", "unknown", "[1.3alpha8,1.3alpha8]",
IVersionType.TRIPLET);

Regards,
Thomas Hallgren


Ismael Teijeiro Florez wrote:
> Hi,
>
> As I said in the previous message I'm working on the IAM / Buckminster
> integration, and I intend to generate a CQUERY and a RMAP from a
> component's pom.xml so it can be materialized by Buckminster.
>
> I need to materialize specific versions of components and I can't always
> rely on version transformations (that way it would be impossible to
> fully automatize the CQUERY and RMAP generation and, at the same time,
> to be sure that Buckminster finds the requested version in the
> corresponding repository). So I'd like to look directly for the name of
> the version as it appears in the SVN/CVS connection (for instance, in
> this connection
> " http://svn.apache.org/repos/asf/logging/log4j/tags/v1.3alpha 8", the
> version I would be looking for is "v1.3alpha8").
>
> The CQUERY's root request would be generated by a piece of code similar
> to the following:
>
> rootRequest = new ComponentRequest( "log4j", "unknown",
> "[v1.3alpha8,v1.3alpha8]", IVersionType.STRING );
>
> And the corresponding RMAP is this one:
>
> <rmap xmlns="http://www.eclipse.org/buckminster/RMap-1.0"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:bc="http://www.eclipse.org/buckminster/Common-1.0"
> xmlns:mp="http://www.eclipse.org/buckminster/MavenProvider-1.0">
> <searchPath name="log4j">
> <provider readerType="svn" componentTypes="unknown" source="true">
> <uri format="http://svn.apache.org/repos/asf/logging/log4j/trunk"/>
> <versionConverter type="tag">
> <transform fromPattern="^(.+)$" fromReplacement="$1"
> toPattern="^(.+)$" toReplacement="$1"/>
> </versionConverter>
> </provider>
> </searchPath>
> <locator searchPathRef="log4j" pattern="log4j"/>
> </rmap>
>
> Of course, I won't be writing this message if everything was ok :-) This
> is Buckminster's debug output when I execute the query:
>
> log4j:unknown/[v1.3alpha8,v1.3alpha8]#String: Using resolver rmap
> Downloading file:/home/isma/dev/xxx/foo.rmap
> log4j:unknown/[v1.3alpha8,v1.3alpha8]#String: Using resource map
> file:/home/xxx/foo.rmap
> log4j:unknown/[v1.3alpha8,v1.3alpha8]#String: Using search path log4j
> log4j:unknown/[v1.3alpha8,v1.3alpha8]#String: Trying provider
> svn(http://svn.apache.org/repos/asf/logging/log4j/trunk)
> log4j:unknown/[v1.3alpha8,v1.3alpha8]#String: Using version converter
> tag. trunk/head will not be considered
> log4j:unknown/[v1.3alpha8,v1.3alpha8]#String: tags will be searched
> Listing remote folder
> http://svn.apache.org/repos/asf/logging/log4j/tags#HEAD
> log4j:unknown/[v1.3alpha8,v1.3alpha8]#String: Rejecting provider
> svn(http://svn.apache.org/repos/asf/logging/log4j/trunk): No component
> match was found
> log4j:unknown/[v1.3alpha8,v1.3alpha8]#String: No provider was found that
> could resolve the request
> ERROR [0001] : No suitable provider for component
> log4j:unknown/[v1.3alpha8,v1.3alpha8]#String was found in searchPath log4j
> ERROR [0001] : Rejecting provider
> svn(http://svn.apache.org/repos/asf/logging/log4j/trunk): No component
> match was found
> Attempt to use an unresolved node. Request is
> log4j:unknown/[v1.3alpha8,v1.3alpha8]#String
>
> I supposed I've missed some important point when I read the
> documentation, but I just can't see it... Oh, the tag I'm looking for in
> this example is here indeed:
> http://svn.apache.org/repos/asf/logging/log4j/tags/v1.3alpha 8/
>
> Thanks in advance for your help!
>
Re: Materializing components with "exotic" versions [message #380062 is a reply to message #380060] Sat, 20 September 2008 14:53 Go to previous message
Ismael Teijeiro Florez is currently offline Ismael Teijeiro FlorezFriend
Messages: 12
Registered: July 2009
Junior Member
Ok, that worked! Thanks for replying so fast (and on Saturday :-) ) and
for the extra information too.

Regards,

Ismael
Previous Topic:Version rejected (when it seems it should not be rejected)
Next Topic:Buckminster for Europa stalls during install command
Goto Forum:
  


Current Time: Thu Apr 25 09:28:41 GMT 2024

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

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

Back to the top