Skip to main content
Jump to: navigation, search

Difference between revisions of "Buckminster Maven Reader"

 
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
<noinclude>{{Backlink|Buckminster Project}}</noinclude>
+
<noinclude>{{Backlink|Buckminster Project}}</noinclude> The [[Buckminster_Maven_Reader|maven]] [[Buckminster Component Reader|Component Reader]] is based on the [[Buckminster URL Catalog Reader|url.catalog]] reader that lists all available jar-files in a directory to determine best version. Extended with functionality that maps component names to the maven specific groupId and artifactId. <noinclude>
The [[Buckminster Maven Reader|maven]] [[Buckminster Component Reader|Component Reader]] is based on the [[Buckminster URL Catalog Reader|url.catalog]] reader that lists all available jar-files in a directory to determine best version. Extended with functionality that maps component names to the maven specific groupId and artifactId.
+
<noinclude>
+
 
==Plugin==
 
==Plugin==
 
The maven plugin is based on the url.catalog plugin - See [[Buckminster URL Catalog Reader|URL Catalog Reader]].
 
The maven plugin is based on the url.catalog plugin - See [[Buckminster URL Catalog Reader|URL Catalog Reader]].
 
The maven reader does not yet support all maven 2.0 features.
 
The maven reader does not yet support all maven 2.0 features.
[[Category:Buckminster]]
+
 
[[Category:Buckminster Documentation]]
+
===Supplying username and password for maven repository access===
[[Category:Buckminster Reference]]
+
The maven provider allows you to supply username and password via properties, or directly in the url, to access the repository.
 +
Via url you would have something like the following in your rmap.
 +
 
 +
<source lang="xml">
 +
<searchpath name="maven">
 +
  <provider source="false" mutable="false" componenttypes="osgi.bundle" readertype="maven2" xsi:type="mp:MavenProvider">
 +
    <uri format="http://username:password@my.hosted.maven.repo/repos/public/"></uri>
 +
    <mp:mappings>
 +
      <mp:entry ...
 +
        ...
 +
      </mp:mappings>
 +
    </provider>
 +
</searchpath>
 +
</source>
 +
 
 +
''Since buckminster 1.5.0.v20130207-0733''
 +
 
 +
Obviously you might not want your credentials in plain text in the rmap. To accommodate this you can pass your credentials via property elements, using keys 'maven.username' and 'maven.password'. The values can be property references which you can pass to the rmap through the usual property mechanisms (rmap, cquery, property file etc). This can be done as follows:
 +
 
 +
<source lang="xml">
 +
<searchpath name="maven">
 +
  <provider source="false" mutable="false" componenttypes="osgi.bundle" readertype="maven2" xsi:type="mp:MavenProvider">
 +
    <bc:property key="maven.username" value="${my.maven.username}" />
 +
    <bc:property key="maven.password" value="${my.maven.password}" />
 +
    <uri format="http://my.hosted.maven.repo/repos/public/"></uri>
 +
    <mp:mappings>
 +
      <mp:entry ...
 +
        ...
 +
      </mp:mappings>
 +
    </provider>
 +
</searchpath>
 +
</source>
 +
 
 +
 
 +
 
 +
[[Category:Buckminster Technical Reference]]
 
{{BMTodo|More maven information needed - and examples}}
 
{{BMTodo|More maven information needed - and examples}}
 
</noinclude>
 
</noinclude>

Latest revision as of 18:48, 7 February 2013

< To: Buckminster Project
The maven Component Reader is based on the url.catalog reader that lists all available jar-files in a directory to determine best version. Extended with functionality that maps component names to the maven specific groupId and artifactId.

Plugin

The maven plugin is based on the url.catalog plugin - See URL Catalog Reader. The maven reader does not yet support all maven 2.0 features.

Supplying username and password for maven repository access

The maven provider allows you to supply username and password via properties, or directly in the url, to access the repository. Via url you would have something like the following in your rmap.

 <searchpath name="maven">
   <provider source="false" mutable="false" componenttypes="osgi.bundle" readertype="maven2" xsi:type="mp:MavenProvider">
     <uri format="http://username:password@my.hosted.maven.repo/repos/public/"></uri>
     <mp:mappings>
       <mp:entry ...
        ...
      </mp:mappings>
    </provider>
 </searchpath>

Since buckminster 1.5.0.v20130207-0733

Obviously you might not want your credentials in plain text in the rmap. To accommodate this you can pass your credentials via property elements, using keys 'maven.username' and 'maven.password'. The values can be property references which you can pass to the rmap through the usual property mechanisms (rmap, cquery, property file etc). This can be done as follows:

 <searchpath name="maven">
   <provider source="false" mutable="false" componenttypes="osgi.bundle" readertype="maven2" xsi:type="mp:MavenProvider">
     <bc:property key="maven.username" value="${my.maven.username}" />
     <bc:property key="maven.password" value="${my.maven.password}" />
     <uri format="http://my.hosted.maven.repo/repos/public/"></uri>
     <mp:mappings>
       <mp:entry ...
        ...
      </mp:mappings>
    </provider>
 </searchpath>

More maven information needed - and examples

Back to the top