Kevoree :: Resolver

Kevoree :: Basic-maven-resolver

License

License

Categories

Categories

Maven Build Tools
GroupId

GroupId

org.kevoree
ArtifactId

ArtifactId

org.kevoree.maven.resolver
Last Version

Last Version

20
Release Date

Release Date

Type

Type

jar
Description

Description

Kevoree :: Resolver
Kevoree :: Basic-maven-resolver
Project URL

Project URL

https://github.com/dukeboard/basic-maven-resolver.git
Source Code Management

Source Code Management

http://github.com/dukeboard/basic-maven-resolver.git

Download org.kevoree.maven.resolver

How to add to project

<!-- https://jarcasting.com/artifacts/org.kevoree/org.kevoree.maven.resolver/ -->
<dependency>
    <groupId>org.kevoree</groupId>
    <artifactId>org.kevoree.maven.resolver</artifactId>
    <version>20</version>
</dependency>
// https://jarcasting.com/artifacts/org.kevoree/org.kevoree.maven.resolver/
implementation 'org.kevoree:org.kevoree.maven.resolver:20'
// https://jarcasting.com/artifacts/org.kevoree/org.kevoree.maven.resolver/
implementation ("org.kevoree:org.kevoree.maven.resolver:20")
'org.kevoree:org.kevoree.maven.resolver:jar:20'
<dependency org="org.kevoree" name="org.kevoree.maven.resolver" rev="20">
  <artifact name="org.kevoree.maven.resolver" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.kevoree', module='org.kevoree.maven.resolver', version='20')
)
libraryDependencies += "org.kevoree" % "org.kevoree.maven.resolver" % "20"
[org.kevoree/org.kevoree.maven.resolver "20"]

Dependencies

compile (1)

Group / Artifact Type Version
org.kevoree.log : org.kevoree.log jar 1

test (1)

Group / Artifact Type Version
junit : junit jar 4.11

Project Modules

There are no modules declared in this project.

basic-maven-resolver

A minimal but efficient and portable (self-contained) maven URL resolver. Usable on Java and Dalvik VM.

Why a minimal maven resolver ?

Because Aether is a very complex project, heavy for small devices. In another hand maven repository is very used, well described, and a defacto standard for continuous delivery.

So this minimal resolver aims a performing one only task, resolve a artefact remotely and use a local cache on disk for efficiency.

With an only one dependency (only one class as a logger) this minimal resolver can be reused in many projects. It's easy embedded and tested in Java JVM, or in a Dalvik VM.

How to use ? (Last version : 3)

<dependency>
    <groupId>org.kevoree</groupId>
    <artifactId>org.kevoree.maven.resolver</artifactId>
    <version>REPLACE_LOG_VERSION</version>
</dependency>

Then in your Java code :

Create a resolver instance :

MavenResolver resolver = new MavenResolver();
//optionaly set the base pah (by default userdir/.m2/repository)
resolver.setBasePath("/your_cache_path");

Resolve an artifact : URL Pattern : mvn:groupID:artID:version[:ext]

File cachedFile = resolver.resolve("mvn:org.kevoree.log:org.kevoree.log:1:jar",Arrays.asList("https://oss.sonatype.org/content/groups/public/"));

Or using splitted strings :

File cachedFile = resolver.resolve("org.kevoree.log","org.kevoree.log", "1", "jar",Arrays.asList("https://oss.sonatype.org/content/groups/public/"));

How to manage proxy ?

Sometimes, you need to handle proxy connection to access the Internet. In that case, you need to provide some extra information to the Java Virtual Machine to be able to use this proxy and acces the Internet and so to use our maven resolver.

Basically, you need to specify some system properties. The following lines give you examples to use http://myproxy:myproxyport as the proxy url:

java -Dhttp.useProxy=true -Dhttp.proxyHost=htp://myproxy:myproxyport -jar myjar
java -Dhttp.useProxy=true -Dhttp.proxyHost=myproxy -Dhttp.proxyPort=myproxyport -jar myjar

The following web page give you detailed information of the potential system properties that you can use:

http://docs.oracle.com/javase/7/docs/api/java/net/doc-files/net-properties.html

That's all :-)

Versions

Version
20
19
18
17
16
15
14
12
11
10
9
8
7
6
5
4
3
2
1