Erro de tarefa do EclipseLink 2: ANT

Eu tenho essa tarefa ANT:

      

Quando eu executei a tarefa acima, recebi este erro:

 [javac] error: java.lang.IllegalArgumentException [javac] An annotation processor threw an uncaught exception. [javac] Consult the following stack trace for details. [javac] java.lang.RuntimeException: java.lang.IllegalArgumentException [javac] at org.eclipse.persistence.internal.jpa.modelgen.CanonicalModelProcessor.process(CanonicalModelProcessor.java:407) [javac] at com.sun.tools.javac.processing.JavacProcessingEnvironment.callProcessor(JavacProcessingEnvironment.java:625) [javac] at com.sun.tools.javac.processing.JavacProcessingEnvironment.discoverAndRunProcs(JavacProcessingEnvironment.java:554) [javac] at com.sun.tools.javac.processing.JavacProcessingEnvironment.doProcessing(JavacProcessingEnvironment.java:699) [javac] at com.sun.tools.javac.main.JavaCompiler.processAnnotations(JavaCompiler.java:981) [javac] at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:727) [javac] at com.sun.tools.javac.main.Main.compile(Main.java:353) [javac] at com.sun.tools.javac.main.Main.compile(Main.java:279) [javac] at com.sun.tools.javac.main.Main.compile(Main.java:270) [javac] at com.sun.tools.javac.Main.compile(Main.java:69) [javac] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [javac] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [javac] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [javac] at java.lang.reflect.Method.invoke(Method.java:597) [javac] at org.apache.tools.ant.taskdefs.compilers.Javac13.execute(Javac13.java:56) [javac] at org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:1065) [javac] at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:882) [javac] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288) [javac] at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source) [javac] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [javac] at java.lang.reflect.Method.invoke(Method.java:597) [javac] at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) [javac] at org.apache.tools.ant.Task.perform(Task.java:348) [javac] at org.apache.tools.ant.Target.execute(Target.java:357) [javac] at org.apache.tools.ant.Target.performTasks(Target.java:385) [javac] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337) [javac] at org.apache.tools.ant.Project.executeTarget(Project.java:1306) [javac] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41) [javac] at org.eclipse.ant.internal.launching.remote.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:32) [javac] at org.apache.tools.ant.Project.executeTargets(Project.java:1189) [javac] at org.eclipse.ant.internal.launching.remote.InternalAntRunner.run(InternalAntRunner.java:423) [javac] at org.eclipse.ant.internal.launching.remote.InternalAntRunner.main(InternalAntRunner.java:137) [javac] Caused by: java.lang.IllegalArgumentException [javac] at java.net.URI.create(URI.java:842) [javac] at com.sun.tools.javac.util.DefaultFileManager.getFileForOutput(DefaultFileManager.java:1029) [javac] at com.sun.tools.javac.processing.JavacFiler.getResource(JavacFiler.java:434) [javac] at org.eclipse.persistence.internal.jpa.modelgen.objects.PersistenceUnitReader.getFileObject(PersistenceUnitReader.java:93) [javac] at org.eclipse.persistence.internal.jpa.modelgen.objects.PersistenceUnitReader.getInputStream(PersistenceUnitReader.java:104) [javac] at org.eclipse.persistence.internal.jpa.modelgen.objects.PersistenceUnitReader.initPersistenceUnits(PersistenceUnitReader.java:169) [javac] at org.eclipse.persistence.internal.jpa.modelgen.objects.PersistenceUnitReader.(PersistenceUnitReader.java:71) [javac] at org.eclipse.persistence.internal.jpa.modelgen.CanonicalModelProcessor.process(CanonicalModelProcessor.java:376) [javac] ... 31 more [javac] Caused by: java.net.URISyntaxException: Illegal character in opaque part at index 2: D:\Project\website/WebContent/META-INF [javac] at java.net.URI$Parser.fail(URI.java:2809) [javac] at java.net.URI$Parser.checkChars(URI.java:2982) [javac] at java.net.URI$Parser.parse(URI.java:3019) [javac] at java.net.URI.(URI.java:578) [javac] at java.net.URI.create(URI.java:840) [javac] ... 38 more 

Eu tracei o erro para esta linha . Parece que o analisador não gosta do valor do argumento do compilador -Aeclipselink.persistencexml . O erro acima é reproduzível com o JDK 1.6.0.24 e o JDK 1.6.0.25. O erro é causado por org.eclipse.persistence.internal.jpa.modelgen.CanonicalModelProcessor.process .

Estou usando o EclipseLink versão 2.2.0.v20110202-r8913 que vem junto com o Glassfish 3.1. Eu também tentei compilar a tarefa acima com as bibliotecas independentes do EclipseLink versão 2.2.0.v20110202-r8913 e recebi o mesmo erro.

Existe uma solução alternativa para o erro acima?

Para resolver o erro java.net.URISyntaxException: Illegal character in opaque part at index 2 , tive que mover meu META-INF para o mesmo diretório onde o build.xml da ANT reside. Esta é apenas uma solução alternativa.

Eu registrei um bug em https://bugs.eclipse.org/bugs/show_bug.cgi?id=345808 . O pessoal do EclipseLink corrigiu esse bug para a liberação EclipseLink versão 2.3.0.