4 Replies Latest reply on Apr 6, 2007 4:13 PM by alesj

    JavaCC files compile failure

    alesj

      I (re)moved Scott's initial HeaderValue.jj to another package.
      And now I get this failure when running root pom.xml --> osgi-int module build:

      C:\projects\microcontainer\osgi-int\src\main\org\jboss\osgi\plugins\metadata\HeaderValueTokenManager.java:[9,7] duplicate class: org.jboss.osgi.plugins.metadata.HeaderValueTokenManager
      
      C:\projects\microcontainer\osgi-int\target\generated-sources\javacc\org\jboss\vfs\bundle\HeaderValue.java:[19,7] duplicate class: org.jboss.osgi.plugins.metadata.HeaderValue
      
      C:\projects\microcontainer\osgi-int\target\generated-sources\javacc\org\jboss\vfs\bundle\Token.java:[8,7] duplicate class: org.jboss.osgi.plugins.metadata.Token
      
      C:\projects\microcontainer\osgi-int\target\generated-sources\javacc\org\jboss\vfs\bundle\HeaderValueConstants.java:[4,7] duplicate class: org.jboss.osgi.plugins.metadata.HeaderValueConstants
      
      C:\projects\microcontainer\osgi-int\src\main\org\jboss\osgi\plugins\metadata\SimpleCharStream.java:[9,7] duplicate class: org.jboss.osgi.plugins.metadata.SimpleCharStream
      
      C:\projects\microcontainer\osgi-int\target\generated-sources\javacc\org\jboss\vfs\bundle\ParseException.java:[13,7] duplicate class: org.jboss.osgi.plugins.metadata.ParseException
      
      C:\projects\microcontainer\osgi-int\target\generated-sources\javacc\org\jboss\vfs\bundle\TokenMgrError.java:[4,7] duplicate class: org.jboss.osgi.plugins.metadata.TokenMgrError
      



        • 1. Re: JavaCC files compile failure
          starksm64

          It looks like previously generated classes were checked into the module and they need to be removed as well. I would guess the javacc plugin is recreating these in the mvn target dir.

          • 2. Re: JavaCC files compile failure
            alesj

            Ok, at least I found out where the old package name was coming from - pom.xml in osgi-int module:

             <configuration>
             <sourceDirectory>${basedir}/src/main</sourceDirectory>
             <outputDirectory>${project.build.directory}/generated-sources/javacc/</outputDirectory>
             <packageName>org.jboss.vfs.bundle</packageName>
             </configuration>
            


            I changed it to point to current javacc files package - org.jboss.osgi.plugins.metadata.
            But this doesn't change the duplicate error.

            • 3. Re: JavaCC files compile failure
              starksm64

              Search for the Token.java/Token.class in the entire project to see where the duplicates are showing up.

              • 4. Re: JavaCC files compile failure
                alesj

                You're right, I added a javacc precompile with IDE external tool which also created .java files, so they were duplicated.
                Sorry for the trouble. :-(