multi-module

Maven multi module: error assembling WAR: webxml attribute is required

时光总嘲笑我的痴心妄想 提交于 2019-12-13 15:01:38
问题 I'm turning a single Eclipse Maven-managed webapp project in a multi-module Maven project (this is a test project to experiment with Maven, so feel free to provide any kind of suggestion). The single project webapp doean't have any error, succesfully compiles and behaves correctly when deployed, so I'm starting with a working application. The application has a web part and a console part, meaning that there are some classes with a main() method that when run from within Eclipse (with Run as -

Maven Properties Plugin

☆樱花仙子☆ 提交于 2019-12-13 05:14:16
问题 I am using Maven Properties plugin to load the properties from a properties file. My Project is a multi module project with EAR and EJB modules with there respective pom files. And there is a parent pom. I am getting an error if I dont keep the properties file at all three locations (i.e. one in parent module and one each in EAR and EJB modules). It throws a FileNotFoundException if the Properties file isnt there even in one location. I dont want to keep the same file at three different

Maven POM file: any rule on ordering of elements and sections?

可紊 提交于 2019-12-12 08:49:24
问题 Concerning the pom.xml Maven file: Is there any specific rule to apply to the ordering of declared sections? Does it have any importance or impact on the build? Shall I follow any official convention? 回答1: Although in most of the cases it is irrevant whether one section is declared before another, readeabilty could be indeed impacted when choosing a weird layout (e.g. Maven coordinates at the end). But that's not the most important point, because yes , ordering of certain elements can impact

sbt plugins isn't picked up from submodules?

萝らか妹 提交于 2019-12-12 07:15:15
问题 I'm trying to convert a single module project into two modules with a root aggregate. Feels like a normal thing to do. So, to simplify I have removed the second project that I added, but I do something like: cd myproject mkdir core mv * core and then add a build.sbt in myproject like lazy val root = project.in( file(".") ).aggregate(core) lazy val core = project in file("core") However, trying to build core I get: [myproject]/core/build.sbt:22: error: not found: value lessSettings seq

Gradle Maven like multi module project

佐手、 提交于 2019-12-12 06:30:37
问题 When you define multi module project in Maven, you have one root project and its modules. When you build the root project, Maven transitivelly builds all its modules in correct order. So far pretty similar to Gradle. But with Maven, you can clone only one submodule from repository and build it locally without need to download the whole project structure. This is because you define dependencies on other modules within the same project just as any other external dependency and it is downloaded

Share classes within modules in maven project

筅森魡賤 提交于 2019-12-12 02:55:14
问题 firstly I'm new to maven , so sorry for the question if it's too simple :) I have main module "main" and child modules : a , b , c , ... What I want is to share some data which is in child module a , with child module b. The parent pom looks like : 4.0.0 <groupId>Parent</groupId> <artifactId>Parent</artifactId> <packaging>pom</packaging> <version>1.0-SNAPSHOT</version> <modules> <module>a</module> <module>b</module> <module>c</module> </modules> </project> The child I want to share looks like

Springboot multimodule project

冷暖自知 提交于 2019-12-11 15:26:37
问题 I'm trying to get a clean springboot maven multimodule project. I'm using springboot 2.0.1.RELEASE What I want to achieve is similar to this: SpringBootMultipleMavenModules The problem I have is that I want to be able to inject my dependencies in any modules. For example in this class: DBSeeder.java looks as follow: private HotelRepository hotelRepository; public DbSeeder(HotelRepository hotelRepository){ this.hotelRepository = hotelRepository; } .. I would like to use instead: @Autowired

Where to add dependencies in MAVEN multi-module project

徘徊边缘 提交于 2019-12-11 12:57:23
问题 I am trying to make sense of all the dependency thing in maven multiple module projects. As a starting point I used appfuse to create a new spring mvc multi-module project. It initially has web and core modules. I found the knowledge of deploying this project. But when I get an error. I am confused of where to add a dependency or a plugin always. I would like to clarify with the following issue. I created a appfuse mvc multimodule project. I maven installed the core and then maven jetty7:run

Static hashmap not working

断了今生、忘了曾经 提交于 2019-12-11 11:49:55
问题 I have a multi module maven project. In which I have initialized a static hashmap in a common module. I am inserting values in that hashmap in other module called controller and when I want to iterate that hashmap in third module then it gives null. Here is my static hashmap initialization: public static HashMap<String, Integer> hmSimultaneousRequestTracker = new HashMap<String, Integer>(); Controller module: Constants.hmSimultaneousRequestTracker.put(inputjson.getSettings().getUsername(),1);

How should I share Maven DepdendencyManagement from multiple sources?

回眸只為那壹抹淺笑 提交于 2019-12-11 02:48:28
问题 I have a Maven project multimodule project. Some of the modules create custom packaging for the libraries produced by the other modules. The packaging being used has its own suite of versioned dependencies that I need to play nice with. As an example: my parent POM might have an entry for e.g. commons-codec:commons-codec 1.4 , my "core-lib" POM includes it as a dependency (sans explicit version), and I want to make sure my packaging module bundles in the right version. However, the specific