프로그래밍/Java

메이븐에 외부라이브러리 추가

소행성왕자 2020. 6. 24. 11:08
메이븐에 외부라이브러리 추가


mvn install:install-file -Dfile=파일경로/파일명.jar -DgroupId=그룹아이디 -DartifactId=아티팩트아이디 -Dversion=버전 -Dpackaging=jar 

설치가 완료되면

pom.xml에

<dependency>
<groupId>그룹아이디</groupId>
<artifactId>아티팩트아이디</artifactId>
<version>버전</version>
</dependency>



mvn install:install-file -Dfile=../.m2/repository/able-core/2.6.2/able-core-2.6.2.jar -DgroupId=able -DartifactId=able-core -Dversion=2.6.2 -Dpackaging=jar 

<!-- able-core -->
<dependency>
        <groupId>able</groupId>
        <artifactId>able-core</artifactId>
        <version>2.6.2</version>
</dependency>

[INFO] Scanning for projects...
[INFO] 
[INFO] ------------------------------< aa:test >-------------------------------
[INFO] Building test 1.0.0
[INFO] --------------------------------[ war ]---------------------------------
[INFO] 
[INFO] --- maven-install-plugin:2.4:install-file (default-cli) @ test ---
Downloading from central: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-utils/3.0.5/plexus-utils-3.0.5.pom
Downloaded from central: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-utils/3.0.5/plexus-utils-3.0.5.pom (2.5 kB at 2.2 kB/s)
Downloading from central: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus/3.1/plexus-3.1.pom
Downloaded from central: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus/3.1/plexus-3.1.pom (19 kB at 44 kB/s)
Downloading from central: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-digest/1.0/plexus-digest-1.0.pom
Downloaded from central: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-digest/1.0/plexus-digest-1.0.pom (1.1 kB at 3.5 kB/s)
Downloading from central: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-components/1.1.7/plexus-components-1.1.7.pom
Downloaded from central: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-components/1.1.7/plexus-components-1.1.7.pom (5.0 kB at 17 kB/s)
Downloading from central: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus/1.0.8/plexus-1.0.8.pom
Downloaded from central: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus/1.0.8/plexus-1.0.8.pom (7.2 kB at 25 kB/s)
Downloading from central: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-container-default/1.0-alpha-8/plexus-container-default-1.0-alpha-8.pom
Downloaded from central: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-container-default/1.0-alpha-8/plexus-container-default-1.0-alpha-8.pom (7.3 kB at 25 kB/s)
Downloading from central: https://repo.maven.apache.org/maven2/classworlds/classworlds/1.1-alpha-2/classworlds-1.1-alpha-2.jar
Downloading from central: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-utils/3.0.5/plexus-utils-3.0.5.jar
Downloading from central: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-digest/1.0/plexus-digest-1.0.jar
Downloaded from central: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-digest/1.0/plexus-digest-1.0.jar (12 kB at 21 kB/s)
Downloaded from central: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-utils/3.0.5/plexus-utils-3.0.5.jar (230 kB at 330 kB/s)
Downloaded from central: https://repo.maven.apache.org/maven2/classworlds/classworlds/1.1-alpha-2/classworlds-1.1-alpha-2.jar (38 kB at 51 kB/s)
[INFO] Installing /home/hdsw/.m2/repository/able-core/2.6.2/able-core-2.6.2.jar to /root/.m2/repository/able/able-core/2.6.2/able-core-2.6.2.jar
[INFO] Installing /tmp/mvninstall6602797313181647168.pom to /root/.m2/repository/able/able-core/2.6.2/able-core-2.6.2.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  4.188 s
[INFO] Finished at: 2020-06-24T11:01:56+09:00
[INFO] ------------------------------------------------------------------------


mvn install:install-file -Dfile=../.m2/repository/able-security/2.0.0/able-security-2.0.0.jar -DgroupId=able -DartifactId=able-security -Dversion=2.0.0 -Dpackaging=jar 

<!-- able-security -->
<dependency>
        <groupId>able</groupId>
        <artifactId>able-security</artifactId>
        <version>2.0.0</version>
</dependency>




[INFO] Scanning for projects...
[INFO] 
[INFO] ------------------------------< aa:test >-------------------------------
[INFO] Building test 1.0.0
[INFO] --------------------------------[ war ]---------------------------------
[INFO] 
[INFO] --- maven-install-plugin:2.4:install-file (default-cli) @ test ---
[INFO] Installing /home/hdsw/.m2/repository/able-security/2.0.0/able-security-2.0.0.jar to /root/.m2/repository/able/able-security/2.0.0/able-security-2.0.0.jar
[INFO] Installing /tmp/mvninstall2838032778983282285.pom to /root/.m2/repository/able/able-security/2.0.0/able-security-2.0.0.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  0.408 s
[INFO] Finished at: 2020-06-24T11:03:52+09:00
[INFO] ------------------------------------------------------------------------


https://kaling88.tistory.com/3

mssql-jdbc-8.2.2.jre8.jar
1.21MB

mvn install:install-file -Dfile=../.m2/repository/mssql/mssql-jdbc-8.2.2.jre8.jar -DgroupId=com.microsoft.sqlserver -DartifactId=mssql-jdbc -Dversion=8.2.2.jre8 -Dpackaging=jar 

<dependency>
        <groupId>com.microsoft.sqlserver</groupId>
        <artifactId>mssql-jdbc</artifactId>
        <version>8.2.2.jre8</version>
</dependency>



mvn install:install-file -Dfile=../.m2/repository/junit/4.1.12/junit.jar -DgroupId=junit -DartifactId=junit -Dversion=4.1.12 -Dpackaging=jar 

<dependency>
    <groupId>junit</groupId>
    <artifactId>junit</artifactId>
    <version>4.1.12</version>
</dependency>