maven

maven assembly- sub folder

☆樱花仙子☆ 提交于 2021-02-19 05:32:58
问题 I want to use maven assembly plugin assembly '<plugin> <artifactId>maven-assembly-plugin</artifactId> <executions> <execution> <id>dist</id> <phase>package</phase> <goals> <goal>single</goal> </goals> <configuration> <descriptors> <descriptor>src/main/dist.xml</descriptor> </descriptors> </configuration> </execution> </executions> </plugin>' my descriptor file is : <assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2" xmlns:xsi="http://www.w3.org/2001

Jib-Maven-plugin with Jenkins scripted pipeline: how to log in to private docker registry?

家住魔仙堡 提交于 2021-02-19 05:20:29
问题 Regarding this problem, I updated my JHipster-Application with scripted Jenkins pipeline and have now in Jenkinsfile (partly following these hints): [...] def dockerImage withEnv(["DOCKER_CREDS=credentials('myregistry-login')"]) { stage('publish docker') { sh "./mvnw -X -ntp jib:build" } } with Jenkins global credentials myregistry-login saved in my Jenkins-Server to my own docker registry v2 docker-container https://myregistry.mydomain.com (domain changed for security reasons). I can

ConsoleZ maven color output

一世执手 提交于 2021-02-19 03:12:23
问题 Recent maven versions do colored output in terminal. Git Bash shows correct colors, but ConsoleZ configured to use git bash does not. It just outputs raw color codes. Does anyone know how to fix it $ mvn clean [←[1;34mINFO←[m] Scanning for projects... [←[1;34mINFO←[m] 回答1: I met the same issue in Window10 with Git Bash in both Console2 and ConsoleZ (try different configuration but it does not work). After a lot of attempt, I decided to give a try to ConEmu. Amazing, it works perfect. I can

ConsoleZ maven color output

三世轮回 提交于 2021-02-19 03:07:10
问题 Recent maven versions do colored output in terminal. Git Bash shows correct colors, but ConsoleZ configured to use git bash does not. It just outputs raw color codes. Does anyone know how to fix it $ mvn clean [←[1;34mINFO←[m] Scanning for projects... [←[1;34mINFO←[m] 回答1: I met the same issue in Window10 with Git Bash in both Console2 and ConsoleZ (try different configuration but it does not work). After a lot of attempt, I decided to give a try to ConEmu. Amazing, it works perfect. I can

Maven: How do I mark a jar as sealed?

依然范特西╮ 提交于 2021-02-19 02:52:25
问题 This sounds so simple, so why an I struggling? Is there a POM entry I can use to seal all the packages? Or do I provide a manifest with value 'Sealed: true'? Thanks Jeff Porter 回答1: > Or do I provide a manifest with value 'Sealed: true'? As explained in "Manifest Customization": <project> ... <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> <version>2.6</version> <configuration> <archive> <manifestEntries> <Sealed>true</Sealed> <

Is it possible to pass property file value to testng.xml as parameter value?

我是研究僧i 提交于 2021-02-19 02:03:44
问题 Is it possible to pass property file value to testng.xml as parameter value? Example: test.properties: browser = FIREFOX testng.xml: parameter name = "browser" value = "${test.browser}" 回答1: Yes, this is possible by filtering the testng.xml test resource. Inside your POM, you need to declare a filter poiting to your properties files and override the <testResources> to filter the testng.xml resource. <build> <filters> <filter>path/to/test.properties</filter> <!-- relative to location of POM --

maven surefire: when are we forced to set reuseForks=false?

雨燕双飞 提交于 2021-02-19 01:35:33
问题 In my project when I set reuseForks=true then i have to increase the forkCount to number of test classes. Otherwise, It is throwing illegalargument exception. Also, If I set reuseForks=false then it also work fine. Currently I have following configuration because number of test classes are less than 10. <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <version>2.18.1</version> <configuration> <reuseForks>true</reuseForks> <forkCount>10<

idea中web.xml默认版本问题解决

纵然是瞬间 提交于 2021-02-18 21:43:42
问题描述:用idea的maven新建一个webapp项目,自动生成的web.xml默认版本是2.3版本(这版本连EL表达式都默认不能使用,无语了)。 Servlet 2.3: <? xml version="1.0" encoding="UTF-8" ?> <! DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd" > < web-app > </ web-app > 1、临时解决办法: 把web.xml删掉。在Project Structure 里面的Modules重新添加一个Web.xml,能够生成并选择版本,但是这只是作用于当前项目。 2、永久解决办法: 修改默认版本,具体步骤如下: 进入“1.3”文件夹,找到jar包,如下图 用解压软件 打开文件,记住不是解压 。 按下图这个路径依次打开,找到web.xml文件: 直接打开web.xml,修改头文件,保存就可以了(注意:是在解压软件打开的的界面直接打开并修改web.xml,而不是解压成文件夹之后修改,也就是要保证jar包本来的结构不变)。 下面这个就是3.0的web.xml头文件,直接复制就可以。 <? xml version="1.0"

run test classes from other path in testng.xml file

自古美人都是妖i 提交于 2021-02-18 19:31:34
问题 I am fairly beginner in TestNG, Maven & IntelliJ. I have created a new maven project and defined a 'runtest' class under src/main/java. I am able to run testcases through testng.xml if I specify test classes under src/main/java. However, I want to specify my test classes inside src/test/java. If I specify any test class 'test1.java' under src/test/java and run, it gives error : Error: Cannot find class in classpath: java/test1 Workarounds I already tried: In testng.xml file, giving full path

Java Spring Boot - spring-boot-starter-tomcat dependency doesn't work with scope provided when running locally

做~自己de王妃 提交于 2021-02-18 19:03:08
问题 I'm developing a Java Spring Boot application that needs to run on our client's Tomcat server. This application basically contains a REST API that serves files to our frontend. Running this application locally went great until our first deployment testing on the client's servers. We had to refactor our code and add some dependencies to the projects' pom.xml. This eventually worked (kind of). Now I wanted to again start developing locally and noticed my code wasn't able to run with the same