Package: jip
Jip is the jython equivalent of pip to python. It will resolve
dependencies and download jars for your jython environment.Licensejip itself is distributed according toMIT License.Installjip is recommended to run within virtualenv, which is a best practice
for python/jython developers to created a standalone, portable
environment. From jip 0.7, you can use jip.embed in the global installation.Install jip within virtualenvCreate virtualenv with jython:virtualenv -p /usr/local/bin/jython jython-envActivate the shell environment:cd jython-dev
source bin/activateDownload and install jip with pip:pip install jipInstall jip for global jython (since 0.7)Download jip frompypi page.
Then install it with setup.pyjython setup.py installUsageInstall a Java packagejip will resolve dependencies and download jars from maven
repositories. You can install a Java package just like what you do
python with pip:jip install <groupId>:<artifactId>:<version>Take spring as example:jip install org.springframework:spring-core:3.0.5.RELEASEResolve dependencies defined in a pomjip allows you to define dependencies in a maven pom file, which is
more maintainable than typing install command one by one:jip resolve pom.xmlResolve dependencies for an artifactWith jip, you can resolve and download all dependencies of an
artifact, without grab the artifact itself (whenever the artifact
is downloadable, for example, just a plain pom). This is especially
useful when you are about to setup an environment for an artifact.
Also, java dependencies for a jython package is defined in this
way.jip deps info.sunng.gefr:gefr:0.2-SNAPSHOTUpdate snapshot artifactYou can use update command to find and download a new deployed
snapshot:jip update info.sunng.bason:bason-annotation:0.1-SNAPSHOTRun jython with installed java packages in pathAnother scriptjython-allis shipped with jip. To run jython
with Java packages included in path, just usejython-allinstead ofjythonListUsejip listto see artifacts you just installedRemove a packageYou are suggested to usejip removeto remove an artifact. This
will keep library index consistent with file system.jip remove org.springframework:spring-core:3.0.5.RELEASECurrently, there is no dependency check in artifact removal. So you should
be careful when use this command.Cleanjip cleanwill remove everything you downloaded, be careful to
use it.SearchYou can also search maven central repository with ajip search [keyword].
The search service is provided bySonatype’s official Maven search.Persist current environment stateBefore you distribute you environment, you can usefreezeto persist
current state into a pom file.jip freeze > pom.xmlConfigurationYou can configure custom maven repository with a dot file, jip will
search configurations in the following order:$VIRTUAL_ENV/.jip_config, your virtual environment home$HOME/.jip_config, your homeHere is an example:[repos:jboss]
uri=http://repository.jboss.org/maven2/
type=remote

[repos:local]
uri=~/.m2/repository/
type=local

[repos:central]
uri=https://repo1.maven.org/maven2/
type=remoteBe careful that the.jip_configfile will overwrite default settings,
so you must include default local and central repository explicitly.
jip will skip repositories once it finds package matches the maven
coordinator.Artifacts will be cached at$HOME/.jip($VIRTUAL_ENV/.jipif
you are using a virtual environment).From 0.4, you can also define repositories in pom.xml if you use
theresolvecommand. jip will add these custom repositories
with highest priority.Distribution helpersFrom 0.4, you can use jip in your setup.py to simplify jython
source package distribution. Createpom.xmlin the same directory
with setup.py. Fill it with your Java dependencies in standard way.
In this file, you can also define custom repositories. Here is
an example:<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

    ...

    <dependencies>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>1.6.1</version>
        </dependency>

        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-log4j12</artifactId>
            <version>1.6.1</version>
        </dependency>

        ...

    </dependencies>

    <repositories>
        <repository>
            <id>sonatype-oss-sonatype</id>
            <url>http://oss.sonatype.org/content/repositories/snapshots/</url>
        </repository>
    </repositories>
</project>And in your setup.py, use the jip setup wrapper instead of the one
provided by setuptools or distutils. You can add keyword argumentpomto specify a custom name of the pom file.from jip.dist import setupOther than the traditional pom configuration, jip also allows you to
describe dependencies in python. You can define a data structure in
yoursetup.pylike:requires_java = {
    'dependencies':[
        ## (groupdId, artifactId, version)
        ('org.slf4j', 'slf4j-api', '1.6.1'),
        ('org.slf4j', 'slf4j-log4j12', '1.6.1'),
        ('info.sunng.soldat', 'soldat', '1.0-SNAPSHOT'),
        ('org.apache.mina', 'mina-core', '2.0.2')
    ],
    'repositories':[
        ('sonatype-oss-snapshot', 'http://oss.sonatype.org/content/repositories/snapshots/')
    ]
}And pass it to jip setup as keyword argumentrequires_java. Once
jip found this argument, it won’t try to load a pom file.from jip.dist import setup
setup(
    ...
    requires_java=requires_java,
    ...)Anotherresolvecommand was added to setuptools, you can use this
command to download all dependencies to library pathjython setup.py resolveAll dependencies will be installed when runningjython setup.py installSo with jip’ssetup()wrapper,pipwill automatically install
what your package needs. You can publish your package to python
cheese shop, and there is just one command for everythingpip install [your-package-name]Embedded dependency helperjip.embed is available for both virtualenv and global installation.
You can descirbe Java dependency in you code, then it will be
resolved on the fly.
jip.embed is inspired by Groovy’s @Grab.from jip.embed import require

require('commons-lang:commons-lang:2.6')
from org.apache.commons.lang import StringUtils

StringUtils.reverse('jip rocks')ContactIf you have any problem using jip, or feature request for jip,
please feel free to fire an issue ongithub issue tracker. You can
also follow@Sunngon twitter.Change NotesNext version - unreleased0.9.16 - 2022-12-200.9.15 - 2020-06-04Fix encoding errors of download from local repositories0.9.14 - 2020-05-25Added Python 3.7 compatibilityFail gracefully if unkown repository typeMaven centralmoved to HTTPS0.9.13 - 2017-07-23Added optioncopy-pomforinstallcommand0.9.12 - 2017-03-20Fix errors when downloading POMs containing umlautsRemove jip.JIP_VERSION. Use jip.__version__ if you need it0.9.11 - 2017-03-11Improve handling of download errors0.9.10 - 2017-03-09Fix .jip/cache not being isolated in virtualenv0.9.9 - 2016-10-31Fix possible crash0.9.8 - 2016-07-27Minor fixes0.9 - 2015-04-23Python 3 support0.8 - 2014-03-31Windows support0.7 - 2011-06-11All new jip.embed and global installationenhanced searchdry-run option forinstall,depsandresolveexclusion forinstallcommand and jip.distlocal maven repository is disabled by defaultimproved dependency resolving speedjip now maintains a local cache of jars and poms in$HOME/.jip/cache/use argparse for better command-line uiadd some test cases0.5.1 - 2011-05-14Artifact jar package download in paralellUser-agent header included in http requestnew commandfreezeto dump current statebugfix0.4 - 2011-04-15New commands available:search,deps,list,removeNew featurejip.distfor setuptools integrationDependency exclusion support, thanksvvangelovskiAllow project-scoped repository defined inpom.xmlandsetup.pyCode refactoring, now programming friendlyREADME converted to reStructuredTextMigrate to MIT License0.2.1 - 2011-04-07Improved console output formatCorrect scope dependency management inheritanceAlpha release of snapshot management, you can update a snapshot
artifactEnvironment independent configuration..jipfor each
environmentBug fixes0.1 - 2011-01-04Initial releaseLinksDon’t repeat yourself: Distribute jython packages with jip.distObsoleteIntroduction to jip 0.1Project on GithubPackage on Python Cheese Shop