6
I was working with EJB and dealing with four simple Maven projects, a web project ,a desktop project (JSE Swing), a project (JSE) that had only the interface and ultimately a web project (which I called Core) that implemented this penultimate interface-owned project.
The business rule at first was quite simple a Hello Brother that printed next to this message the name of the user that was received by parameter. This was a very simple program that even a child with a smile on his face could understand.
I was using Glassfish application server. The "Core" project that contained the implementation of the business rule was the first to be deployed and the other two consumed this service through a remote interface.
So far so good I implanted and tested all of them and they worked! The Swing , the web all legal !
Moral of the story:
Although simple it took some work to build it, that is, I had to create manually one by one, I wrote a single business rule, which saved considerable time, thanks to the EJB. My teacher a very nice guy created the same project using Maven , using only three command lines via terminal.
I have no idea what he did! I would like an explanation of how it is possible to do this!! Writing only the business rule and terminal with Maven!!
if I understand well you want to know how to generate a project with Maven? Or you want to generate the business rules with Maven also?
– Emir Marques
@Thanks for your kind attention! What I want is to create the same simple business rule and generate the 4 projects cited in the question of a single blow with the Maven, automatically!
– Pena Pintada
Want to replicate the business rule in 4 different projects? Or want to create 4 different projects in the same command?
– Emir Marques
So one project (JSE) is left with just the interface , another with the implementation (Java web , which I call the core) of this interface and the other two (a web project and the other JSE) consume the service of the project that implements the interface, both seek in the core project what they need!!
– Pena Pintada