[Java] [Maven] Template of pom.xml to register 3rd party jar file in local repository

This is a template of pom.xml file used when registering a stray (?) Jar file that is not in the Maven repository in the local repository.

pom.xml


<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId><!-- TODO:Appropriately--></groupId>
    <artifactId><!-- TODO:Appropriately--></artifactId>
    <version><!-- TODO:Appropriately--></version>
    <packaging>pom</packaging>
    <properties>
        <groupId><!-- TODO:Replace with the groupId you want to register-->p</groupId>
        <artifactId><!-- TODO:Replace with the artifactId you want to register--></artifactId>
        <version><!-- TODO:Replace with the version you want to register--></version>
        <packaging>jar</packaging>
        <file><!-- TODO:Replace with the name of the jar file--></file>
    </properties>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-install-plugin</artifactId>
                <version>2.5.2</version>
                <executions>
                    <execution>
                        <id>default-install</id>
                        <phase>none</phase>
                    </execution>
                    <execution>
                        <phase>install</phase>
                        <goals>
                            <goal>install-file</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>

Maidomaido mvn command ʻinstall: install-file` It's a hassle to go around how to use the target

It is troublesome to teach command to group members

Please use it in such a case.

Recommended Posts

[Java] [Maven] Template of pom.xml to register 3rd party jar file in local repository
How to add local jar to maven pom.xml
[Java] Get the file in the jar regardless of the environment
Generate and execute Jar file of Java file belonging to package
Easily convert Java application to Docker container with Jib ~ Build with gradle and register in local repository
How to make a jar file with no dependencies in Maven
Fix the file name of war to the one set in Maven
Log output to file in Java
How to get the length of an audio file in java
The story of forgetting to close a file in Java and failing
How to read log4j configuration file in Java project summarized in jar file Memo
How to add jar file in ScalaIDE
[Java] [Maven3] Summary of how to use Maven3
Sample to unzip gz file in Java
JAVA: jar, aar, view the contents of the file
Java Repository of Eclipse with Maven: Missing artifact ~
Add jar file obtained from Maven to IntelliJ
How to build an executable jar in Maven
Include image in jar file with java static method
How to convert a file to a byte array in Java
How to debug the generated jar file in Eclipse
Summary of how to implement default arguments in Java
Gzip-compress byte array in Java and output to file
I want to find out which version of java the jar file I have is available