Uploaded image for project: 'IronJacamar'
  1. IronJacamar
  2. JBJCA-847

CodeGenerator Maven configuration misconfigures src/build paths, sets incorrect java version.

    XMLWordPrintable

Details

    • Hide

      Use the code generator to generate a generic JCA project for Maven. (Use all defaults, except the last option to select M for Maven.)

      If you type "mvn test" you'll get an error "java.lang.ClassNotFoundException: com.accenture.ai.ado.jca.AcmeMBeanImpl".

      Then if you either (a) type "mvn eclipse:eclipse" and then import the project as an Existing Eclipse project or (b) generate the project using the Eclipse plugin and then say "Configure | Convert to Maven Project..." you will get a bunch of class errors because all or the generated classes will be interpreted as belonging to the package "java.com.my.company" instead of "com.my.company".

      Then if you correct by changing the pom.xml to add "java" to the end of the source and test directories, you'll have dozens of errors like "The method getConnection from the type AcmeConnectionFactoryImpl must override a superclass method.".

      Show
      Use the code generator to generate a generic JCA project for Maven. (Use all defaults, except the last option to select M for Maven.) If you type "mvn test" you'll get an error "java.lang.ClassNotFoundException: com.accenture.ai.ado.jca.AcmeMBeanImpl". Then if you either (a) type "mvn eclipse:eclipse" and then import the project as an Existing Eclipse project or (b) generate the project using the Eclipse plugin and then say "Configure | Convert to Maven Project..." you will get a bunch of class errors because all or the generated classes will be interpreted as belonging to the package "java.com.my.company" instead of "com.my.company". Then if you correct by changing the pom.xml to add "java" to the end of the source and test directories, you'll have dozens of errors like "The method getConnection from the type AcmeConnectionFactoryImpl must override a superclass method.".
    • Hide

      Change the src/main to src/main/java and src/test to src/test/java. Then change source 1.5 to 1.6.

      Show
      Change the src/main to src/main/java and src/test to src/test/java. Then change source 1.5 to 1.6.

    Description

      If one uses the CodeGenerator (via command line or Eclipse plugin) with the option to export to Maven, the resulting code (a) cannot be imported into an Eclipse Maven project, (b) cannot run a test via "mvn test" and (c) generates Eclipse code errors because the source/target are set to Java 1.5 but the @Override annotation is not allowed for Interface overrides in Java 1.5.

      (I've lumped these all into one JIRA ticket report because I think it can all be resolved with some tweaks to the pom.xml generation.)

      Attachments

        1. jbjca-847.patch
          3 kB
        2. pom.xml
          4 kB

        Activity

          People

            jeff.zhang_jira Jeff Zhang (Inactive)
            willimur Murray Todd Williams (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: