Skip to main content

Questions tagged [maven]

Maven is a plug-in based software project management tool which core features are automation of your software build, dependency management, and generating of reports and documentation.

Filter by
Sorted by
Tagged with
-2 votes
1 answer
70 views

Spring/Java multiple shared modules for different databases

I'm implementing a software based on the micro-service architecture using Spring/Java. Each micro-service connects to either a PostgreSQL or a MongoDB database. Is it standard practice to have a ...
Amirhosein Al's user avatar
2 votes
2 answers
233 views

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

In Java, there's the fairly ubiquitous notion of a POM file which provides the dependencies of your modules. For example https://repo1.maven.org/maven2/org/typelevel/cats-core_2.13/2.12.0/cats-core_2....
daniel purdew's user avatar
1 vote
0 answers
81 views

Package-by-feature within maven multi module package-by-layer project

As a consultant working for multiple companies that are using maven multi modules I have made the same discovery with all of them that I find strange. Lets say they want to build a webapp for a ...
olimtrail's user avatar
0 votes
1 answer
796 views

Handling OpenAPI Generated code in a Project's repository

In my company, we are would like to recommend OpenAPI and using the design first approach to API development. We would also like to use the OpenAPI Generator to generated server stubs and DTOs from ...
Nullbeans's user avatar
  • 139
-1 votes
1 answer
41 views

How to use versions-maven-plugin with shared contracts?

Context: We have Java maven Multi Microservices Project. The structure for each microservice is a contracts package and a service package. When we update a version of a specific microservice the ...
shanif's user avatar
  • 101
1 vote
1 answer
242 views

Gradle/Maven project splitting: interfaces and implementation

Assume we have a single large JVM project (the example is in Kotlin), containing code. As part of a refactoring effort, we are decoupling pieces of the code by splitting the code into multiple modules,...
Hidde's user avatar
  • 170
1 vote
1 answer
311 views

Extract common code into own module

I'm finding myself in a situation where I need to define common behaviour and implement it depending on the environment (minecraft server or javafx runtime). The simple graph below describes my idea. ...
wand555's user avatar
  • 21
1 vote
2 answers
265 views

Standard Maven approach for large, non-Java dependencies needed for build?

I'm interested in modernizing an existing codebase for a commercial software package written in Java, in part by moving it to Maven. The primary motivator here is to shrink our git repo, which is ...
AgentOddball's user avatar
1 vote
4 answers
3k views

Should test resource files be stored inside the Java class source directories?

In a TDD (Test-Driven Development)-based Java project built by maven, lots of classes needs to be tested with text-based input files such as .csv. At the beginning, I put them into the src/test/...
Rui's user avatar
  • 1,865
1 vote
1 answer
982 views

What is the better way to save swagger code gen plugin generated model classes in spring boot maven application?

I am working on a spring boot maven project in Eclipse IDE. And here is my pom.xml. <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/...
happytohelp's user avatar
0 votes
1 answer
4k views

May I and should I include my dependencies in the jar i publish online?

I'm developing a java project that I'd eventually like to publish and make open source. To make a executable jar file I use the maven-assembly-plugin. This includes my dependencies in the jar, which ...
Jojomatik's user avatar
1 vote
0 answers
83 views

Maven dependencies with versions [0.0.0,999.999.999)

I have this situation where we have a couple of maven repositories. Some are frontend..ish (JSP, Spring Controllers etc.) meant to be deployed as war files and others are for the hibernate mappings ...
Shell Code's user avatar
-4 votes
1 answer
96 views

How to setup $JAVA_HOME, because Maven is 1.6, and you are using Java 1.7 or higher?

I have a configuration problem, from this code, https://github.com/plum-umd/java-sketch. Here, I must set $JAVA_HOME, because: "One possible issue you may encounter while building sketch-frontend ...
tom's user avatar
  • 1
0 votes
2 answers
96 views

Validating provenance of release binaries of github projects obtained from Maven repository

If I obtain a release build of a github project from a Maven repository, how can I securely verify that it's the authentic build? DETAILS That was my X question. My Y question follows. Maven's ...
Andy Thomas's user avatar
  • 1,250
0 votes
1 answer
19k views

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

I know that "mvn clean install" cleans everything that has already been built by maven and rebuilds everything as specified by pom.xml. However, if things have already been installed, and I just run "...
Rongeegee's user avatar
  • 167
0 votes
1 answer
92 views

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

In a simple web architecture using Spring and Maven where it consists of following layers: Controller Service Repository Shared Where in shared module all the classes that are used among different ...
NuCradle's user avatar
  • 175
4 votes
2 answers
4k views

Maven: Versioning for multi module repository

Versioning is always a big question and I see many similar questions here, however none really answer my question so I try to highlight the things that are important to me specifically. We have a ...
a.ilchinger's user avatar
1 vote
0 answers
27 views

Dealing with other dependencies in your own Maven dependency

Maybe this question is a duplicate. However, I could not find a suitable article in my research. If you know an informative, comprehensive article about this topic, please send it to me. I want to ...
Sven M.'s user avatar
  • 111
2 votes
1 answer
3k views

Java package naming conventions (in maven modular project)

Until now I have been using simple strategy for packages naming in my maven-modular projects. Each package name contains name of the module in which it is placed. For example, simple project would ...
Norbert Dopjera's user avatar
2 votes
2 answers
6k views

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

A Java project with maven as build tool needs to be deployed to different environments, such as ci, dev, test, prod etc. Each environment has a properties file with the same set of properties such as: ...
Rui's user avatar
  • 1,865
3 votes
2 answers
2k views

Spring Boot REST Java Microservice: Why Use Maven Submodules?

I have seen a project which uses Maven submodules. The project itself is a spring boot application that exposes Restful API endpoints for a microservice ex: Customer Service (getCustomers, ...
user1955934's user avatar
0 votes
0 answers
474 views

How can I create a spring-boot application which can be easily extended with plugins?

I am planning a spring boot application that can be extended with plugins. However, I haven't found out yet whether spring boot meets my requirements in this regard. I imagine the following folder ...
schneidolf's user avatar
2 votes
2 answers
2k views

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

For a few months, there's a heated discussion ongoing in Guava's issues (#3302, #3320) about having introduced several internal dependencies, namely "failureaccess" and "listenablefuture". Some of ...
Olivier Grégoire's user avatar
0 votes
1 answer
204 views

Common methods for swapping out a library

I am trying to come up with a solution to replace joda-time with java 8 time in our product. The code-base encompasses many projects of which some import joda-time directly and some transitively. To ...
Kratt's user avatar
  • 11
0 votes
1 answer
3k views

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

I have an unresolvable dependency issue in a Maven project; different pieces of code depend on different versions of dependency A (i.e. most code needs A:0.15; some needs A:0.18). Fortunately, the ...
kingledion's user avatar
1 vote
0 answers
2k views

Multi module Maven project or separate repositories?

Consider the following architecture: Application A Application B Commons-Util A and B share a lot of functionality. That's why we plan to extract the shared code into a commons library. I am aware ...
Adrian Krebs's user avatar
4 votes
3 answers
594 views

Versioning depending on Third parties

I have a question about versioning when I depend on a third party (TP) project's versioning. Our current process is to release a new version every time TP creates a release with security fixes. The ...
JCalcines's user avatar
  • 151
-1 votes
1 answer
86 views

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

I'm building a Spark-based, text analysis package using both Java and Scala. I have a series of transform functions, which take in one dataframe and spit out another, and that can be chained together ...
kingledion's user avatar
1 vote
1 answer
7k views

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

How exactly should gitlab-ci behave to version my project ? A simple git flow on gitlab could be: commit on master -> build, test and deploy to staging tag on master -> build, test and deploy to ...
Tyvain's user avatar
  • 115
0 votes
1 answer
130 views

Should I postfix application.yml?

My project structure (Spring / maven): src / main / resources / application.yml src / test / resources / application.yml This is working well (when I launch test, it takes the test application.yml). ...
Tyvain's user avatar
  • 115
2 votes
0 answers
38 views

Periodically update files from s3 in a Java maven library used as Packaged JAR

I have an application say x which uses another Java library(say Y) as a JAR file . So y basically needs to download a file and load it into memory before any of it's methods are called at runtime by X....
techzombie's user avatar
4 votes
1 answer
2k views

Working with maven and multiple git repositories

We recently migrated from SVN, with most code in a single repo, to git, with most projects in their own repos (about 70 of them). We build about a dozen different apps from this java source. The apps ...
Scott Sancetta's user avatar
2 votes
1 answer
1k views

Private/Hiding dependencies between Maven modules

Given three project modules X, Y and Z on a Maven based project, and Y depends of Z and X of Y and X should not know that Y depends of Z, being this: X -> Y Y -> Z X -X> Z What is the best way to ...
SEISCOOL's user avatar
2 votes
2 answers
568 views

Microservice Architecture: Localizing core logic in a separate code base

I stepped away from a project for a few weeks. Before leaving the organization was discussing an architectural pattern for our microservices. An instance typically serves two roles in our organization....
IcedDante's user avatar
  • 157
-1 votes
1 answer
254 views

How, in eclipse do I work with an existing maven project in GitHub without ending up checking my .project file?

I have a maven project in GitHub that I wish to work with using eclipse. I want to keep the GitHub repository clear of any eclipse project artifacts such as the .project file. Is there a way to do ...
user1172468's user avatar
1 vote
0 answers
502 views

Maven plugin to operate at parent and child module levels?

I have a large multi-module java/maven application where each child module is it's own java application and the root parent pom defines the standard dependencies pom.xml - parent pom - child1/pom.xml ...
emeraldjava's user avatar
3 votes
0 answers
52 views

Maven project dependency management process

I'm writing what I might refer to as a Maven project dependency management process for a project I work on. Whenever a developer wants or needs to change the version number of an existing Maven ...
user3909631's user avatar
-3 votes
1 answer
347 views

Upload MIT-licensed code to maven repository [closed]

I found some java source code under MIT license on Github, but it is not included in any maven repository. I asked in issue to publish it somewhere, but nobody answered and looks like this repo is not ...
g4s8's user avatar
  • 126
1 vote
1 answer
63 views

Java/Maven and Scala/sbt projects share immutable thing

Project 1: a Java/Maven project Project 2: a Scala/sbt project Thing: generally, an immutable object instantiated in from 3rd party Java library. For example, ThingBuilder.foo("bar").build() ...
Pete's user avatar
  • 736
0 votes
2 answers
2k views

Deploy a NodeJs (FrontEnd) and a Spring (BackEnd) project as one artefact

I have a current project which consist out of two independently developed projects: Spring REST as back end Angular as front end I do have a Jenkins instance available for building my projects and I'...
Herr Derb's user avatar
  • 439
2 votes
1 answer
454 views

How to depend on forked external dependencies?

Our project uses Gradle (whose dependency system is compatible with Maven IIUC). When depending on external projects, we try to depend on stable versions. Sometimes we have to depend on a ...
Manuel Jacob's user avatar
0 votes
2 answers
123 views

Team collaboration with Maven - Java EE

For team of 6, We have spring MVC project being developed with Angular as Frontend and Spring framework as back end. From Java project build & version control aspect, Is it recommended, to not ...
user1787812's user avatar
0 votes
1 answer
330 views

What is a good versioning strategy to achieve 'fail fast' with chains of dependent maven submodules?

My organisation modularised their monolith into maven modules in dependencies up to four deep. Originally we used the maven plugin to auto-increment the version numbers in the pom every time someone ...
hawkeye's user avatar
  • 4,829
1 vote
2 answers
2k views

How to handle passing a DAO object with custom exceptions in java?

I have my multi module maven project with the following structure: + parent - pom.xml + model - persistents - dao - model stuff... - pom.xml + service - services - services ...
CodeSniffer's user avatar
4 votes
1 answer
332 views

Staging of artifacts in the build server?

Java artifacts are often staged through different "quality levels", named like alpha, beta, releaseCandidate, release etc. They enter the next stage if they have passed tests (automatic or manual ones)...
J Fabian Meier's user avatar
2 votes
1 answer
544 views

How to test web service

I want to test my web service/web method not by using SOAP but with Junit or other framework. The first solution that I have founded is to create stub of my project and use a client to call this ...
Liz Lamperouge's user avatar
2 votes
2 answers
2k views

What is the name of the interface-implementation pattern applied to modularisation?

At work we have a project where we're pushing pieces of the monolith into modules. (A java project making smaller maven modules that we pull in via maven dependencies). The pattern we're using pushes ...
hawkeye's user avatar
  • 4,829
0 votes
0 answers
161 views

Continuous integration - jar as part of an ear

In our company, we have large ear files to which developer groups contribute jars. This is a many-to-many relation, where each ear has 30-50 jars and some of the jars are within 10 or more ear files. ...
J Fabian Meier's user avatar
4 votes
1 answer
366 views

Choosing between adding a maven dependency vs. copying the one class I need

My project can benefit from a bit of code from the Apache commons-math3 project. Specifically, my math heavy application would benefit from using the FastMath class which avoids using extremely ...
Ivan's user avatar
  • 575
5 votes
0 answers
175 views

Can integration tests be run asynchronously with Maven?

Because I work at a company with lots and lots of computers, I find it to be a little ironic that it takes half an hour to cut a release of the latest version of our software. The bottleneck seems ...
Peter Turner's user avatar
  • 6,915