码迷,mamicode.com
首页 > 编程语言 > 详细

maven-本地安装jar包

时间:2019-01-20 13:52:12      阅读:141      评论:0      收藏:0      [点我收藏+]

标签:flag   api   dde   main   repos   settings   span   update   describe   

maven 安装本地jar包,通过install插件的install-file mojo进行工作,具体可通过如下命令进行查看

mvn help:describe -Dplugin=install -Ddetail

 

 

 

下面是一个实例:

mvn install:install-file -Dfile=X:/core-3.3.1-SNAPSHOT.jar -DgroupId=com.google.zxing -DartifactId=zxing-parent -Dversion=3.3.1-SNAPSHOT -Dpackaging=jar

 

 

 

 

下面是我运行的部分相关的结果:

install:install-file
  Description: Installs a file in the local repository.
  Implementation: org.apache.maven.plugin.install.InstallFileMojo
  Language: java

  Available parameters:

    artifactId
      User property: artifactId
      ArtifactId of the artifact to be installed. Retrieved from POM file if
      one is specified.

    classifier
      User property: classifier
      Classifier type of the artifact to be installed. For example, sources
      or javadoc. Defaults to none which means this is the projects main
      artifact.

    createChecksum (Default: false)
      User property: createChecksum
      Flag whether to create checksums (MD5, SHA-1) or not.

    file
      Required: true
      User property: file
      The file to be installed in the local repository.

    generatePom
      User property: generatePom
      Generate a minimal POM for the artifact if none is supplied via the
      parameter pomFile. Defaults to true if there is no existing POM in the
      local repository yet.

    groupId
      User property: groupId
      GroupId of the artifact to be installed. Retrieved from POM file if one
      is specified.

    javadoc
      User property: javadoc
      The bundled API docs for the artifact.

    localRepositoryPath
      User property: localRepositoryPath
      The path for a specific local repository directory. If not specified the
      local repository path configured in the Maven settings will be used.

    packaging
      User property: packaging
      Packaging type of the artifact to be installed. Retrieved from POM file
      if one is specified.

    pomFile
      User property: pomFile
      Location of an existing POM file to be installed alongside the main
      artifact, given by the file parameter.

    repositoryLayout (Default: default)
      Required: true
      User property: repositoryLayout
      The type of remote repository layout to install to. Try legacy for a
      Maven 1.x-style repository layout.

    sources
      User property: sources
      The bundled sources for the artifact.

    updateReleaseInfo (Default: false)
      User property: updateReleaseInfo
      Whether to update the metadata to make the artifact a release version.

    version
      User property: version
      Version of the artifact to be installed. Retrieved from POM file if one
      is specified.

 

maven-本地安装jar包

标签:flag   api   dde   main   repos   settings   span   update   describe   

原文地址:https://www.cnblogs.com/luohaonan/p/10294313.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!