multi-module

PlayRunHook does not work in multi module projects

跟風遠走 提交于 2019-12-08 15:19:32
We need a base play framework projects which contains other play and scala projects as module. Those inner independent projects can have different javascript frameworks and build system like webpack, gulp, etc. So I tried the PlayRunHook from https://www.playframework.com/documentation/2.4.x/SBTCookbook . Single project hooking working as expected. But, unable to get it right on multi module project. Some code samples... Project Structure base/build.sbt name := """base""" version := "1.0-SNAPSHOT" lazy val commonSettings = Seq( scalaVersion := "2.11.6", libraryDependencies ++= Seq( jdbc, cache

How can I override tasks ``run`` and ``runMain`` in SBT to use my own ``ForkOptions``?

血红的双手。 提交于 2019-12-07 16:43:00
问题 Problem In a multimodule build, each module has it's own baseDirectory but I would like to launch applications defined in modules employing the baseDirectory of the root project instead of the baseDirectory relative to modules involved. This way, applications always would take relative file names from the root folder, which is a very common pattern. The problem is that ForkOptions enforces the baseDirectory from the module and apparently there's no easy way to change that because forkOptions

How to activate maven profile from command line (to build subsystem)

时光怂恿深爱的人放手 提交于 2019-12-07 15:41:20
问题 I have a Maven project https://github.com/paulvi/MavenMultiModule1 with root pom.xml as <modules> <module>MavenModule1</module> <module>MavenModule2</module> </modules> <properties> </properties> <profiles> <profile> <id>p1</id> <modules> <module>MavenModule1</module> </modules> </profile> <profile> <id>p2</id> <modules> <module>MavenModule2</module> </modules> </profile> </profiles> I would like to be able to build subsystem separately, e.g. mvn package -P p1 and mvn package -P p2 Both

sbt plugins isn't picked up from submodules?

为君一笑 提交于 2019-12-07 01:48:55
问题 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

Maven says I have a cyclic reference in multi-module project but can't figure out why

[亡魂溺海] 提交于 2019-12-06 22:36:56
问题 I have a multi-module project that looks like this: module1 pom.xml module2 pom.xml pom.xml The pom.xml in module2 has a dependency on module1. When I run mvn clean compile I get the following error: The projects in the reactor contain a cyclic reference. Here are my dependencies in module1: <dependencies> <dependency> <groupId>log4j</groupId> <artifactId>log4j</artifactId> <version>1.2.14</version> </dependency> <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-log4j12</artifactId>

How to resolve dependencies between modules within multi-module project?

柔情痞子 提交于 2019-12-06 17:24:00
问题 After working with Maven for a while, I am thrilled by the many features that Maven brings into the build architecture, particularly the dependency management. However, I have run into one issue again and again - how Maven resolves dependencies between multi-module projects. I am wondering if this is the big flaw of the current Maven implementation and/or if there is any satisfactory workaround. Let's say I have a multi-module Maven project. The Parent pom contains three modules -- moduleA

Maven Multi Module insists on duplicating datasource application.properties in business module

孤街浪徒 提交于 2019-12-06 11:23:16
问题 I have spring boot maven java multi module structure. My structure is: product (parent pom module) ..product-data (child pom module) ..product-business (has dependency for product-data) ..product-rest (has dependency for product-business) ..product-entities (child pom module) product-data will return entity object to product-business and product-business will return entity object to product-rest and product-rest returns json object. product-data runs fine. But as soon as I run product

Maven assembly on multi module project with special structure

久未见 提交于 2019-12-06 05:03:07
问题 I'm new to Maven, and I think I've started to get the idea of how it works. But I'm not able to understand the maven assembly plugin. What I want to achieve is this: When all projects has been packaged, with their respective dependencies, I want to have them all in the target directory. I don't want them to be packaged into one super-jar because the system is based on modules. Let me explain, I have a main project, the server, in the maven project "common", and I have two modules, "core" and

Maven multimodule project composition regarding dependencies sharing

点点圈 提交于 2019-12-06 03:33:58
问题 There are a few similar questions, but nothing like this. How do you deal with this situation (typical scenario) : A project of 8-11 child projects, having a parent artifact/project and one main project that mostly uses/declares those others as modules. The problem is that all projects "strictly" share only the common dependencies, like testng, logging, apache commons and stuff . But always like 3 of them use 50-60% of the same specific deps (apache-chemistry, jackrabbit, abdera, etc.),

How to release Maven multi-module project with inter-project dependencies?

杀马特。学长 韩版系。学妹 提交于 2019-12-06 00:43:19
问题 Lets say we have 3 layers project. DB, Business, Web and aggregating pom. Project |-DB | |-pom.xml |-Business | |-pom.xml |-pom.xml All modules are ment to be released and branched together, so Aggregator pom is configured to assign the same version to all submodules. We have the following versions: DB-0.1-SNAPSHOT Business-0.1-SNAPSHOT which depends on DB-0.1-SNAPSHOT Web-0.1-SNAPSHOT which depends on Business-0.1-SNAPSHOT When doing release:prepare , all versions updated to 0.1, but prepare