さて、これは私の pom(.xml) 構成です:
<build>
<resources>
<resource>
<directory>src/resources/development</directory>
<filtering>true</filtering>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-eclipse-plugin</artifactId>
<version>2.9</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.8</version>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<inherited>true</inherited>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>2.2.1</version>
<executions>
<execution>
<id>attach-sources</id>
<phase>verify</phase>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
<configuration>
<attach>true</attach>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-install-plugin</artifactId>
<version>2.3.1</version>
<configuration>
<createChecksum>true</createChecksum>
</configuration>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<archive>
<manifest>
<mainClass>mypackage.MyMainClass</mainClass>
</manifest>
</archive>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.8</version>
<executions>
<execution>
<id>copy-dependencies</id>
<phase>package</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<!-- configure the plugin here -->
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.3.1</version>
<executions>
<execution>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
<configuration></configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.0</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
<!--
Plugin that can be configured to prevent deployment of artifact to the
maven2 repository.
-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.5</version>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>com.vantage.iseek.content</groupId>
<artifactId>iseek-content-publisher-ds</artifactId>
<version>1.0.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.vantage.iseek.content</groupId>
<artifactId>iseek-content-api</artifactId>
<version>1.0.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.restfb</groupId>
<artifactId>restfb</artifactId>
<version>1.6.11</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.5</version>
<scope>testing</scope>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.1</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.2</version>
</dependency>
<dependency>
<groupId>postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>9.1-901-1.jdbc4</version>
</dependency>
<!-- Route commons over slf -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jcl-over-slf4j</artifactId>
<version>1.7.2</version>
<scope>runtime</scope>
</dependency>
<!-- Use log4j as binding -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>1.7.2</version>
</dependency>
</dependencies>
<repositories>
<repository>
<id>nexus</id>
<snapshots>
<enabled>false</enabled>
</snapshots>
<url>http://maven2.vantage.com:8080/repo/content/groups/public</url>
</repository>
<repository>
<id>nexus-snapshots</id>
<releases>
<enabled>false</enabled>
</releases>
<url>http://maven2.vantage.com:8080/repo/content/groups/public</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>nexus</id>
<snapshots>
<enabled>false</enabled>
</snapshots>
<url>http://maven2.vantage.com:8080/repo/content/groups/public</url>
</pluginRepository>
<pluginRepository>
<id>nexus-snapshots</id>
<releases>
<enabled>false</enabled>
</releases>
<url>http://maven2.vantage.com:8080/repo/content/groups/public</url>
</pluginRepository>
</pluginRepositories>
<distributionManagement>
<!-- use the following if you ARE NOT deploying a snapshot version. -->
<repository>
<id>nexus</id>
<name>Vantage Nexus Release Repository</name>
<url>
http://maven2.vantage.com:8080/repo/content/repositories/vantage-release
</url>
</repository>
<!-- use the following if you ARE deploying a snapshot version. -->
<snapshotRepository>
<id>nexus-snapshot</id>
<name>Vantage Nexus Snapshot Repository</name>
<url>
http://maven2.vantage.com:8080/repo/content/repositories/vantage-snapshot
</url>
<uniqueVersion>false</uniqueVersion>
</snapshotRepository>
</distributionManagement>
<profiles>
<profile>
<id>env-development</id>
<properties>
<downloadSources>true</downloadSources>
<downloadJavadocs>true</downloadJavadocs>
</properties>
<activation>
<activeByDefault>true</activeByDefault>
<property>
<name>env</name>
<value>development</value>
</property>
</activation>
</profile>
</profiles>
`
実行すると:mvn clean assembly:single
次のエラーメッセージが表示されます:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-assembly-plugin:2.2-beta-5:single (default-cli) on project iseek-content-fetcher-fb: Failed to create assembly: Failed to resolve dependencies for project: com.vantage.iseek.content:iseek-content-fetcher-fb:jar:1.0.1-SNAPSHOT: Missing:
[ERROR] ----------
[ERROR] 1) com.vantage.iseek.content:iseek-content-publisher-ds:jar:1.0.1-SNAPSHOT
[ERROR]
[ERROR] Try downloading the file manually from the project website.
[ERROR]
[ERROR] Then, install it using the command:
[ERROR] mvn install:install-file -DgroupId=com.vantage.iseek.content -DartifactId=iseek-content-publisher-ds -Dversion=1.0.1-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file
[ERROR]
[ERROR] Alternatively, if you host your own repository you can deploy the file there:
[ERROR] mvn deploy:deploy-file -DgroupId=com.vantage.iseek.content -DartifactId=iseek-content-publisher-ds -Dversion=1.0.1-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]
[ERROR]
[ERROR] Path to dependency:
[ERROR] 1) com.vantage.iseek.content:iseek-content-fetcher-fb:jar:1.0.1-SNAPSHOT
[ERROR] 2) com.vantage.iseek.content:iseek-content-publisher-ds:jar:1.0.1-SNAPSHOT
[ERROR]
[ERROR] ----------
[ERROR] 1 required artifact is missing.
[ERROR]
[ERROR] for artifact:
[ERROR] com.vantage.iseek.content:iseek-content-fetcher-fb:jar:1.0.1-SNAPSHOT
[ERROR]
[ERROR] from the specified remote repositories:
[ERROR] nexus (http://maven2.vantage.com:8080/repo/content/groups/public, releases=true, snapshots=false),
[ERROR] central (http://repo.maven.apache.org/maven2, releases=true, snapshots=false)
しかし、ターゲットディレクトリでは、実行時に isek-content-fetcher-fb-1.0.1-SNAPSHOT.jar が常に見つかりますmvn install
。