maven

maven更换阿里云仓库

一个人想着一个人 提交于 2021-01-31 08:32:55
本来不想写,网上到处都是,不过好多到我这不行,自己记录下,省的到处找 D:\apache-maven-3.6.1\conf目录下setting.xml文件(这是我的解压的位置) <mirrors> <mirror> <id>alimaven</id> <name>aliyun maven</name> <url>http: // maven.aliyun.com/nexus/content/groups/public/</url> <mirrorOf>central</mirrorOf> </mirror> </mirrors> pom.xml: 注意位置: <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-mongodb</artifactId> </dependency> </dependencies> <repositories> <repository> <id>alimaven</id> <name>aliyun maven</name> <url>http: // maven.aliyun.com/nexus/content/repositories/central/</url> <releases> <enabled> true <

IDEA overwrite报错、languagelevel设置不生效问题

故事扮演 提交于 2021-01-31 05:45:21
发现idea 倒入项目后,发现@override报错,发现是idea的jdk版本不对,需要设置大于1.5的jdk版本 解决办法: IDEA:File >> Project Structure >> Project 中设置Project language level如下 IDEA:File >> Project Structure >> Modules 中设置Project language level如下 如果languagelevel总是无效,每次项目重新编译后该配置想总是回到jdk5,需要在pom中加入plugin属性 < build > < plugins > < plugin > < groupId > org.apache.maven.plugins </ groupId > < artifactId > maven-compiler-plugin </ artifactId > < version > 3.1 </ version > < configuration > < source > 1.6 </ source > < target > 1.6 </ target > < encoding > UTF-8 </ encoding > </ configuration > </ plugin > </ plugins > </ build >

maven依赖中的<scope>provided</scope>

一笑奈何 提交于 2021-01-30 03:01:22
compile 默认的scope,表示 dependency 都可以在生命周期中使用。而且,这些dependencies 会传递到依赖的项目中。适用于所有阶段,会随着项目一起发布 provided 跟compile相似,但是表明了dependency 由JDK或者容器提供,例如Servlet AP和一些Java EE APIs。这个scope 只能作用在编译和测试时,同时没有传递性。???????? runtime 表示dependency不作用在编译时,但会作用在运行和测试时,如JDBC驱动,适用运行和测试阶段。 test 表示dependency作用在测试时,不作用在运行时。 只在测试时使用,用于编译和运行测试代码。不会随项目发布。 system 跟provided 相似,但是在系统中要以外部JAR包的形式提供,maven不会在repository查找它 来源: oschina 链接: https://my.oschina.net/u/4393390/blog/4933333

How to debug a Maven OpenJFX application in IntelliJ

拜拜、爱过 提交于 2021-01-29 20:12:41
问题 Since JavaFX has become OpenJFX and needs to be added as a dependency to your Maven project, debugging a OpenJFX application has become complicated. In this question it is already answered how to solve it for NetBeans. But IntelliJ works slightly different. The Ppom.xml has been setup according to this example. How can you run an OpenJFX (JavaFX) application which is configured as a Maven project in debug mode in IntelliJ? 回答1: If you would copy the addition of VM options in the pom.xml for

how do I tell maven 3.6.3 to get latest version of artifact from custom repository

妖精的绣舞 提交于 2021-01-29 19:45:05
问题 I need to download the latest version of artifact from custom repository rather than maven repository.(Download a latest single artifact from the custom repository) I followed the how do i tell maven to get latest version of artifact from custom nexus repository. How do I tell Maven to use the latest version of a dependency? https://www.baeldung.com/maven-dependency-latest-version <dependencies> <dependency> <groupId>com.LDBS</groupId> <artifactId>LDBS</artifactId> <version>1.0.0-SNAPSHOT<

proguard: Can't find common super class of org/apache/poi/hpbf/extractor/PublisherTextExtractor

非 Y 不嫁゛ 提交于 2021-01-29 19:25:14
问题 I am building a desktop application (using OpenJDK11, Maven). I am using ProGuard with the following config: @proguard_jmods.cfg #-dontshrink -dontoptimize #-dontobfuscate -optimizations !class/unboxing/enum -repackageclasses '' -renamesourcefileattribute SourceFile -keepattributes *Annotation*,Signature,Annotation,InnerClasses,EnclosingMethod,SourceFile,LineNumberTable -adaptresourcefilenames -dontnote -dontwarn com.ctc.wstx.**,com.github.**,com.jolbox.bonecp.**,com.mchange.v2.**,com.sun

Failure on Push to Docker Registry using 'mvn compile jib:build '

你。 提交于 2021-01-29 18:10:48
问题 I'm trying to build and deploy my docker image to a private registry using Google JIB maven plugin. However, it fails with issues accessing the private registry. I have installed Docker Desktop v19.03.1 on my Windows 10 machine. Next I'm trying to using Google JIB Maven plugin to build my Spring Boot application and then push the image built on the private registry. I have added the CERT to 'example.registry.com' to the Windows trusted CERTS. I was able to verify this using the docker command

SonarQube + Jacoco Coverage Discrepancies

六月ゝ 毕业季﹏ 提交于 2021-01-29 17:57:06
问题 I have been using Jacoco to analyze the Code-Coverage of my team's maven project for almost 3 months now. It has been analyzing and increasing properly as we add more and more tests and everything has been working well. In the last few days we have begun trying to set up a SonarQube analysis of the project. The issue we are running into is that the coverage shown in SonarQube is drastically different from what Jacoco is displaying for us. I have looked into this already, and read about some

Log file not getting generated from dependent JAR application

拜拜、爱过 提交于 2021-01-29 17:52:18
问题 I have a maven application which generates a JAR and used Apache logging in it. When I ran the JAR standalone, log file is getting generated successfully. Now using this JAR file as dependent in another Maven Spring web application, in which the JAR file classes are consumed. But while running the application, could see that only WAR file logs are getting generated and not the dependent JAR log files. Is this the expected behaviour? or am I missing any configuration etc ? Thanks. 回答1: Have

UnsatisfiedLinkError: no sqljdbc_auth in java.library.path

一曲冷凌霜 提交于 2021-01-29 17:35:48
问题 I'm using Maven to install Spring Boot project that uses SQLServer, but Tests phase fails: 'SQLServerException: This driver is not configured for integrated authentication', caused by 'UnsatisfiedLinkError: no sqljdbc_auth in java.library.path'. It happens only while using Maven, not while compiling the project in eclipse. I use maven-surefire-plugin. I copied sqljdbc_auth windows\sysWOW64 and to Java\jre1.8.0_211\bin and some more libraries, but it doesn't seems to be the solution. 回答1: