Search code examples
javaseam3deltaspike

Seam Solder @MessageBundle generating the implementation classes Maven Error


I followed the documentation to use @MessageBundle with Seam Solder 3.1.0 here :

http://docs.jboss.org/seam/3/3.1.0.Final/reference/en-US/html/solder-logging.html#typed-message-bundles

but a get en error at compile time when Maven try to compile generated annotation :

[ERROR] error: Cannot read com.apps.web.messages package files, cause : java.io.FileNotFoundException: com.apps.web.messages/WebMessages

When I check in target directory the file is generated correctly :

target/generated-sources/annotations/com/apps/web/messages/WebMessages_$bundle.java

It seems that the maven plugins or the compiler can not find the interface WebMessages localized in src/main/java/com/apps/web/messages/ when he try to compile WebMessages_$bundle generated file.

Environnement:

Seam Solder 3.1.0.Final / Maven 3.0.3 / JDK 1.7 / JBoss AS 6.1.0


Solution

  • In my pom.xml :

    <plugin>
    <artifactId>maven-compiler-plugin</artifactId>
    <version>2.3.2</version>
    <configuration>
      <source>1.7</source>
      <target>1.7</target>
      <compilerArgument>-AtranslationFilesPath=${project.basedir}/target/generated-sources/annotations</compilerArgument>
    </configuration>
    </plugin>
    

    The compilerArgument solve the issue.