Last call to make your voice heard! Our 2022 Developer Survey closes in less than a week. Take survey.

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
-4 votes
0 answers
24 views

What are the possible metrics by which I can assess whether a Java library is suitable to use? [closed]

Disclaimer: I am not sure if this question is not proper for this stack-site. If it is not, I would really appreciate if you could please point me to a proper place for such questions or leave a ...
user avatar
  • 93
1 vote
3 answers
127 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/...
user avatar
  • 1,467
0 votes
0 answers
66 views

Should we use a separate artifact repository for Maven snapshots?

Background We are currently using Maven for build and dependency automation. Our source code is in CodeCommit/Git. We are investigating CodeArtifact as our Maven artifact repository. We are using ...
user avatar
1 vote
1 answer
408 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/...
user avatar
0 votes
1 answer
630 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 ...
user avatar
1 vote
0 answers
41 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 ...
user avatar
-4 votes
1 answer
55 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 ...
user avatar
  • 1
0 votes
2 answers
83 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 ...
user avatar
  • 1,250
0 votes
1 answer
9k 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 "...
user avatar
  • 119
0 votes
1 answer
75 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 ...
user avatar
  • 165
2 votes
2 answers
2k 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 ...
user avatar
1 vote
0 answers
25 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 ...
user avatar
  • 111
1 vote
1 answer
2k 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 ...
user avatar
1 vote
2 answers
4k 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: ...
user avatar
  • 1,467
2 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, ...
user avatar
0 votes
0 answers
143 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 ...
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 ...
user avatar
0 votes
1 answer
143 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 ...
user avatar
  • 11
0 votes
1 answer
2k 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 ...
user avatar
1 vote
0 answers
1k 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 ...
user avatar
4 votes
3 answers
313 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 ...
user avatar
  • 151
-1 votes
1 answer
56 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 ...
user avatar
1 vote
1 answer
5k 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 ...
user avatar
  • 115
0 votes
1 answer
95 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). ...
user avatar
  • 115
2 votes
0 answers
27 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....
user avatar
4 votes
1 answer
1k 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 ...
user avatar
2 votes
1 answer
969 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 ...
user avatar
2 votes
2 answers
417 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....
user avatar
  • 157
-1 votes
1 answer
181 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 ...
user avatar
1 vote
0 answers
408 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 ...
user avatar
3 votes
0 answers
49 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 ...
user avatar
-3 votes
1 answer
282 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 ...
user avatar
  • 126
1 vote
1 answer
61 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() ...
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'...
user avatar
  • 379
2 votes
1 answer
275 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 ...
user avatar
0 votes
2 answers
113 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 ...
user avatar
0 votes
1 answer
268 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 ...
user avatar
  • 4,761
1 vote
2 answers
1k 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 ...
user avatar
4 votes
1 answer
295 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)...
user avatar
2 votes
1 answer
466 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 ...
user avatar
1 vote
2 answers
486 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 ...
user avatar
  • 4,761
0 votes
0 answers
157 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. ...
user avatar
4 votes
1 answer
203 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 ...
user avatar
  • 565
5 votes
0 answers
129 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 ...
user avatar
  • 6,867
0 votes
2 answers
944 views

How can I holistically manage a multi module multi repository application

I am writing an application that I've split into multiple jars including re-usable infrastructure libraries, each has their own versions (BOM managed) and git repositories. I'm doing this for a number ...
user avatar
1 vote
1 answer
97 views

How to share new features in a large multi module project [duplicate]

I have been working in large multi module projects over a period of time. One major issue I faced is, how to communicate to other teams of a new feature which they may be interested in. Consider this ...
user avatar
1 vote
1 answer
453 views

Should adding Maven dependencies be a separate git commit?

I implemented some CSV reading functionality to my Java program, for which I required adding a Maven dependency. Should changes to pom.xml be part of the commit for the CSV reading functionality, or ...
user avatar
0 votes
0 answers
724 views

Is it a good practice to build multiple web app war files from one source repo?

I have been asked to do the following: Take a project within a repo (repo has multiple projects inside) Build ant build script that will build two separate tomcat webapp war files. They are two web ...
user avatar
  • 2,939
7 votes
2 answers
6k views

For which problems are dependency exclusions sensible solutions?

I've seen a few build tools in my career, and they've all had their quirks. I'm just now looking into Maven, and came across the idea of "dependency exclusions" for the first time. I honestly don't ...
user avatar
  • 321
2 votes
2 answers
984 views

How to keep track of maven dependency updates in projects?

How do you keep track of maven dependency versions? Let's say you are using version 1.0.5 of an library. <dependency> <groupId>groupIdName</groupId> <artifactId>...
user avatar
  • 163