maven 安装本地jar

来源:互联网 发布:java 调用系统浏览器 编辑:程序博客网 时间:2024/05/22 02:30

maven 安装本地jar

mvn install:install-file -Dfile={Path/to/your/ojdbc.jar} -DgroupId=com.oracle -DartifactId=ojdbc6 -Dversion=11.2.0 -Dpackaging=jar

解析pom.xml

format = require 'string-format'format.extend(String.prototype)xml="""pom.xml data"""x=$ xmldependencys = x.find 'dependency'groups=[]dependencys.each (num,item)->  # console.log no  g=$(item).find('groupId')[0]  groups.push item # if 'com.xxxx' == g.innerTextresultArr=[]groups.forEach (item) ->  x=$(item)        # <dependency>        #     <groupId>org.jdom</groupId>        #     <artifactId>jdom</artifactId>        #     <version>1.1</version>        # </dependency>  tem='mvn install:install-file -Dfile={artifactId}-{version}.jar -DgroupId={groupId} -DartifactId={artifactId} -Dversion={version} -Dpackaging=jar'  obj={}  obj.artifactId=x.find('artifactId')[0].innerText  obj.version=x.find('version')[0].innerText  obj.groupId=x.find('groupId')[0].innerText  resultArr.push(tem.format(obj))console.log resultArr.join '\n'

使用截图

20160521133142

0 0
原创粉丝点击