We have a solution where there are lots of business services using our UI projects EJB client dependencies. The problem with Maven is that the client .jar usually consists of around 1-2 sections, yet they carry full dependency of the entire service application. It can be a bit ugly, when .ear files begin to increase pop up to 50-100 MB and from time to time due to errors in the inevitable dependency hiding the UI application. Of course, we can always exclude reliance on customer dependencies, but then we have to write a single bunch of lines for each client project using those services and it is a very useless repetition. Also, people come up with strange error messages and use them a lot of time before remembering them to mention that they include some client jars and did not check what additional dependencies they have in the equation . Example: It is only being included in a service customer; Imagine having many of these in many different applications and you get the picture, typing abusive is very annoying and Project POM starts getting long enough. I tell the dependency as provided, but there are certain dependencies that cause accident on runtime, if they are not present. Say that another service call includes another app with an external exception class, which is not wrapped in a reason or any other service project, and if the Noughfeiff will create an exception at runtime, if not so. So, I know that it is possible to include / include the generation of the ezb client through the use of pom.xml spectacles on the Maven-Ezb-Plugin, but also what to exclude dependency The way? It seems that Maven does not support the creation of many jars just outside of a module. Thus, the only proper way around it is that we make second modules (xxx-service and xxx-service-client in xxx-break service) and only XXX-XXX for the EJB client / delegate class. Service client modules can be configured & amp; Minimum dependencies In this way the project can be made with single execution.
& lt; Dependency & gt; & Lt; Group & gt; Fi.path.to.service & lt; / Group & gt; & Lt; ArtifactId & gt; Customermanagement-common & lt; / ArtifactId> & Lt; Version & gt; 2.6 & lt; / Edition & gt; & Lt; / Dependencies & gt; & Lt; Dependency & gt; & Lt; Group & gt; Fi.path.to.service & lt; / Group & gt; & Lt; ArtifactId & gt; Custommanagement service & lt; / ArtifactId> & Lt; Classifier & gt; Customers & lt; / Classifier & gt; & Lt; Exclusions & gt; & Lt; Exclusion & gt; & Lt; Group & gt; Fi.path.to.dependency & lt; / Group & gt; & Lt; ArtifactId & gt; Internal dependency - # 1 & lt; / ArtifactId> & Lt; / Exclusion & gt; & Lt; Exclusion & gt; & Lt; Group & gt; Org.codehaus.castor & lt; / Group & gt; & Lt; ArtifactId & gt; Castor & lt; / ArtifactId> & Lt; / Exclusion & gt; & Lt; Exclusion & gt; & Lt; Group & gt; Fi.path.to.dependency & lt; / Group & gt; & Lt; ArtifactId & gt; Internal dependency - # 2 & lt; / ArtifactId> & Lt; / Exclusion & gt; & Lt; Exclusion & gt; & Lt; ArtifactId & gt; Internal dependency - # 3 & lt; / ArtifactId> & Lt; Group & gt; Fi.path.to.dependency & lt; / Group & gt; & Lt; / Exclusion & gt; & Lt; Exclusion & gt; & Lt; ArtifactId & gt; Internal dependency - # 4 & lt; / ArtifactId> & Lt; Group & gt; Fi.path.to.dependency & lt; / Group & gt; & Lt; / Exclusion & gt; & Lt; Exclusion & gt; & Lt; ArtifactId & gt; Internal dependency - # 5 & lt; / ArtifactId> & Lt; Group & gt; Fi.path.to.dependency & lt; / Group & gt; & Lt; / Exclusion & gt; & Lt; Exclusion & gt; & Lt; ArtifactId & gt; Castor-xml & lt; / ArtifactId> & Lt; Group & gt; Org.codehaus.castor & lt; / Group & gt; & Lt; / Exclusion & gt; & Lt; Exclusion & gt; & Lt; ArtifactId & gt; Castor-codegen & lt; / ArtifactId> & Lt; Group & gt; Org.codehaus.castor & lt; / Group & gt; & Lt; / Exclusion & gt; & Lt; Exclusion & gt; & Lt; ArtifactId & gt; Castor-xml-schema & lt; / ArtifactId> & Lt; Group & gt; Org.codehaus.castor & lt; / Group & gt; & Lt; / Exclusion & gt; & Lt; Exclusion & gt; & Lt; ArtifactId & gt; Internal dependency - # 6 & lt; / ArtifactId> & Lt; Group & gt; Fi.path.to.dependency & lt; / Group & gt; & Lt; / Exclusion & gt; & Lt; / Exclusions & gt; & Lt; Version & gt; 2.6 & lt; / Edition & gt; & Lt; / Dependencies & gt;
Comments
Post a Comment