1
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

ビルド時にエラー発生 Problem: failed to create task or type copyfiles

Last updated at Posted at 2016-05-30
build-error
BookStore\nbproject\build-impl.xml:1009: Problem: failed to create task or type copyfiles
Cause: The name is undefined.
Action: Check the spelling.
Action: Check that any custom tasks/types have been declared.

ビルド時に上記のようなエラーが出た場合は、build-impl.xmlに何かの拍子で不要なCopy Taskが追加されている。そのCopy Taskを削除すると正常にビルドが実行されるようになる。

修正前のbuild-impl.xmlの該当部分
    <target depends="init" name="library-inclusion-in-archive" unless="dist.ear.dir">
        <copyfiles files="${libs.primefaces.classpath}" todir="${build.web.dir}//"/>
        <copyfiles files="${libs.javaee-api-7.0.classpath}" todir="${build.web.dir}//"/>
    </target>

修正後のbuild-impl.xmlの該当部分
    <target depends="init" name="library-inclusion-in-archive" unless="dist.ear.dir">
        
    </target>

##追記
そもそもの原因はCopy Taskが追加されることではなく、libs.primefaces.classpath で指定された primefaces.jar が指定のディレクトリに無いことが原因らしい。その primefaces.jar はNetBeansによって追加されるのでこういう現象は起こらないはず。何かのバグだろうか?

1
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?