[jboss-jira] [JBoss JIRA] (JBJCA-847) CodeGenerator Maven configuration misconfigures src/build paths, sets incorrect java version.
Logan McGrath (JIRA)
jira-events at lists.jboss.org
Wed Jul 11 14:36:12 EDT 2012
[ https://issues.jboss.org/browse/JBJCA-847?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12705513#comment-12705513 ]
Logan McGrath commented on JBJCA-847:
-------------------------------------
Yes, it builds a JAR instead of a RAR. The POM originally was capable of building both, but that's an Ant idiom and really not at all best practices for Maven. In some respects, a RAR is like a WAR where you can contain both classes and JAR's, but it's generally better for the RAR is to only contain the necessary JAR's along with your /META-INF/ironjacamar.xml and /META-INF/ra.xml deployment descriptors.
What I've been doing is creating multiple JAR projects that contain the resource API, the base implementation, and finally the specific implementation (sometimes there are multiple specific implementations) and then creating a separate RAR project that includes all these JAR's in its packaging with the deployment descriptors. You would follow this so you can mix and match dependencies and tailor the connector's settings and capabilities without modifying a pile of code (the open/closed principle: http://www.objectmentor.com/resources/articles/ocp.pdf)
For example:
* JAR projects:
** EDI Import API
** EDI SPI and Base Implementation
** EDI Over SFTP
** EDI Over FTP
* RAR project:
** Dependencies on the above projects
** /META-INF/ironjacamar.xml
*** Configured connection to vendor A over FTP
*** Configured connection to vendor B over SFTP
*** Configured connection to vendor C over FTP
If I wanted to add, say, "horse telepathy" as a means to transmit EDI files, then I just add another JAR project: EDI Over Horse Telepathy. Then add it as a dependency to the RAR and modify the deployment descriptor. Now I can support horse telepathy for all my vendors who use it, though in a real-world situation, email would be more likely.
Does that make sense?
> CodeGenerator Maven configuration misconfigures src/build paths, sets incorrect java version.
> ---------------------------------------------------------------------------------------------
>
> Key: JBJCA-847
> URL: https://issues.jboss.org/browse/JBJCA-847
> Project: IronJacamar
> Issue Type: Bug
> Components: Code Generator
> Affects Versions: 1.1.0.Beta1
> Reporter: Murray Todd Williams
> Assignee: Jeff Zhang
> Labels: maven
> Attachments: jbjca-847.patch
>
>
> 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.)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list