JBoss AS 7 プロジェクトの Ant ビルド ファイルを作成しようとしています。ビルド ファイルは、私のプロジェクトを EAR にビルドすることになっています。次のエラーが発生していたので、クラスパスが何らかの形で見落とされていると想定しました(間違っている場合は修正してください)。
C:\workspace\LearningAS7\GrahamsProj\build-handmade.xml:21: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
Compiling 4 source files to C:\workspace\LearningAS7\GrahamsProj\build
C:\workspace\LearningAS7\GrahamsProj\src\grahamsproj\entity\Schemas.java:4: package javax.persistence does not exist
import javax.persistence.*;
C:\workspace\LearningAS7\GrahamsProj\src\grahamsproj\entity\Schemas.java:10: cannot find symbol
symbol: class Entity
@Entity
C:\workspace\LearningAS7\GrahamsProj\src\grahamsproj\entity\Schemas.java:11: cannot find symbol
symbol: class Table
@Table(name="schemas")
C:\workspace\LearningAS7\GrahamsProj\src\grahamsproj\entity\Schemas.java:12: cannot find symbol
symbol: class SequenceGenerator
@SequenceGenerator(name="seq_schemas", sequenceName = "")
C:\workspace\LearningAS7\GrahamsProj\src\grahamsproj\session\delegate\GrahamsProjBean.java:7: package javax.ejb does not exist
import javax.ejb.Stateless;
C:\workspace\LearningAS7\GrahamsProj\src\grahamsproj\session\delegate\GrahamsProjBean.java:8: package javax.persistence does not exist
import javax.persistence.EntityManager;
C:\workspace\LearningAS7\GrahamsProj\src\grahamsproj\session\delegate\GrahamsProjBean.java:9: package javax.persistence does not exist
import javax.persistence.PersistenceContext;
C:\workspace\LearningAS7\GrahamsProj\src\grahamsproj\session\interfaces\GrahamsProjBeanLocal.java:3: package javax.ejb does not exist
import javax.ejb.Local;
C:\workspace\LearningAS7\GrahamsProj\src\grahamsproj\session\interfaces\GrahamsProjBeanLocal.java:8: cannot find symbol
symbol: class Local
@Local
C:\workspace\LearningAS7\GrahamsProj\src\grahamsproj\session\interfaces\GrahamsProjBeanRemote.java:3: package javax.ejb does not exist
import javax.ejb.Remote;
C:\workspace\LearningAS7\GrahamsProj\src\grahamsproj\session\interfaces\GrahamsProjBeanRemote.java:8: cannot find symbol
symbol: class Remote
@Remote
C:\workspace\LearningAS7\GrahamsProj\src\grahamsproj\session\delegate\GrahamsProjBean.java:15: cannot find symbol
symbol: class Stateless
@Stateless
C:\workspace\LearningAS7\GrahamsProj\src\grahamsproj\session\delegate\GrahamsProjBean.java:18: cannot find symbol
symbol : class EntityManager
location: class grahamsproj.session.delegate.GrahamsProjBean
EntityManager em;
C:\workspace\LearningAS7\GrahamsProj\src\grahamsproj\entity\Schemas.java:52: cannot find symbol
symbol : class Id
location: class grahamsproj.entity.Schemas
@Id
C:\workspace\LearningAS7\GrahamsProj\src\grahamsproj\entity\Schemas.java:53: cannot find symbol
symbol : class Column
location: class grahamsproj.entity.Schemas
@Column(name = "ID")
C:\workspace\LearningAS7\GrahamsProj\src\grahamsproj\entity\Schemas.java:54: cannot find symbol
symbol : class GeneratedValue
location: class grahamsproj.entity.Schemas
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "seq_schemas")
C:\workspace\LearningAS7\GrahamsProj\src\grahamsproj\session\delegate\GrahamsProjBean.java:17: cannot find symbol
symbol : class PersistenceContext
location: class grahamsproj.session.delegate.GrahamsProjBean
@PersistenceContext
17 errors
C:\workspace\LearningAS7\GrahamsProj\build-handmade.xml:21: Compile failed; see the compiler error output for details.
BUILD FAILED (total time: 0 seconds)
これで、私のビルド ファイルは次のようになります: http://pastebin.com/NZWmQEjN (ここに投稿するには長すぎます)。ご覧のとおり、クラスパス部分を入れました。しかし、今、私はこのエラーが発生しています:
C:\workspace\LearningAS7\GrahamsProj\build-handmade.xml:11: Problem: failed to create task or type classpath
Cause: The name is undefined.
Action: Check the spelling.
Action: Check that any custom tasks/types have been declared.
Action: Check that any <presetdef>/<macrodef> declarations have taken place.
私のビルドファイルの何が問題なのか誰にもわかりますか?