classpathPrefix でクラスパスを通すディレクトリを指定できるのはかなり便利だと思う。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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>jp.mkt_sys.maven.tips</groupId> | |
<artifactId>some_app</artifactId> | |
<version>1.0.0</version> | |
<build> | |
<plugins> | |
<plugin> | |
<groupId>org.apache.maven.plugins</groupId> | |
<artifactId>maven-jar-plugin</artifactId> | |
<configuration> | |
<archive> | |
<manifest> | |
<!-- main メソッドが存在するクラス --> | |
<mainClass>jp.mkt_sys.maven.tips.some_app.Runner</mainClass> | |
<addClasspath>true</addClasspath> | |
<!-- classpath を通したいディレクトリ(相対指定)--> | |
<classpathPrefix>lib</classpathPrefix> | |
</manifest> | |
</archive> | |
</configuration> | |
</plugin> | |
</plugins> | |
</build> | |
<dependencies> | |
<!-- some dependency settings --> | |
</dependencies> | |
</project> |
0 件のコメント :
コメントを投稿