Uploaded image for project: 'Felix'
  1. Felix
  2. FELIX-5241

Files generated by a java annotationprocessor are not added to the jar

    XMLWordPrintableJSON

Details

    Description

      It seems that files created by java annotation processors are not included in the jar by the maven-bundle-plugin while they are included by the standard maven jar packaging.

      In karaf-boot we use standard java annotation processors to generate files at runtime.

      Oner such processor is:
      https://github.com/jbonofre/karaf-boot/tree/master/starters/karaf-boot-starter-jpa
      It parses the @PersistentContext annotation and creates a persistence.xml file.
      This is an example project that uses it:
      https://github.com/jbonofre/karaf-boot/tree/master/samples/jpa

      To test this remove the karaf-boot-maven-plugin (which calls the maven bundle plugin) and the META-INF/persistence.xml is added to the jar.
      Add the default maven-bundle-plugin and the persistence.xml is not added to the jar.

      I can create a simpler test project if this is too complicated.

      Attachments

        Activity

          People

            Unassigned Unassigned
            cschneider Christian Schneider
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: