multi-module

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

喜你入骨 提交于 2019-12-05 21:26:48
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 profiles are visible but can't be activated with -P switch mvn help:all-profiles -P p1 That work with other

Multiple versions of the same multi-modules maven project under eclipse

家住魔仙堡 提交于 2019-12-05 10:33:07
I'd like to work on two different versions of the same multi-modules maven project under eclipse. Unfortunately, when you import a multi-module maven project under eclipse, you can change the parent module project name yourself, to prevent conflicts, but not the child modules projects names . Child modules are imported as root projects, named after the module name. Apparently there is no way to rename them during import. In an ideal scenario, I'd like to keep the pom as it is . Obviously I'd like to keep the same eclipse workspace ... Yes, you can. You have to change the name pattern in the

Parent properties inside maven antrun plugin

谁都会走 提交于 2019-12-05 07:38:11
There is a multi-module project. Inside the child I need to do some complicated stuff (integration test with deploying to application server and so on). So there is an integrationtest child, and from this module I need the root of the parent to reach other modules. I do not want to use "..". There is a property in integrationtest POM: <properties> <main.basedir>${project.parent.basedir}</main.basedir> ... </properties> And there is an antrun plugin with the following content: <plugins> <plugin> <artifactId>maven-antrun-plugin</artifactId> <executions> <execution> <id>render-parameter-sql</id>

sbt plugins isn't picked up from submodules?

爷,独闯天下 提交于 2019-12-05 06:16:54
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(lessSettings:_*) which is the settings for a plugin added in project/plugins.sbt of the original project now

How to inherit from a multimodule Maven project with all its goodies?

落花浮王杯 提交于 2019-12-05 04:21:30
The problem to which I cannot find a nice, scalable solution: I have a project that delivers multiple flavours of the given artifact. This has been set up as a multimodule project, currently with 3 modules: /flavour1_module /flavour2_module /flavour3_module The thing is that I have another 50 projects that need to be setup in the same way, i.e. delivering the 3 flavours. Solutions considered: turning the already created multimodule project into a parent for all other 50 projects Cons: It just doesn't work. The instructions kept withing parent's modules are not inherited, thus they are not

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

时光怂恿深爱的人放手 提交于 2019-12-05 04:09:14
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> <version>1.6.1</version> </dependency> <dependency> <groupId>com.jcraft</groupId> <artifactId>jsch<

Problem with Eclipse and a Maven multi-module project

你离开我真会死。 提交于 2019-12-04 18:55:34
问题 I have created a Maven project with the following structure: + root-project pom.xml (pom) + sub-projectA (jar) + sub-projectB (jar) I have done the following steps: mvn archetype:create –DgroupId=my.group.id –DartifactId=root-project mvn archetype:create –DgroupId=my.group.id –DartifactId=sub-projectA mvn archetype:create –DgroupId=my.group.id –DartifactId=sub-projectB So I have, obviously, in the top-level pom.xml the following elements: <modules> <module>sub-projectA</module> <module>sub

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

自古美人都是妖i 提交于 2019-12-04 17:34:13
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-business, I get error "Cannot determine embedded database driver class for database type NONE" . Spring looks

Feasibility of getting Maven aggregator pom to inject properties into module poms (not using inheritance)

烈酒焚心 提交于 2019-12-04 09:03:53
A bit of a feasibility question for you regarding Maven. Particular, on whether we can define properties in an aggregating pom and then inject them into the referenced modules, thus allowing that module to locally overwrite the default properties defined in the inheritance hierarchy. If you're interested in specifics I'll describe my setup. Before I do though, let me just say that we have discussed our project structure as a team extensively and it fits our needs very well. We are not looking for suggestions on other structures at this point, but exclusively exploring whether maven can fulfil

Execute gradle task on sub projects

我的梦境 提交于 2019-12-04 07:49:21
问题 I have a MultiModule gradle project that I am trying to configure. Root projA projB other projC projD projE ... Want I want to be able to do is have a task in the root build.gradle which will execute the buildJar task in each of the projects in the other directory. I know I can do configure(subprojects.findAll {it.name != 'tropicalFish'}) { task hello << { task -> println "$task.project.name"} } But this will also get projA and projB, I want to only run the task on c,d,e... Please let me know