Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Java dependency resolver using Maven's Aether for Java and Ruby
Java Ruby
Failed to load latest commit information.
src fix to_notation method
.gitignore Bundler's platform wont work for gems with multiple platforms :rage:
.rspec
.travis.yml to much maven
CHANGELOG.md Update CHANGELOG.md
Gemfile backfill 105 days from 2014-5-30
LICENSE revert back to a sane structure
PostInstallRakefile revert back to a sane structure
README.md Update README.md
Rakefile
VERSION compile as java 1.7
jar_dependencies.yml just simple logging
pom.xml

README.md

Naether

Build Status

Naether is a Java Dependency Resolver using Maven's Aether that can be used by Ruby or Java.

https://github.com/mguymon/naether

RDoc | JavaDoc | Wiki

Install

Ruby

JRuby is natively supported. Vanilla Ruby uses Rjb to proxy over JNI.

gem install naether

The jar dependencies for Naether will automatically be downloaded when the gem installs.

Custom Maven Repo

You can override the default Maven Repo used in bootstraping Naether by setting the NAETHER_MIRROR environment variable.

NAETHER_MIRROR=http://my.local.repo/m2 gem install naether

The NAETHER_MIRROR environment is also appended to the remote repositories used when resolving dependences.

Java

<dependency>
  <groupId>com.tobedevoured.naether</groupId>
  <artifactId>core</artifactId>
  <version>0.15.0</version>
</dependency>

May have to add the Sonatype Repo if the sync to Maven Central is slow.

<repositories>
  <repository>
    <id>oss.sonatype.org</id>
    <name>Sonatype Repository</name>
    <url>https://oss.sonatype.org/content/groups/public</url>
  </repository>
</repositories>

Usage

Ruby

All of the Naether dependencies are loaded via a Custom ClassLoader.

Bootstraping

Naether jar dependences must be loaded for Naether to work. This is easily done with the bootstrap helper

Naether::Bootstrap.bootstrap_local_repo

Resolving Dependencies

require 'rubygems'
require 'naether'

Naether::Bootstrap.bootstrap_local_repo
naether = Naether.create
naether.dependencies = [ "ch.qos.logback:logback-classic:jar:0.9.29", "junit:junit:jar:4.8.2" ]
naether.resolve_dependencies()

puts naether.dependencies_notation

Will output

["ch.qos.logback:logback-core:jar:0.9.29",
 "ch.qos.logback:logback-classic:jar:0.9.29",
 "junit:junit:jar:4.8.2",
 "org.slf4j:slf4j-api:jar:1.6.1" ]

Additional documentation on Resolving Dependencies

Java

Resolving Dependencies

import com.tobedevoured.naether.api.Naether;
import com.tobedevoured.naether.impl.NaetherImpl;

Naether naether = new NaetherImpl();
naether.addDependency( "ch.qos.logback:logback-classic:jar:0.9.29" );
naether.addDependency( "junit:junit:jar:4.8.2" );
naether.resolveDependencies();
System.out.println( naether.getDependenciesNotation().toString() );

Will output:

["ch.qos.logback:logback-core:jar:0.9.29",
 "ch.qos.logback:logback-classic:jar:0.9.29",
 "junit:junit:jar:4.8.2",
 "org.slf4j:slf4j-api:jar:1.6.1" ]

Additional documentation on Resolving Dependencies

License

Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Something went wrong with that request. Please try again.