원격 저장소에서 jar 파일을 가져 와서 로컬 저장소에 추가하려고하는 maven 프로젝트가 있습니다. 그 클래스를 참조하는 대신에 추가 한 후에 현재 프로젝트의 입력으로 사용되는 jar 파일을 실행해야합니다.현재 프로젝트를 실행하기 전에 maven에서 종속성 jar를 실행하는 방법
제가 시도했지만 빌드 문제는 없지만 여전히 종속성을 실행하는 것은 아닙니다.
내 pom.xml 파일 :
<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>secmaven</groupId>
<artifactId>secmaven</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>secmaven</name>
<description>secmaven</description>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.3</version>
<executions>
<execution>
<goals>
<goal>properties</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.2</version>
<executions>
<execution>
<id>exec-one</id>
<phase>verify</phase>
<configuration>
<includeProjectDependencies>false</includeProjectDependencies>
<includePluginDependencies>true</includePluginDependencies>
<executableDependency>
<groupId>parent</groupId>
<artifactId>parent</artifactId>
</executableDependency>
<!-- Look up the main class from the manifest inside your dependency's JAR -->
<mainClass>mainclass</mainClass>
<arguments>
</arguments>
</configuration>
<goals>
<goal>java</goal>
</goals>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>parent</groupId>
<artifactId>parent</artifactId>
<version>0.0.1-SNAPSHOT</version>
<scope>system</scope>
<systemPath>C:\....\parent.jar</systemPath>
</dependency>
</dependencies>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>
pom에 종속성으로 추가 했습니까? – pringi
예, plz 내 아래 pom을 확인했습니다 – Jech
당신이 뭘하고 싶은지 더 설명해 주시겠습니까? – pringi