Skip to main content
5 votes

Team collaboration with Maven - Java EE

I don't think there's any recommended way to go. That said, as a developer, I would hate a company where the IDE choice is imposed. Developers are more productive and happy with their favourite tools....
Joel's user avatar
  • 441
4 votes

Working with maven and multiple git repositories

It might not be a direct answer, but I have the feeling these are more the symptoms than the "disease". If I may, I think the main issue is that a feature implies touching so many different projects. ...
dagnelies's user avatar
  • 5,503
3 votes

Team collaboration with Maven - Java EE

My preferred option is: command line maven and CI is the reference and should always work if you have code conventions, everybody need to respect them (practically: be nice and have formatting ...
ptyx's user avatar
  • 5,871
3 votes

Why is it considered bad that Guava introduced direct, internal dependencies?

Hmm hard to untangle but I guess I would sum it up as follows Google has a class com.google.common.util.concurrent.internal.InternalFutures This class is used, literally copied, in two places Guava :...
Ewan's user avatar
  • 84.4k
3 votes

How to maintain and configure properties files for different environments in Java maven project?

As you indicate, the property values belong to the environment, not the application. So the best solution is for Maven to be totally unaware of the property values for the various environments. The ...
kiwiron's user avatar
  • 2,404
3 votes

Spring Boot REST Java Microservice: Why Use Maven Submodules?

To my experience, for small apps or very small services you are right, maven modules make thing unnecessary complex in two ways: technical and cognitive. However, modules can be of much help when: ...
Laiv's user avatar
  • 15k
3 votes
Accepted

Versioning depending on Third parties

Versioning is hard, and there are no right answers, occasionally there is a good answer. At a minimum you should be bumping you minor version when you update third party dependencies. When a ...
Ryathal's user avatar
  • 13.5k
3 votes

Handling OpenAPI Generated code in a Project's repository

Typically, generated code is not committed into a repository. Only the input files needed to generate the code are. The generation is done as part of a build process, especially if it's fast. In cases ...
Thomas Owens's user avatar
  • 85.9k
3 votes
Accepted

What's the value in exposing the dependencies you used for your tests?

There is absolutely no value. Indeed information not used in runtime is actively detrimental after deployment. However, Maven is a very old and simple tool. It does not do any processing of POM file ...
Basilevs's user avatar
  • 4,484
3 votes

What's the value in exposing the dependencies you used for your tests?

When I checkout the source code of a project and I want to compile and test it, this tells maven that it needs to pull munit_2.13 to run the test stage. Without the dependency the test likely would ...
Frank Hopkins's user avatar
2 votes
Accepted

How to keep track of maven dependency updates in projects?

Consider using dependency-check https://www.owasp.org/index.php/OWASP_Dependency_Check It has a Maven plugin and command line tool. You can use it to warn you if you use "dangerous" dependency ...
JF Meier's user avatar
  • 700
2 votes
Accepted

Where do you put tests that are not unit tests in a Maven project?

But, I also have test "mains" that are intended to be run using spark-submit at the command line. There are two primary functions for these test mains: the first is to ensure that I don't run into ...
VoiceOfUnreason's user avatar
2 votes
Accepted

Gitlab-ci and Maven: how to deal with project version?

I personally dislike it if the release/deployment process makes any commits or tags on its own. Therefore, in general my preferred approach is: Versions are managed manually, but possibly using ...
amon's user avatar
  • 136k
2 votes

Spring Boot REST Java Microservice: Why Use Maven Submodules?

I have worked with varying project structures like Everything is in same maven project, single module, different packages. Every layer even api and implementation in different maven projects, and ...
Nils's user avatar
  • 207
2 votes

How to have parent and child modules in Maven that both package as jar files?

You should not be doing this. Parent POMs have pom as their packaging, and even if you make it work technically, you break expectations and many Maven plugins will not forgive you. I would refactor ...
JF Meier's user avatar
  • 700
2 votes

Maven: Versioning for multi module repository

First of all, you're mixing two things that are completely independent from each other: (One for all or one for each) SCM repository and Maven projects with their versioning. Note that sub-module ...
Gerold Broser's user avatar
2 votes
Accepted

What is difference between 'mvn install" and "mvn clean install" in maven?

mvn clean install tells maven to do the clean phase in each module before running the install phase for each module. mvn clean is its own build lifecycle phase (which can be thought of as an action ...
Nitin Bisht's user avatar
1 vote

Where Should You Add a Shared Maven Module as a Dependency in an N-tier Architecture

See the first sentence of Introduction to the Dependency Mechanism, Transitive Dependencies: Maven avoids the need to discover and specify the libraries that your own dependencies require by ...
Gerold Broser's user avatar
1 vote

Maven: Versioning for multi module repository

What I want to do is keep offering releases for the individual modules, because it makes updating much easier. (Bugfix release? just exchange the jar file). But I always want to release distribution ...
Laiv's user avatar
  • 15k
1 vote

Java package naming conventions (in maven modular project)

Dividing the same java package between projects/artifacts is not a good idea, potentially doesn't even work when combined with signing, classloading and other mechanisms. It is also pretty confusing. ...
Robert Bräutigam's user avatar
1 vote

Versioning depending on Third parties

It looks like you actually have a couple problems here: Versioning Breaking changes in third party libraries Within your application infrastructure, you only need to worry about the versioning and ...
Berin Loritsch's user avatar
1 vote
Accepted

Why is it considered bad that Guava introduced direct, internal dependencies?

Companies who want to legally use open source libraries must account for each dependency in their product, even transitive dependencies. This is especially true if your product is not itself open ...
Karl Bielefeldt's user avatar
1 vote
Accepted

Should I postfix application.yml?

Somehow, the application needs to find the configuration file. There are two approaches: The app knows in which context it is run and finds the correct config file for that context. Usually this just ...
amon's user avatar
  • 136k
1 vote

How can I holistically manage a multi module multi repository application

This might be a subjective answer, but I find that git submodules, combined with a good Makefile, can initialize code in a fluid way even from IntelliJ. Makefiles have the subtle but awesome feature ...
Sam Gammon's user avatar
1 vote

How to keep track of maven dependency updates in projects?

I don't want to veer into product recommendations but there are vendor solutions that allow you to run these kinds of checks. One that I am slightly familiar with consists of a private proxy maven ...
JimmyJames's user avatar
  • 30.9k
1 vote
Accepted

Custom maven mojo and tools

I think the first option with standard dependencies would be the say to go. I would suggest that you use released version of the 3rd party tools. As a back up you could a provide an 'offline' mode ...
emeraldjava's user avatar
1 vote

Choosing between Single or multiple projects in a git repository?

From your example, the repositories should be setup in terms of how interdependent they are. All the reasoning about designing MicroServices and Domain Driven Design apply here: in some cases ...
Arwin's user avatar
  • 157
1 vote

Private/Hiding dependencies between Maven modules

You do not want the programmers of X to use classes of Z. You can achieve this with the Maven dependency plugin: https://maven.apache.org/plugins/maven-dependency-plugin/analyze-only-mojo.html This ...
JF Meier's user avatar
  • 700
1 vote

Microservice Architecture: Localizing core logic in a separate code base

I'm wary of your objections. Usually because I'm the one adding projects, separating stuff out into components adding build servers and octopus deployment etc and getting moaned at for 'making things ...
Ewan's user avatar
  • 84.4k
1 vote

Microservice Architecture: Localizing core logic in a separate code base

I can't presume to know enough about what you are dealing with, specifically. However, in software development there are trade-offs, and those trade-offs have to be considered with the benefits and ...
Berin Loritsch's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible