1

I created a project with many Abstract and Generic classes to work with and some composite components. I changed the packing to JAR and used it as a maven dependency for another projects.

So, everything on server side is working. Spring injects my classes and stuff.. But the composite components isn´t found. I search around stackoverflow, and saw some errors referencing the JARs dirs. But I don´t know if I put the composite component on the core project at the correct dir. This is the path I added it (normally, as if it was a client-project):

  - br
       - main
              - webapp
                     - resources
                              - myCompositeFolder

Is it correct? How do I change maven packing to make it work?

I also want to ask another thing... I have to costumize composite component 'injecting' some extra code from the client-project. To do that, I did something like this on the component:

<ui:include src="/filters/extraFilters.xhtml" />

and that file (extraFilters) will be located on the client-project webapp folder. I tested on the same project, it worked. Just don´t know if it will work loading from a JAR!

Marco Noronha
  • 115
  • 1
  • 9
  • 31
  • Non-maven answer: http://stackoverflow.com/questions/8320486/structure-for-multiple-jsf-projects-with-shared-code/8320738#8320738 Key is thus: they should ultimately end up in `/META-INF/resources` of JAR in `/WEB-INF/lib`. – BalusC Mar 06 '13 at 13:30
  • Thanks for the answer BalusC. I´ll try to do it manually and see what happends, I´ll post the answer here in a bit. – Marco Noronha Mar 06 '13 at 13:56
  • I tried that, created the META-INF and put the resources there... But on maven install, it didn´t bring the subfolders [resources/myCompositeFolder]. Brought the folder with a folder named 'maven' and the 'MANIFEST.MF' :( – Marco Noronha Mar 06 '13 at 14:01

1 Answers1

1

I made it work without the WAR.

Thanks to Visola (http://bearprogrammer.com/). The solution was: but the composite folder inside the parent (core) project:

 src\resources\META-INF\resources

And , done! All in one JAR!

Thanks BalusC, Visola and Jin!

Marco Noronha
  • 115
  • 1
  • 9
  • 31