Questions tagged [maven-3]

Apache Maven is a tool for project management and build automation. This tag is for questions relating to Maven version 3.x. For non version-specific questions, please use the [maven] tag.

Apache Maven is a tool for project management and build automation. Maven relies on a pom.xml file that describes the project instead of defining a set of tasks, like Ant does.

A basic pom.xml looks like:

<project>
  <!-- model version is always 4.0.0 for Maven 2 and Maven 3 POMs -->
  <modelVersion>4.0.0</modelVersion>

  <!-- A project is identified by its groupId, artifactId and version -->
  <groupId>com.mycompany.app</groupId>
  <artifactId>my-app</artifactId>
  <version>1.0</version>

  <!-- Dependencies -->
  <dependencies>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.8.1</version>
      <!--
           The scope allows you to limit the usage of this dependency.
           In this case, this library will only be used for tests purposes.
      -->
      <scope>test</scope>
    </dependency>
  </dependencies>
</project>

Many plugins exist, and offer more functionalities to the tool.


For non version-specific questions, please use , for the older maven versions 2.x or the legacy 1.x use or , respectively.

If you see questions related to a specific Maven plugin, please also check whether the related plugin tag is present (i.e. , ).

Questions related to Maven plugin development should also have the , while questions related to Maven profiles should also have the tag and questions related to Maven archetypes should also have the tag.

5199 questions
2
votes
2 answers

set favicon to maven-javadoc-plugin generated javadoc file

I can set window title using following code in "maven-java doc-plugin". name but I cannot set "favicon" to my java doc
2
votes
1 answer

How to call test classes from src folder and build using maven

I am trying to call test classes from src main using maven but unable compile using maven my project structure is like below My main class looks like package com.automation.selenium.demo; import com.automation.selenium.test.demo.TestClass; public…
saba
  • 539
  • 1
  • 14
  • 30
2
votes
0 answers

Package com_atlassian_clover is not visible

I am experimenting with java modules and unit tests. So I also have the clover plugin within my maven pom.xml: org.openclover clover-maven-plugin 4.2.0
PowerStat
  • 3,757
  • 8
  • 32
  • 57
2
votes
1 answer

Maven Integration-Test how to set-up POM correctly for different Profiles

I am having problems controlling how Maven copies resource files during the Dev Compile/Test steps and the Integration-Test Compile/Verify steps. I've created two Profiles in Maven, Dev and Integration-Test. I've created a config.properties file for…
2
votes
0 answers

Maven pom inheritance ands overriding in parent child module

I was curious how to decide whether our element in child pom will override the parent pom detail or just get added along with the parent pom inherited elements in child pom. Let us take an example to understand : For example, each dependency is…
Number945
  • 4,631
  • 8
  • 45
  • 83
2
votes
2 answers

How to bundle an existing java executable in a maven mojo

I have an existing java command-line program, that takes a bazillion of arguments and parses them using excellent args4j. I now want to make a maven plugin mojo that will run the Java code contained in this application. As of now, I've tried the…
Riduidel
  • 22,052
  • 14
  • 85
  • 185
2
votes
1 answer

Centralized local Maven repository for Team

Our team of developers uses Maven for building software. We have Maven local repository on our computers. The problem is that sometimes builds made from two different developer differ, because the built packages include different version of included…
JiboOne
  • 1,438
  • 4
  • 22
  • 55
2
votes
2 answers

Get a complete dependency graph in maven

I have a problem with maven dependencies. I try in my maven plugin to have a full dependencies graph, but some duplicated nodes does not appear. My maven project is made of : "dependency_test", the parent project of 4 modules "mod1", "mod2",…
2
votes
1 answer

How to overwrite resource file with less priority via Maven?

in our maven module we have multiple resource folders src/main/prod/sql and src/main/dev/sql. In prod we have scripts for production where are a lot of data inserts. We need overwrite some files in prod/sql directory with files in dev/sql when…
Denis Stephanov
  • 4,563
  • 24
  • 78
  • 174
2
votes
1 answer

How to compile against lower bound in Maven dependency version range

Is there a way, in Maven, to declare a dependency version range and have it resolve against the lower bound for the compile phase of the build? eg. I declare a dependency using version range [1.2.0,1.999.999]. I would like for the compile phase to…
Jesse
  • 3,751
  • 1
  • 21
  • 19
2
votes
1 answer

maven build works on windows but fails on linux

I have some project which is maven based. the same project builds well on the windows but fails on the linux Windows --------------- : C:\project\code\microservice\ConfigService>mvn clean package [INFO] Scanning for projects... [INFO] [INFO]…
scoder
  • 2,451
  • 4
  • 30
  • 70
2
votes
1 answer

MVN release fails with "Repository does not allow updating assets: releases" when it should not

We have a multi module project for which we want to do a release using the following command mvn release:prepare release:perform -B -e -X which fails with 07:54:12 [INFO] Caused by: org.eclipse.aether.transfer.ArtifactTransferException: Could…
papanito
  • 2,349
  • 2
  • 32
  • 60
2
votes
2 answers

Maven project initializer

Is there an easy way to initialize maven projects which is equal to spring initializer? (https://start.spring.io/). What I meant was an easy interface rather than going through command line or without using paid IDE.
Akalanka
  • 1,411
  • 12
  • 14
2
votes
0 answers

How to increase snapshot version or release version automatically through maven

How to increase snapshot version or release version automatically through maven. I am aware we could use maven goals such as release:prepare or release:update-versions. But i have a scenario where my snapshot version or release version should…
user11881
  • 65
  • 2
  • 12
2
votes
1 answer

IntellIj Idea 2018.1 cannout download sources with maven 3.6

I am using ubuntu (16.04 xenial). Ubuntu repository contain old version of maven (3.3), but I need 3.6 I download maven 3.6 from offical site, add maven folder to PATH environment variable (/home//programs-in-path/apache-maven-3.6.0/bin). Now…
UserKa
  • 333
  • 2
  • 8