multi-module

Maven copy resources in multi module project

左心房为你撑大大i 提交于 2019-12-01 02:54:43
My need is pretty basic but I could not find any clean answer to it: I simply need to be able to distribute a resource in a multi-module project. Let us consider for example the LICENSE file, which I hereby assume to be the same for all modules. I prefer not to manually copy it into each and every module because the file could change over time. I also prefer not to statically link to resources (even if using relative paths) outside the project folder, because the modular structure can possibly change too. Is there any plugin that can be used to robustly guarantee that each module is given the

ERROR : error.NonExistentClass Kotlin In multi module Dagger project

淺唱寂寞╮ 提交于 2019-12-01 02:12:52
I'm using Dagger 2 and Kotlin for Android development. My project is also a multi-module project. My settings.gradle file is like this: include :app include :lib I'm also maintaining the lib module. In the Dagger Files (for example in the component), I try to get the item from other module. For example: @Component interface AppComponent{ fun getPresenter() : Presenter } The Presenter object is defined in lib module. I was working in linux environment and I'm using Android Studio 3 preview canary 5. The code is working well and I am able to generate APK. But my company wanted to generate the

How to use master pom file to checkout all modules of a web application and build all modules

会有一股神秘感。 提交于 2019-11-30 22:18:11
I have a web application that relies on several modules. So to build it, I have a master pom.xml file. What I want this pom file to do is to checkout out all the modules. below is my pom file. <executions> <execution> <id>check-out-project1</id> <phase>generate-sources</phase> <goals> <goal>checkout</goal> </goals> <configuration> <checkoutDirectory>${project.build.directory}/module1</checkoutDirectory> <connectionUrl>scm:svn:svn://svnserver/svn/module1/trunk</connectionUrl> <!--<developerConnection>scm:svn:svn://svnserver/svn/module1/trunk</developerConnection>!--> <username>username<

In a multi-module project, can a maven module access transitive test-scoped dependencies of another module it depends on?

梦想与她 提交于 2019-11-30 15:06:51
问题 I have a multi-module Maven+Spring project. Some modules depend on other modules. Let's say we have a module named services that depends on the module named persistence . The services module : At Spring level, imports the persistence context At Maven level, depends on the persistence module The persistence module defines some configuratrion related to the... persistence : datasource, JPA, transactions... It has some dependencies for testing the DB (JDBC drivers, DBCP, H2) that are limited to

maven: multi-module project assembly into single jar

醉酒当歌 提交于 2019-11-30 14:53:57
问题 I have a multi-module project and want to create a single jar containing the classes of all my modules. Inside my parent POM, I declared the following plugin: <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-assembly-plugin</artifactId> <configuration> <descriptorRefs> <descriptorRef>bin</descriptorRef> </descriptorRefs> </configuration> </plugin> However, when running mvn assembly:assembly, only the source from the parent folder (empty) are included. How do I include

sbt plugins isn't picked up from submodules?

五迷三道 提交于 2019-11-30 14:15:04
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

maven: multi-module project assembly into single jar

◇◆丶佛笑我妖孽 提交于 2019-11-30 12:45:26
I have a multi-module project and want to create a single jar containing the classes of all my modules. Inside my parent POM, I declared the following plugin: <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-assembly-plugin</artifactId> <configuration> <descriptorRefs> <descriptorRef>bin</descriptorRef> </descriptorRefs> </configuration> </plugin> However, when running mvn assembly:assembly, only the source from the parent folder (empty) are included. How do I include the sources from my modules into the archive? I think you are looking for the Maven Shade Plugin: http:/

Is there any benefit in using Maven Multimodule when working in a small application?

流过昼夜 提交于 2019-11-30 08:36:05
问题 We are building a small application using different architectural layers such as domain, interface, infrastructure and application. This follows the Onion DDD model. Now I am wondering if there is any benefit in splitting the application into a multimodule maven project. As far as I can see now it seems to make things more difficult than needed. The entire application will be deployed as a single WAR file into a Tomcat container. 回答1: Splitting your application makes sense for the following:

Maven multi-module: aggregate common dependencies in a single one?

回眸只為那壹抹淺笑 提交于 2019-11-30 07:01:35
I have searched for such a question without finding anything, so here I go. I have a multi-module maven project. Multiple modules all inherit the same parent, where common dependencies are defined. Among them, there is one my own modules, a 'common' one, where some common functionality is implemented. My question is: What would be a better practice for common dependencies: Define them all explicitly in the parent, like I currently do? Or define them in a 'common' module, which other modules reference, and then rely on transitivity (like a single-entry-point for common dependencies)? Caps It's

Maven Multi-module dependency package not found

♀尐吖头ヾ 提交于 2019-11-30 06:51:43
I've got a multi module project: The parent POM.xml: <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>1.4.3.RELEASE</version> </parent> <groupId>be.bodyreset</groupId> <artifactId>bodyreset-parent</artifactId> <version>1.0.0-SNAPSHOT</version> <packaging