pom.xml

PMD coulnd't find ruleset

眉间皱痕 提交于 2020-01-23 03:09:04
问题 I'm on creating a maven based java project, which contains the PMD maven plugin. I use my own rule set XML and it works like a charm, except two rule sets: the emptycode and the unnecessary : when I run the build, maven says: " can't find resource ". The role definitions look like: <role ref="rulesets/emptycode" /> and <role ref="rulesets/unnecessary" /> In every other cases, this kind of definition works. What I found out is that: there is a rule set with the name " unnecessary " under

The superclass “javax.servlet.http.HttpServlet” was not found on the Java Build Path

早过忘川 提交于 2020-01-20 14:37:29
问题 I'm a beginner and learning spring and hibernate (utilizing maven in project)and came across this problem and got stuck here. tried finding solution but ended up no where. Please help. thanks a lot Error: "Can not find the tag library descriptor for "http://java.sun.com/jsp/jstl/core" Code: <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> <%@ taglib uri="http://www.springframework.org/tags" prefix="spring" %> <%@ taglib uri="http://www.springframework.org/tags/form" prefix=

How to include custom files in JAR with Maven assembly plugin jar-with-dependencies

只谈情不闲聊 提交于 2020-01-15 11:16:26
问题 I need to include custom file (/com/app/log4.properties) in a final JAR. How can I add one file to my JAR when using jar-with-dependencies? Now there are only class files in that JAR. I'm using: mvn assembly:assembly My pom.xml: <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>3.0</version> <configuration> <encoding>UTF-8</encoding> <source>1.6</source> <target>1.6</target> </configuration> </plugin> <plugin>

Maven: Get goal configuration from execution element

断了今生、忘了曾经 提交于 2020-01-15 01:48:26
问题 Let's imagine I have following mojo: @Mojo(name = "some-goal") public class MyMojo { @Parameter(required = true) protected ComplexObject param; /*...*/ } Also I have plugin's descriptor in pom: <plugin> <!-- here artifact description --> <executions> <execution> <phase>...</phase> <goals><goal>some-goal</goal></goals> <configuration> <param>...</param> </configuration> </execution> </executions> </plugin> For test this plugin I use maven-plugin-testing-harness And my test code is: @Test

Gradle trying to unzip a pom typed dependency

送分小仙女□ 提交于 2020-01-14 14:42:49
问题 In a project of mine I have a dependency on a java matrix library MTJ which I specify like this in build.gradle : dependencies { ... compile 'com.googlecode.matrix-toolkits-java:mtj:1.0.4' ... } MTJ in turns depends on netlib, more concretely it would be the equivalent of explicitly adding compile 'com.github.fommil.netlib:all:1.1.2' above. When I run the gradle build. I get the following error: Could not expand ZIP '/Users/valentin/.gradle/caches/modules-2/files-2.1/com.github.fommil.netlib

Maven - Executable file from a java project

十年热恋 提交于 2020-01-14 13:56:11
问题 I need to use maven (for a school project) to create an executable file from a single maven command. I've never used maven and tried many solutions here on stackoverlow. The solutions created a jar file, but the file never opened. This is my project structure src com project code swing programm interface Main.class I know this isn't maven convention, however changing it now would mean I would have to adjust the imports (as intelliJ doesn't refactor everything perfectly) for around 40 classes.

what does pomOnly() do in .sbt files?

别来无恙 提交于 2020-01-14 07:24:07
问题 what does pomOnly() do in .sbt files? For example, "com.github.fommil.netlib" % "all" % "1.0" pomOnly() 回答1: Indeed, SBT reference guide does not seem to provide much info about pomOnly() . As per mvnrepository, the dependency "com.github.fommil.netlib:all" corresponds to an aggregate pom.xml: <dependency> <groupId>com.github.fommil.netlib</groupId> <artifactId>all</artifactId> <version>1.0</version> <type>pom</type> </dependency> The call of pomOnly() in build.sbt indicates to the dependency

enforce custom rule in external projects

主宰稳场 提交于 2020-01-14 05:51:07
问题 I have one Parent maven project and 4 modules in that project: Now I want to put some custom rule that says there can be no project versions or dependency versions that begin with the string "master-". This rule will be applicable to all the external projects that depends on eBill Software. So I created a new module with name customRule whose parent is again eBill Software. I followed writing-a-custom-rule and my rule class is in new module. Relevant part of CustomRule.java in module

Maven sourcing dependency version from great-grand-parent instead of our parents dependency-management

╄→尐↘猪︶ㄣ 提交于 2020-01-13 01:53:10
问题 Below shows the hierarchy of my POMs. You can see that we have a company parent-pom for spring boot projects. This POM has spring-boot-starter as it's parent, and it imports our own dependency-management BOM. [INFO] --- hierarchy-maven-plugin:1.4:tree (default-cli) @ user-service --- [INFO] PARENT com.MY_COMPANY.platform:user:3.20.14-SNAPSHOT [INFO] PARENT com.MY_COMPANY.platform:spring-boot-parent:3.20.12-SNAPSHOT [INFO] PARENT org.springframework.boot:spring-boot-starter-parent:1.5.12

Maven sourcing dependency version from great-grand-parent instead of our parents dependency-management

感情迁移 提交于 2020-01-13 01:52:27
问题 Below shows the hierarchy of my POMs. You can see that we have a company parent-pom for spring boot projects. This POM has spring-boot-starter as it's parent, and it imports our own dependency-management BOM. [INFO] --- hierarchy-maven-plugin:1.4:tree (default-cli) @ user-service --- [INFO] PARENT com.MY_COMPANY.platform:user:3.20.14-SNAPSHOT [INFO] PARENT com.MY_COMPANY.platform:spring-boot-parent:3.20.12-SNAPSHOT [INFO] PARENT org.springframework.boot:spring-boot-starter-parent:1.5.12