I guess this sums up my situation, but provides no resolution: http://maven.40175.n5.nabble.com/Building-war-with-multi-module-classes-and-no-module-jars-td98441.html
On Fri, 13 May 2011 17:22:55 +0300, Alexandros Karypidis <akary...@yahoo.gr> wrote: > Hello, > > I have just realized what the source of my problem is and think that this > is a bug in the multi-module configuration. By studying the debug output > of Maven I found that: > > - maven-jar-plugin packages the classes into the jar > - maven-jibx-plugin runs in "process-classes" phase after compile > - with a multi-module project where B has bindings that depend on A, the > following happens: > > 1) Project A is compiled. > 2) Project A is packaged into a JAR (no JiBX classes here). > 3) Project B which depends on A is compiled. > 4) Project B generates is bindings BUT produces output in both > "A\target\classes" and "B\target\classes". > 5) Project B is packaged into a JAR (only JiBX classes in > "B\target\classes" make it into the archive > > As a result, the classes placed in "A\target\classes" (step 4) are NOT > included A.jar (step 2), because they are generated after the archive is > created. > > Similarly, they do not make it into B.jar (step 5) because even though > they were generated earlier (step 4), they were placed into > "A\target\classes", which is not included in B.jar. > > This seems like a bug to me... > > On Fri, 13 May 2011 16:40:44 +0300, Alexandros Karypidis > <akary...@yahoo.gr> wrote: > >> Hello again, >> >> A minor correction: behavior of "mvn verify" and "mvn package" is >> identical. The classes do NOT disappear from "target\classes". As I >> originally posted. >> >> Can anyone clarify what I need to do to get maven to include >> jibx-generated classes in the JAR archives? >> >> Thank you in advance! >> >> On Fri, 13 May 2011 16:32:25 +0300, Alexandros Karypidis >> <akary...@yahoo.gr> wrote: >> >>> Hello, >>> >>> I've started using jibx in my web application, which is built using >>> maven. >>> I therefore followed the instructions at the site >>> (http://jibx.sourceforge.net/maven-jibx-plugin/usage.html). I am >>> observing >>> the following weird (at least to me) behavior: >>> >>> 1) When I run "mvn compile", the binding compiler is NOT executed at >>> all. >>> >>> Is this normal? >>> >>> 2) When I run "mvn test" or "mvn verify", the binding compiler is >>> executed >>> and I can see the generated bindings (JiBX_jibx_bindingCLASSNAME.class) >>> in >>> the target\classes folder. However, in the case of "mvn verify", the >>> webapp is also packed into a WAR. The modules with bindings are placed >>> in >>> WEB-INF/lib and do NOT include the bindings (even those are left in the >>> target\classes folder). >>> >>> Is this normal? How can I include the JiBX bindings in >>> WEB-INF/lib/module.jar >>> >>> 3) When I run "mvn package", the classes created from the JiBX binding >>> compiler are DELETED some time after being generated. Therefore, there >>> is >>> nothing in the target\classes folder, and also nothing in the >>> WEB-INF/lib/module.jar archive within my generated WAR (as in the case >>> of >>> "mvn verify", only this time the classes have disappeared altogether). >>> >>> Is this normal? How can I include the JiBX bindings in my WAR's >>> WEB-INF/lib/module.jar >>> >>> Expecially in the case of "verify" and "package" I end up with a >>> "broken >>> WAR", as deploying it causes (naturally" the "Unable to access binding >>> information for class" exception discussed here: >>> >>> http://jibx.sourceforge.net/faq.html#nobind >>> >>> ------------------------------------------------------------------------------ >>> Achieve unprecedented app performance and reliability >>> What every C/C++ and Fortran developer should know. >>> Learn how Intel has extended the reach of its next-generation tools >>> to help boost performance applications - inlcuding clusters. >>> http://p.sf.net/sfu/intel-dev2devmay >>> _______________________________________________ >>> jibx-users mailing list >>> jibx-users@lists.sourceforge.net >>> https://lists.sourceforge.net/lists/listinfo/jibx-users >> >> ------------------------------------------------------------------------------ >> Achieve unprecedented app performance and reliability >> What every C/C++ and Fortran developer should know. >> Learn how Intel has extended the reach of its next-generation tools >> to help boost performance applications - inlcuding clusters. >> http://p.sf.net/sfu/intel-dev2devmay >> _______________________________________________ >> jibx-users mailing list >> jibx-users@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/jibx-users > > ------------------------------------------------------------------------------ > Achieve unprecedented app performance and reliability > What every C/C++ and Fortran developer should know. > Learn how Intel has extended the reach of its next-generation tools > to help boost performance applications - inlcuding clusters. > http://p.sf.net/sfu/intel-dev2devmay > _______________________________________________ > jibx-users mailing list > jibx-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/jibx-users ------------------------------------------------------------------------------ Achieve unprecedented app performance and reliability What every C/C++ and Fortran developer should know. Learn how Intel has extended the reach of its next-generation tools to help boost performance applications - inlcuding clusters. http://p.sf.net/sfu/intel-dev2devmay _______________________________________________ jibx-users mailing list jibx-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jibx-users