Nightloewe
Nightloewe

Reputation: 1098

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.

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.

Upvotes: 3

Views: 6651

Answers (1)

JUAN CALVOPINA M
JUAN CALVOPINA M

Reputation: 3955

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:

<?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

Upvotes: 4

Related Questions