Use Intellij 2017.2.2 IDE. I have multiple maven module in a project. If i add a method in module1, to see the method in module2. I firstly have to build module1, then i will be able to see new added method in module2. Is there a option in intellij for this?
Related
I have a project structured as below.
parent
|---module1
|----pom.xml
|---module2
|----pom.xml
|---module3
|----src\main\java\source1
|----src\main\java\source2
|----src\main\java\source3
|----pom.xml
The issue here is intellij doesn't automatically recognize the sources under module3 and had to be defined explicitly under project setting > modules which is temporary and gets reset after every reimport.
Since intellij refers to standard <sourceDirectory> tag, I tried to put all sources under the tag but it accepts only single value.
Is there a way to configure the source folder under module3 on pom.xml so that maven and intellij both automatically recognizes the sources.
maven version I am using is apache-maven-3.6.0 and intellij version is
2020.2
I use Intellij Idea. I have a java gradle project with two modules ('main' and 'repo'). I add a dependency in the main module to the repo module, using the "Project Structure" menu. My project builds ok, but when I run a sonarqube task in my project, the module depencency has gone. Is there a way to add a dependency to a module in gradle, so it doesn't disappear?
If you configure your project only in IntelliJ your gradle configuration will not be change because it is an IntelliJ configuration only.
The "normal" way is: first you set your gradle configuration and then just open your project in IntelliJ. Everything will work automagically inside InTelliJ.
Here is the documentation explaining how to add a sub project in gradle.
I added gral-core Maven dependency to my project as it is explained here
http://trac.erichseifert.de/gral/wiki/Download
Problem is that I also need to add gral-examples.jar in Maven dependencies, but I cannot find the code for it. I need this to work because I share this project with few other people via EGit plugin for Eclipse, so I can't just add this library to build path, I need it to be Maven dependency.
I have a multi module maven project. One of the modules is a reusable part which is packaged into a jar, and the other is a war web-app which depends on the first module. When I use jetty:run-exploded on the second module, the packaged jar is taken from local maven repository whereas I want the first module to be rebuild and packaged into the resulting war. Is there any way to force such behavior instead of the default one?
From everything I can tell from reading documents about Maven's design and using Maven myself this cannot be done in the projects own directory.
Maven will not follow module paths UP a hierarchy. Using -amd (also make dependencies) will only work at the top level module that ties all the other multi-module pom's together. So what you can do is this:
At the TOP level directory
mvn -amd -pl jetty_module jetty:run-exploded
I think you can use maven Advanced Reactor Options to archive this.
http://www.sonatype.com/people/2009/10/maven-tips-and-tricks-advanced-reactor-options/
The -pl or –projects option allows you to select a list of projects from a multimodule project. This option can be useful if you are working on a specific set of projects, and you’d rather not wait through a full build of a multi-module project during a development cycle.
Maven -amd(also-make-dependents ) also help to build multi module project once. Using that you can build a project and any project that depends on that project.
I have a multi module maven project (a war) on of these modules utilized executes a post-compile step to update JiBX bindings.
I would like to use IntelliJ to build and deploy this project. However I can't seem to figure out how to get IntelliJ to kick off the JiBX compiler. Any thoughts?
If it isn't possible to kick off the JiBX compiler, I'd like IntelliJ to treat the module that requires the JiBX compilation step as a "normal" dependency and simply pull the appropriate jar from my local maven repository.
If you don't have this already... in your IntelliJ run/debug configuration check the "Run Maven Goal" checkbox and choose jibx:bind from the jibx entry under plugins.