-
Notifications
You must be signed in to change notification settings - Fork 0
/
params.json
6 lines (6 loc) · 10.1 KB
/
params.json
1
2
3
4
5
6
{
"name": "jip",
"tagline": "",
"body": "# jip\r\n\r\n\r\nJip is the jython equivalent of pip to python. It will resolve\r\ndependencies and download jars for your jython environment.\r\n\r\n## License\r\n\r\njip itself is distributed according to **MIT License** .\r\n\r\n## Install\r\n\r\njip is recommended to run within virtualenv, which is a best practice\r\nfor python/jython developers to created a standalone, portable\r\nenvironment. From jip 0.7, you can use jip.embed in the global installation.\r\n\r\n### Install jip within virtualenv\r\n\r\nCreate virtualenv with jython:\r\n\r\n virtualenv -p /usr/local/bin/jython jython-env\r\n\r\nActivate the shell environment:\r\n\r\n cd jython-dev\r\n source bin/activate\r\n\r\nDownload and install jip with pip:\r\n\r\n pip install jip\r\n\r\n### Install jip for global jython (since 0.7)\r\n\r\nDownload jip [from pypi page](http://pypi.python.org/pypi/jip). \r\nThen normally install it with setup.py\r\n\r\n jython setup.py install\r\n\r\n## Usage\r\n\r\n### Install a Java package\r\n\r\njip will resolve dependencies and download jars from maven\r\nrepositories. You can install a Java package just like what you do\r\npython with pip:\r\n\r\n jip install <groupId>:<artifactId>:<version>\r\n\r\nTake spring as example:\r\n\r\n jip install org.springframework:spring-core:3.0.5.RELEASE\r\n\r\n### Resolve dependencies defined in a pom\r\n\r\njip allows you to define dependencies in a maven pom file, which is\r\nmore maintainable than typing install command one by one:\r\n\r\n jip resolve pom.xml\r\n\r\n### Resolve dependencies for an artifact\r\n\r\nWith jip, you can resolve and download all dependencies of an\r\nartifact, without grab the artifact itself (whenever the artifact\r\nis downloadable, for example, just a plain pom). This is especially\r\nuseful when you are about to setup an environment for an artifact.\r\nAlso, java dependencies for a jython package is defined in this\r\nway.\r\n\r\n jip deps info.sunng.gefr:gefr:0.2-SNAPSHOT\r\n\r\n### Update snapshot artifact\r\n\r\nYou can use update command to find and download a new deployed\r\nsnapshot:\r\n\r\n jip update info.sunng.bason:bason-annotation:0.1-SNAPSHOT\r\n\r\n### Run jython with installed java packages in path\r\n\r\nAnother script ``jython-all`` is shipped with jip. To run jython\r\nwith Java packages included in path, just use ``jython-all``\r\ninstead of ``jython``\r\n\r\n### List\r\n\r\nUse ``jip list`` to see artifacts you just installed\r\n\r\n### Remove a package\r\n\r\nYou are suggested to use ``jip remove`` to remove an artifact. This\r\nwill keep library index consistent with file system.\r\n\r\n jip remove org.springframework:spring-core:3.0.5.RELEASE\r\n\r\nCurrently, there is no dependency check in artifact removal. So you should\r\nbe careful when use this command.\r\n\r\n### Clean\r\n\r\n``jip clean`` will remove everything you downloaded, be careful to\r\nuse it.\r\n\r\n### Search\r\n\r\nYou can also search maven central repository with a ``jip search [keyword]``.\r\nThe search service is provided by \r\n`Sonatype's official Maven search <http://search.maven.org>`_ . \r\n\r\n### Persist current environment state\r\n\r\nBefore you distribute you environment, you can use ``freeze`` to persist \r\ncurrent state into a pom file.\r\n\r\n\r\n jip freeze > pom.xml\r\n\r\n\r\n## Configuration\r\n\r\nYou can configure custom maven repository with a dot file, jip will\r\nsearch configurations in the following order:\r\n\r\n\r\n1. ``$VIRTUAL_ENV/.jip_config``, your virtual environment home\r\n2. ``$HOME/.jip_config``, your home\r\n\r\nHere is an example:\r\n\r\n [repos:jboss]\r\n uri=http://repository.jboss.org/maven2/\r\n type=remote\r\n \r\n [repos:local]\r\n uri=~/.m2/repository/\r\n type=local\r\n \r\n [repos:central]\r\n uri=http://repo1.maven.org/maven2/\r\n type=remote\r\n\r\nBe careful that the ``.jip_config`` file will overwrite default settings,\r\nso you must include default local and central repository explicitly.\r\njip will skip repositories once it finds package matches the maven\r\ncoordinator.\r\n\r\nArtifacts will be cached at ``$HOME/.jip`` (``$VIRTUAL_ENV/.jip`` if\r\nyou are using a virtual environment).\r\n\r\nFrom 0.4, you can also define repositories in pom.xml if you use\r\nthe ``resolve`` command. jip will add these custom repositories\r\nwith highest priority.\r\n\r\n### Distribution helpers\r\n\r\nFrom 0.4, you can use jip in your setup.py to simplify jython\r\nsource package distribution. Create ``pom.xml`` in the same directory\r\nwith setup.py. Fill it with your Java dependencies in standard way. \r\nIn this file, you can also define custom repositories. Here is\r\nan example:\r\n\r\n <project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\r\n xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd\">\r\n \r\n ...\r\n\r\n <dependencies>\r\n <dependency>\r\n <groupId>org.slf4j</groupId>\r\n <artifactId>slf4j-api</artifactId>\r\n <version>1.6.1</version>\r\n </dependency>\r\n \r\n <dependency>\r\n <groupId>org.slf4j</groupId>\r\n <artifactId>slf4j-log4j12</artifactId>\r\n <version>1.6.1</version>\r\n </dependency>\r\n\r\n ...\r\n \r\n </dependencies>\r\n \r\n <repositories>\r\n <repository>\r\n <id>sonatype-oss-sonatype</id>\r\n <url>http://oss.sonatype.org/content/repositories/snapshots/</url>\r\n </repository>\r\n </repositories>\r\n </project>\r\n\r\nAnd in your setup.py, use the jip setup wrapper instead of the one\r\nprovided by setuptools or distutils. You can add keyword argument \r\n``pom`` to specify a custom name of the pom file.\r\n\r\n\r\n from jip.dist import setup\r\n\r\nOther than the traditional pom configuration, jip also allows you to \r\ndescribe dependencies in python. You can define a data structure in \r\nyour ``setup.py`` like:\r\n\r\n requires_java = {\r\n 'dependencies':[\r\n ## (groupdId, artifactId, version)\r\n ('org.slf4j', 'slf4j-api', '1.6.1'),\r\n ('org.slf4j', 'slf4j-log4j12', '1.6.1'),\r\n ('info.sunng.soldat', 'soldat', '1.0-SNAPSHOT'),\r\n ('org.apache.mina', 'mina-core', '2.0.2')\r\n ],\r\n 'repositories':[\r\n ('sonatype-oss-snapshot', 'http://oss.sonatype.org/content/repositories/snapshots/')\r\n ]\r\n }\r\n\r\nAnd pass it to jip setup as keyword argument ``requires_java``. Once \r\njip found this argument, it won't try to load a pom file.\r\n\r\n from jip.dist import setup\r\n setup(\r\n ...\r\n requires_java=requires_java,\r\n ...)\r\n\r\nAnother ``resolve`` command was added to setuptools, you can use this \r\ncommand to download all dependencies to library path\r\n\r\n jython setup.py resolve\r\n\r\nAll dependencies will be installed when running\r\n\r\n \r\n jython setup.py install\r\n\r\nSo with jip's ``setup()`` wrapper, ``pip`` will automatically install \r\nwhat your package needs. You can publish your package to python\r\ncheese shop, and there is just one command for everything\r\n\r\n pip install [your-package-name]\r\n\r\n\r\n### Embedded dependency helper\r\n\r\n`jip.embed` is available for both virtualenv and global installation.\r\nYou can descirbe Java dependency in you code, then it will be \r\nresolved on the fly.\r\njip.embed is inspired by Groovy's @Grab.\r\n\r\n from jip.embed import require\r\n\r\n require('commons-lang:commons-lang:2.6')\r\n from org.apache.commons.lang import StringUtils\r\n\r\n StringUtils.reverse('jip rocks')\r\n\r\n## Contact\r\n\r\nIf you have any problem using jip, or feature request for jip,\r\nplease feel free to fire an issue on\r\n`github issue tracker <http://github.com/jiptool7/jip/issues/>`_. You can\r\nalso follow `@Sunng <http://twitter.com/Sunng/>`_ on twitter.\r\n\r\n## Change Notes\r\n\r\n### 0.9.8 (2016-07-27)\r\n\r\n- Minor fixes\r\n\r\n### 0.9 (2015-04-23)\r\n\r\n- Python 3 support\r\n\r\n### 0.8 (2014-03-31)\r\n\r\n- Windows support\r\n\r\n### 0.7 (2011-06-11)\r\n\r\n- All new jip.embed and global installation\r\n- enhanced search\r\n- dry-run option for ``install``, ``deps`` and ``resolve``\r\n- exclusion for ``install`` command and jip.dist\r\n- local maven repository is disabled by default\r\n- improved dependency resolving speed \r\n- jip now maintains a local cache of jars and poms in ``$HOME/.jip/cache/``\r\n- use argparse for better command-line ui \r\n- add some test cases\r\n\r\n### 0.5.1 (2011-05-14)\r\n\r\n- Artifact jar package download in paralell\r\n- User-agent header included in http request\r\n- new command `freeze` to dump current state\r\n- bugfix\r\n\r\n### 0.4 (2011-04-15)\r\n\r\n- New commands available: ``search``, ``deps``, ``list``, ``remove``\r\n- New feature ``jip.dist`` for setuptools integration\r\n- Dependency exclusion support, thanks *vvangelovski*\r\n- Allow project-scoped repository defined in ``pom.xml`` and ``setup.py``\r\n- Code refactoring, now programming friendly\r\n- README converted to reStructuredText\r\n- Migrate to MIT License\r\n\r\n### 0.2.1 (2011-04-07)\r\n\r\n- Improved console output format\r\n- Correct scope dependency management inheritance\r\n- Alpha release of snapshot management, you can update a snapshot artifact\r\n- Environment independent configuration. ``.jip`` for each environment\r\n- Bug fixes\r\n\r\n### 0.1 (2011-01-04)\r\n\r\n- Initial release\r\n\r\n## Links\r\n\r\n- [Don't repeat yourself: Distribute jython packages with jip.dist](http://sunng.info/blog/2011/04/dont-repeat-yourself-distribute-jython-package-with-jip-dist/)\r\n- (**obsolete**) [Introduction to jip 0.1](http://sunng.info/blog/jip-0-1/)\r\n- [Project on Github](http://github.com/sunng87/jip)\r\n- [Package on Python Cheese Shop](http://pypi.python.org/pypi/jip)\r\n\r\n\r\n",
"note": "Don't delete this file! It's used internally to help with page regeneration."
}