Integrating Maven & Non-maven projects

前端 未结 4 2098
独厮守ぢ
独厮守ぢ 2020-12-29 13:50

I\'m currently working on two projects simultaneously:

  • My main project (built with maven)
  • A spike of an open source project, which my main project d
4条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-29 14:19

    If OSS project has dependencies - create a POM with those dependencies (your project will use them as transitive dependencies) and install that artifact and pom in local repository. If OSS project hasn't any other dependencies is even simpler - the POM is generated automatically during installing.

    For both cases use maven-install-plugin.

    mvn install:install-file -Dfile=your-artifact-1.0.jar \
                         [-DpomFile=your-pom.xml] \
                         [-Dsources=src.jar] \
                         [-Djavadoc=apidocs.jar] \
                         [-DgroupId=org.some.group] \
                         [-DartifactId=your-artifact] \
                         [-Dversion=1.0] \
                         [-Dpackaging=jar] \
                         [-Dclassifier=sources] \
                         [-DgeneratePom=true] \
                         [-DcreateChecksum=true]
    

提交回复
热议问题