Maven ビルド中に発生するエラー:
[エラー] プロジェクト cc-distFS で目標 org.apache.maven.plugins:maven-jar-plugin:2.4:jar (default-jar) を実行できませんでした: JAR の組み立て中にエラーが発生しました: 次のファイルシステム属性を読み取れませんでした: /home/user /trunk/src/cc-distFS/pom.xml: ディレクトリの引用に失敗しました: '/home/user/trunk/src/cc-distFS/pom.xml': 環境変数の設定エラー: NullPointerException -> [ヘルプ 1]
maven -X パッケージ
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleThreadedBuilder$1.call(LifecycleThreadedBuilder.java:167)
at org.apache.maven.lifecycle.internal.LifecycleThreadedBuilder$1.call(LifecycleThreadedBuilder.java:163)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
Caused by: org.apache.maven.plugin.MojoExecutionException: Error assembling JAR
at org.apache.maven.plugin.jar.AbstractJarMojo.createArchive(AbstractJarMojo.java:237)
at org.apache.maven.plugin.jar.AbstractJarMojo.execute(AbstractJarMojo.java:255)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
... 13 more
Caused by: org.codehaus.plexus.archiver.ArchiverException: Failed to read filesystem attributes for: /home/user/trunk/src/cc-dto/pom.xml
at org.codehaus.plexus.archiver.ArchiveEntry.createFileEntry(ArchiveEntry.java:163)
at org.codehaus.plexus.archiver.AbstractArchiver.addFile(AbstractArchiver.java:404)
at org.codehaus.plexus.archiver.AbstractArchiver.addFile(AbstractArchiver.java:316)
at org.apache.maven.archiver.MavenArchiver.createArchive(MavenArchiver.java:526)
at org.apache.maven.plugin.jar.AbstractJarMojo.createArchive(AbstractJarMojo.java:230)
... 16 more
Caused by: java.io.IOException: Failed to quote directory: '/home/user/trunk/src/cc-dto/pom.xml'
at org.codehaus.plexus.components.io.attributes.PlexusIoResourceAttributeUtils.getFileAttributesByPath(PlexusIoResourceAttributeUtils.java:256)
at org.codehaus.plexus.components.io.attributes.PlexusIoResourceAttributeUtils.getFileAttributes(PlexusIoResourceAttributeUtils.java:172)
at org.codehaus.plexus.archiver.ArchiveEntry.createFileEntry(ArchiveEntry.java:159)
... 20 more
Caused by: org.codehaus.plexus.util.cli.CommandLineException: Error setting up environmental variables
at org.codehaus.plexus.util.cli.Commandline.getEnvironmentVariables(Commandline.java:466)
at org.codehaus.plexus.util.cli.Commandline.execute(Commandline.java:628)
at org.codehaus.plexus.util.cli.CommandLineUtils.executeCommandLineAsCallable(CommandLineUtils.java:140)
at org.codehaus.plexus.components.io.attributes.PlexusIoResourceAttributeUtils.getFileAttributesByPath(PlexusIoResourceAttributeUtils.java:247)
... 22 more
Caused by: java.lang.NullPointerException
at java.util.Hashtable.put(Hashtable.java:394)
at org.codehaus.plexus.util.cli.CommandLineUtils.getEnvFromSystem(CommandLineUtils.java:624)
at org.codehaus.plexus.util.cli.CommandLineUtils.getSystemEnvVars(CommandLineUtils.java:284)
at org.codehaus.plexus.util.cli.CommandLineUtils.getSystemEnvVars(CommandLineUtils.java:260)
at org.codehaus.plexus.util.cli.Commandline.addSystemEnvironment(Commandline.java:442)
at org.codehaus.plexus.util.cli.Commandline.getEnvironmentVariables(Commandline.java:462)
... 25 more
誰がそれが何を意味するのか知っていますか?
PS:
% mvn -v
Apache Maven 3.0.4 (r1232337; 2012-01-17 15:44:56+0700)
Maven home: /home/user/Applications/apache-maven
Java version: 1.6.0_27, vendor: Sun Microsystems Inc.
Java home: /home/user/Applications/jdk
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "3.2.0-26-generic-pae", arch: "i386", family: "unix"
% java -version
java version "1.6.0_27"
Java(TM) SE Runtime Environment (build 1.6.0_27-b07)
Java HotSpot(TM) Server VM (build 20.2-b06, mixed mode)
モジュール cc-distFS の 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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.uc</groupId>
<artifactId>cc</artifactId>
<version>TRUNK-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<groupId>${parent.groupId}</groupId>
<artifactId>cc-distFS</artifactId>
<packaging>jar</packaging>
<version>${parent.version}</version>
<name>${pom.artifactId}</name>
<dependencies>
<dependency>
<groupId>com.cc</groupId>
<artifactId>cc-lib</artifactId>
</dependency>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</dependency>
</dependencies>
PS: fsck を作ったらバグが消えました。