Miss any of our Open RFC calls?Watch the recordings here! »

node-java-maven-simple

0.0.1 • Public • Published

Build Status npm version

node-java-maven

从 node-java-maven改造而来, 删除了部分功能。 不会递归下载依赖。 直接依据metadata.xml下载最新的jar包

  • Install node-java-maven

      npm install node-java-maven
    
  • Add a java key to your package.json

  "java": {
    "repositories": [
      {
        "id": "maven-central",
        "url": "http://192.168.10.44:8081/nexus/content/repositories/public/",
        "credentials": {
          "username": "user",
          "password": "pass"
        }
      }
    ],
    "dependencies": [
      {
        "groupId": "nurse",
        "artifactId": "cdss-api",
        "version": "1.0.0-SNAPSHOT"
      }
    ],
    "localRepository": "file"
  },
  • Run node-java-maven

      ./node_modules/.bin/node-java-maven
    
  • 在下载完成后进行其他操作

      var java = require('java');
      var mvn = require('node-java-maven');
    
      mvn(function(err, mvnResults) {
        if (err) {
          return console.error('could not resolve maven dependencies', err);
        }
        // do something
      });
    
  • dist下的index可以复制之后直接使用。

Keywords

Install

npm i node-java-maven-simple

DownloadsWeekly Downloads

0

Version

0.0.1

License

MIT

Unpacked Size

3.25 MB

Total Files

16

Last publish

Collaborators

  • avatar