Code Monkey home page Code Monkey logo

poisonivy's Introduction

Poison Ivy - Java Library Dependency Resolver and Application Launcher

This library allows Java applications to be delivered without bundling Maven library dependencies with the deliverables. Instead the application is delivered with an ivy.xml file which specifies the library dependencies. On application startup, should libraries require resolution, the libraries are downloaded and the application can be restarted automatically.

Release 1.4 - June 7, 2014

  • Bugfix for library directory override

Release 1.3 - April 11, 2014

  • System.out.println -> System.out.print for resolution output stream
  • Jar'd ivysettings.xml now dealt with properly
  • temp files cleaned up

Release 1.1 - April 8, 2014

  • ivy.xml and ivysettings.xml can now be bundled in an application's jar file. On resolution temp files are written containing the configuration for use with Ivy.
  • added ProcessListener interface to allow classes to receive the output and error streams from the resolution process and the executable process, if specified.

Maven dependency

       <dependency>
           <groupId>com.github.mrstampy</groupId>
           <artifactId>PoisonIvy</artifactId>
           <version>1.4</version>
       </dependency>

The PoisonIvy class can be used in one of three ways:

  • A separate application
  • An embedded class
  • A main class superclass

Parameters

  • -h - Prints help message
  • -ivy [ARG] - The ivy file for library dependency resolution (default: ./ivy.xml)
  • -ivysettings [ARG] - The ivy settings file for library dependency resolution (default: built in settings)
  • -libdir [ARG] - The directory to store the retrieved librarires (default: ./ivylib)
  • -rp [ARG] - The ivy resolve pattern (default: [artifact]-[revision](-[classifier]).[ext])
  • -f - Force clean library retrieval (default: false)
  • -nc - Do not remove source and api documentation after library dependency retrieval (default: clean)
  • -D [ARG] - Java -Dproperty=value command line properties
  • -X [ARG] - Java -Xparm command line properties
  • -mc [ARG] - The main class to execute
  • -mj [ARG] - The application jar to execute

Examples (command line)

-mj MyApplication.jar

-mj MyApplication.jar -X mx1000m -X ms500m

-mc com.my.MainClass -X mx1000m -X ms500m -D my.settings.file=/some/path/and/file

-ivy /path/to/ivy.xml -ivysettings /path/to/ivysettings.xml -libdir /path/to/ivylib -f -nc

Examples (embedded class)

// forces update of libraries using the specified ivy.xml file

new PoisonIvy("-ivy", "myivy.xml", "-f").execute();

// forces update of libraries and (re)starts the Main application

new PoisonIvy("-f", "-mc", "com.my.app.Main").execute();

poisonivy.config

Should no parameters be specified a poisonivy.config file, if it exists, is used to specify the parameters. The first line of the file specifies the parameters as per the command line.

Dependencies

Poison Ivy's dependencies (ivy, slf4j-api and commons-cli) must be included with the application deliverable.

poisonivy's People

Contributors

burtonalexand14 avatar

Watchers

James Cloos avatar Burt Alexander avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.