maven-本地安装jar包

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 project's 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.

 

转载于:https://www.cnblogs.com/luohaonan/p/10294313.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值