<?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>org.supercsv</groupId>
<artifactId>SuperCSV</artifactId>
<version>1.52</version>
</project>
<?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>org.supercsv</groupId>
<artifactId>spiffy</artifactId>
<version>0.05</version>
</project>
<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>com.mycompany</groupId>
<artifactId>SuperCSVExam</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>SuperCSVExam</name>
<url>http://maven.apache.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<repositories>
<repository>
<id>projectrepo</id>
<url>file:m2repo</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.supercsv</groupId>
<artifactId>SuperCSV</artifactId>
<version>1.52</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.supercsv</groupId>
<artifactId>spiffy</artifactId>
<version>0.05</version>
<scope>compile</scope>
</dependency>
</dependencies>
</project>
Scanning for projects... ------------------------------------------------------------------------ Building SuperCSVExam 1.0-SNAPSHOT ------------------------------------------------------------------------ Downloading: file:m2repo/org/supercsv/SuperCSV/1.52/SuperCSV-1.52.pom Checksum validation failed, no checksums available from the repository for file:m2repo/org/supercsv/SuperCSV/1.52/SuperCSV-1.52.pom Downloaded: file:m2repo/org/supercsv/SuperCSV/1.52/SuperCSV-1.52.pom (392 B at 38.3 KB/sec) Downloading: file:m2repo/org/supercsv/spiffy/0.05/spiffy-0.05.pom Checksum validation failed, no checksums available from the repository for file:m2repo/org/supercsv/spiffy/0.05/spiffy-0.05.pom Downloaded: file:m2repo/org/supercsv/spiffy/0.05/spiffy-0.05.pom (390 B at 127.0 KB/sec) Downloading: file:m2repo/org/supercsv/SuperCSV/1.52/SuperCSV-1.52.jar Downloading: file:m2repo/org/supercsv/spiffy/0.05/spiffy-0.05.jar Checksum validation failed, no checksums available from the repository for file:m2repo/org/supercsv/spiffy/0.05/spiffy-0.05.jar Downloaded: file:m2repo/org/supercsv/spiffy/0.05/spiffy-0.05.jar (15 KB at 1612.2 KB/sec) Checksum validation failed, no checksums available from the repository for file:m2repo/org/supercsv/SuperCSV/1.52/SuperCSV-1.52.jar Downloaded: file:m2repo/org/supercsv/SuperCSV/1.52/SuperCSV-1.52.jar (60 KB at 3504.5 KB/sec) [resources:resources] Using 'UTF-8' encoding to copy filtered resources. skip non existing resourceDirectory /Users/Atsushi/NetBeansProjects/SuperCSVExam/src/main/resources [compiler:compile] Nothing to compile - all classes are up to date [resources:testResources] Using 'UTF-8' encoding to copy filtered resources. skip non existing resourceDirectory /Users/Atsushi/NetBeansProjects/SuperCSVExam/src/test/resources [compiler:testCompile] Nothing to compile - all classes are up to date [surefire:test] Surefire report directory: /Users/Atsushi/NetBeansProjects/SuperCSVExam/target/surefire-reports Picked up _JAVA_OPTIONS: -Dfile.encoding=UTF-8 ------------------------------------------------------- T E S T S ------------------------------------------------------- Running com.mycompany.supercsvexam.AppTest Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.058 sec Results : Tests run: 1, Failures: 0, Errors: 0, Skipped: 0 [jar:jar] Building jar: /Users/Atsushi/NetBeansProjects/SuperCSVExam/target/SuperCSVExam-1.0-SNAPSHOT.jar [install:install] Installing /Users/Atsushi/NetBeansProjects/SuperCSVExam/target/SuperCSVExam-1.0-SNAPSHOT.jar to /Users/Atsushi/.m2/repository/com/mycompany/SuperCSVExam/1.0-SNAPSHOT/SuperCSVExam-1.0-SNAPSHOT.jar Installing /Users/Atsushi/NetBeansProjects/SuperCSVExam/pom.xml to /Users/Atsushi/.m2/repository/com/mycompany/SuperCSVExam/1.0-SNAPSHOT/SuperCSVExam-1.0-SNAPSHOT.pom ------------------------------------------------------------------------ BUILD SUCCESS ------------------------------------------------------------------------ Total time: 4.356s Finished at: Mon Feb 20 01:38:05 JST 2012 Final Memory: 5M/81M ------------------------------------------------------------------------
プロジェクトに商用ライブラリを入れておき、pom.xml から <systemPath> で参照させるのが吉
…
<dependencies>
<dependency>
<groupId>com.fujitsu</groupId>
<artifactId>shunsaku</artifactId>
<version>9.0</version>
<scope>system</scope>
<systemPath>${basedir}/lib/shunsakuapi.jar</systemPath>
</dependency>
</dependencies>
…
project | +--src | +--lib | | | +--xxxapi.jar | +--target
Webアプリの場合は、
…
<dependencies>
<dependency>
<groupId>com.fujitsu</groupId>
<artifactId>shunsaku</artifactId>
<version>9.0</version>
<scope>system</scope>
<systemPath>
${basedir}/src/main/webapp/WEB-INF/lib/shunsakuapi.jar
</systemPath>
</dependency>
</dependencies>
…
が吉。コンパイル時にも参照されるし、war ファイルにも入る。