pom.xml

Couldn't run build using Maven because of an error in pom.xml

China☆狼群 提交于 2020-01-12 14:40:08
问题 I am trying to build a new Maven project in Eclipse. In my pom.xml, I got an error which says Multiple annotations found at this line: - Missing artifact maven-plugins:maven-findbugs-plugin:plugin:1.3.1 - Missing artifact maven-plugins:maven-cobertura-plugin:plugin:1.3 Here is my dependency code for "cobertura" in pom.xml: <dependency> <groupId>maven-plugins</groupId> <artifactId>maven-cobertura-plugin</artifactId> <version>1.3</version> <type>plugin</type> </dependency> I tried adding

IntelliJ IDEA: How to synchronize project libraries with dependencies in pom.xml?

旧城冷巷雨未停 提交于 2020-01-11 09:13:27
问题 When I change a dependency version in one of the pom.xml of my project (which has several modules) I see the new version and also the old one in the Libraries section of the Project Structure. For example, recently I changed Drools from version 5.4 to 5.5. When I entered the Libraries section I saw both libraries so I manually removed the 5.4. How can I tell IDEA to remove libraries that are not referenced in the pom.xml files? Thank you 回答1: Well, this is not problem with synchronize project

Spring Boot Controller 404

蓝咒 提交于 2020-01-11 03:33:07
问题 I am fairly new in Spring Boot and trying to build a simple web app. I have defined a controller class containing my mapping for url, but on browser it is giving me a white label page error(404). I am not able to understand why it is not able to map. I have tried changing my component scan base package, but it still doesn't redirect me to page "abc" or print "in controller" in the console. pom.xml <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns

Maven pom error in eclipse with Scala

这一生的挚爱 提交于 2020-01-07 03:06:10
问题 I am importing a project which works and built fine through "mvn clean install" and old eclipse Kepler. I am now importing the project to eclipse Luna/Mars, and got the following errors: Plugin execution not covered by lifecycle configuration: net.alchim31.maven:scala-maven-plugin:3.2.1:compile (execution: scala-compile, phase: process-resources) After read some articles, I added the following to my pom.xml (the parent pom.xml) of a few modules: <pluginManagement> <plugins> <plugin> <groupId

In maven project How to download the library in source/binary, mentioned in the <parent> tag in POM file?

不想你离开。 提交于 2020-01-07 01:52:27
问题 This is the pom file. <project> <parent> <groupId>org.jboss.weld</groupId> <artifactId>weld-api-bom</artifactId> <version>1.0</version> <relativePath>../bom/pom.xml</relativePath> </parent> <modelVersion>4.0.0</modelVersion> <artifactId>my-module</artifactId> <dependencies> <dependency> <groupId>javax.el</groupId> <artifactId>el-api</artifactId> <optional>true</optional> </dependency> </dependencies> </project> I know, to download the dependencies(above its "el-api") we should use mvn

Maven: how to query the executable classpath?

这一生的挚爱 提交于 2020-01-06 20:04:00
问题 I have a maven project with some specified dependencies. <dependency> <groupId>commons-io</groupId> <artifactId>commons-io</artifactId> <version>2.4</version> </dependency> How can I query maven to find out the path it's using for these dependencies, or the classpath I should use for independent execution? My goal is to build a wrapper which runs the program with the appropriate classpath. 回答1: Several alternatives are available in Maven: Maven Dependency Plugin (build-classpath goal) Look at

Dispatcher servlet startup error- ConfigurableWebApplicationContext.APPLICATION_CONTEXT_ID_PREFIX and existence of multiple context warning

[亡魂溺海] 提交于 2020-01-06 07:27:35
问题 I get these two exceptions successively when I start my application on websphere application server. 1- Uncaught init() exception created by servlet [context] in application [MosipJobEar4]: java.lang.IllegalStateException: Cannot initialize context because there is already a root application context present - check whether you have multiple ContextLoader* definitions in your web.xml! at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:182) at org

How to disable specific tests for mvn package command?

六眼飞鱼酱① 提交于 2020-01-06 07:09:43
问题 I have integration tests in the package: my.campaign.ololo.controller.external I want to not run that tests during mvn clean package So I wrote following in my pom.xml <build> <plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> </plugin> <plugin> <artifactId>maven-surefire-plugin</artifactId> <version>2.21.0</version> <configuration> <excludes> <exclude>my.campaign.ololo.controller.external</exclude> </excludes> </configuration> <

How to disable specific tests for mvn package command?

混江龙づ霸主 提交于 2020-01-06 07:09:34
问题 I have integration tests in the package: my.campaign.ololo.controller.external I want to not run that tests during mvn clean package So I wrote following in my pom.xml <build> <plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> </plugin> <plugin> <artifactId>maven-surefire-plugin</artifactId> <version>2.21.0</version> <configuration> <excludes> <exclude>my.campaign.ololo.controller.external</exclude> </excludes> </configuration> <

Build project does not include all the classes

扶醉桌前 提交于 2020-01-05 13:07:07
问题 I build my project with: mvn clean package when I try to run it i get the following error: [TestNG] [ERROR] Cannot find class in classpath: eu.copla.test.sanity.communications.ctm.ESH2320_CTM_Limitation I unziped the .jar file and the classes were not there that's why the ERROR, so I have to include them, as far as I know is a pom.xml issue I tried to include them in the pom.xml in this way: <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-clean-plugin</artifactId>