maven generating pom file

前端 未结 8 1718
情深已故
情深已故 2020-12-02 14:33

I use maven 3.0.3 and have tried to generate pom for third-party jar like this:

mvn install:install-file -Dfile=cobra.jar -DgroupId=com.cobra -Darti

8条回答
  •  执笔经年
    2020-12-02 15:05

    I found a bypass. You need to create a simple pom.xml like this :

    
        4.0.0
        com.cobra
        cobra
        0.98.4
    
    

    It's not perfect but it's worked for me. If you find a better way to do that, I'm interested.

    My config :

    $mvn -version
    Apache Maven 3.0.3 (r1075438; 2011-02-28 18:31:09+0100)
    Maven home: /usr/local/maven
    Java version: 1.6.0_20, vendor: Sun Microsystems Inc.
    Java home: /usr/local/jdk1.6.0_20/jre
    Default locale: en_US, platform encoding: UTF-8
    OS name: "linux", version: "2.6.32-25-generic-pae", arch: "i386", family: "unix"
    
    $mvn -Dplugin=install help:describe
    ...
    Name: Maven Install Plugin
    Description: Copies the project artifacts to the user's local repository.
    Group Id: org.apache.maven.plugins
    Artifact Id: maven-install-plugin
    Version: 2.3.1
    Goal Prefix: install
    ...
    

提交回复
热议问题