multi-module

Maven : Multimodule projects and versioning

不问归期 提交于 2019-12-03 08:37:22
问题 What are the best practices for software versioning and multimodules projects with Maven? I mean, when I create a multimodules project with Maven, what is the best approach for the versioning? To use a single version for all the modules (defined in the top project)? To use a version for each module (defined in the POM of each module)? Is there another approach that I'm missing? What are the pros and cons of each approach? In general, are the different modules released together (possibly

End to end integration test for multiple spring boot applications under Maven

纵饮孤独 提交于 2019-12-03 05:50:50
问题 What is the recommended way of running an end to end integration test for multiple Spring boot applications in the Maven build's verify phase? Basically, I have a multi-module Maven project where several modules are separate spring boot applications. These separate applications have their own configuration for data sources, integration flows with JMS queues, etc. For example, application A will poll a database for an event, and when that occurs, it produces a JSON file of data and puts a

Maven naming conventions for hierarchical multiple module projects

余生长醉 提交于 2019-12-03 03:04:47
问题 I've got a question on Maven naming conventions (groupId, artifactId and directory names) in a multiple module project with a hierarchical directory structrure. Research Before asking, I went through other the web on this topic and what I cleared out for myself: Possible duplication for my question, but it does not cover multiple-hierarchy levels. Project directory name should match artificatId. Guide to Naming Conventions provide examples: groupId will identify your project uniquely across

Why and when to create a multi-module Maven project?

时光毁灭记忆、已成空白 提交于 2019-12-03 02:40:49
I have a general question about Maven's multi module project. When and why to go for it? khmarbaise The answer of @Esko Luontola Splitting the project into multiple modules is useful for example if the modules need to be deployed separately,.. could be misinterpreted. If you have modules which will be deployed separately, it's exactly the opposite. In such case, you should never create a multi-module build. This should be done via simple separate maven projects. The idea of a multi-module build is if you have modules which belong together like an ear project which usually consists of several

Right way to use @ComponentScan in multi module Java-Config Spring MVC app

偶尔善良 提交于 2019-12-03 01:38:19
I've just started a new spring project, and this time I want to do things "right". In the last project I had issues with multiple registering of certain classes because of multiple @ComponentScan annotations. (i.e. all service classes got registered twice) Basically I'm using the following layout: WebAppInitializer : public class WebAppInitializer extends AbstractAnnotationConfigDispatcherServletInitializer { @Override protected Class<?>[] getRootConfigClasses() { return new Class[] { RootConfig.class }; } @Override protected Class<?>[] getServletConfigClasses() { return new Class[] {

How to import properties and targets from ant build file properly?

给你一囗甜甜゛ 提交于 2019-12-02 17:45:39
问题 I want to make project with two modules. App and server. Server depends on app. When I compile server I want to include class files from app into the build. But it resolves classpath relatively to server and not to app because of import issues. How to make ant resolve app locations relatively to app and server locations relatively to server. I din't get how it's done in ant docs. Could you please explain in a more simple way? Code snippet to clarify question little bit. App build.xml:

Maven naming conventions for hierarchical multiple module projects

余生长醉 提交于 2019-12-02 16:37:38
I've got a question on Maven naming conventions (groupId, artifactId and directory names) in a multiple module project with a hierarchical directory structrure. Research Before asking, I went through other the web on this topic and what I cleared out for myself: Possible duplication for my question, but it does not cover multiple-hierarchy levels. Project directory name should match artificatId . Guide to Naming Conventions provide examples: groupId will identify your project uniquely across all projects, so we need to enforce a naming schema. It has to follow the package name rules (eg. org

In a Maven project, how can I automatically update the version all child modules, plus the parent?

蹲街弑〆低调 提交于 2019-12-02 14:18:15
I have a multi-module project. parent POM (1.0-SNAPSHOT) |-- module1 (1.0-SNAPSHOT) |-- module2 (1.0-SNAPSHOT) `-- module3 (1.0-SNAPSHOT) When I execute mvn release:prepare it verify that parent POM has a SNAPSHOT version and all dependent modules don't have a SNAPSHOT version. How automatically update all child modules from SNAPSHOT to the next release version? I would like automatically increment version for all modules. Pascal Thivent The release plugin can handle that. Did you check Updating POM Versions ? But... I don't get something. Changing the version in the POMs from x-SNAPSHOT to a

How to import properties and targets from ant build file properly?

﹥>﹥吖頭↗ 提交于 2019-12-02 12:08:54
I want to make project with two modules. App and server. Server depends on app. When I compile server I want to include class files from app into the build. But it resolves classpath relatively to server and not to app because of import issues. How to make ant resolve app locations relatively to app and server locations relatively to server. I din't get how it's done in ant docs. Could you please explain in a more simple way? Code snippet to clarify question little bit. App build.xml: <project name="app"> <property name="app.build.dir" location="build"/> <target name="compile"> <echo message=

read properties file in multi module project

徘徊边缘 提交于 2019-12-02 09:08:12
问题 Hi I have a project which has two modules with the following structure project │ └───Module1 │ |---abc.jsp │ │ ├───Module2 │----src.main. | |---java. | |---com.xyz.comp | │----------Action.java | | └───resources |---com.xyz.comp │ prop.properties Now My Module1 has a dependency on war of Module2(Module2 is an independent war file). My problem is that the abc.jsp of Module1 submits to the Action.java of Module2. In which when I try to access prop.properties gives null pointer exception. public