简体   繁体   English

我可以将没有pom文件的zip文件安装到Maven本地存储库吗

[英]Can I install a zip file without pom file to maven local repository

I want to include a java project as dependency in my project, but the dependency doesn't has any pom file, so I want to know how I can depend on this file. 我想在项目中包含一个Java项目作为依赖项,但是该依赖项没有任何pom文件,因此我想知道如何才能依赖此文件。

The project I want to depend on is the JTS3ServerMod ( http://forum.teamspeak.com/threads/51286-JTS3ServerMod-Multifunction-TS3-Server-Bot-(Idle-Record-Away-Mute-Welcome-) ) Plugin API. 我要依赖的项目是JTS3ServerMod( http://forum.teamspeak.com/threads/51286-JTS3ServerMod-Multifunction-TS3-Server-Bot- (Idle-Record-Away-Mute-Welcome- )插件API 。

You can do this: 你可以这样做:

mvn install:install-file -Dfile=JTS3ServerMod.jar -DgroupId=de.stefan1200 -DartifactId=stefan1200 -Dversion=6.4.0 -Dpackaging=jar

This means that the dependency will be installed inside your repository, and will generate the pom file, for example: 这意味着该依赖项将安装在您的存储库中,并将生成pom文件,例如:

<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <modelVersion>4.0.0</modelVersion>
  <groupId>de.stefan1200</groupId>
  <artifactId>stefan1200</artifactId>
  <version>6.4.0</version>
  <description>POM was created from install:install-file</description>
</project>

Repository path: ~\\.m2\\repository\\de\\stefan1200\\stefan1200\\6.4.0 储存库路径: ~\\.m2\\repository\\de\\stefan1200\\stefan1200\\6.4.0

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM