maven

How to deprecate a library in Eclipse/Maven/Nexus?

丶灬走出姿态 提交于 2021-01-27 04:23:33
问题 We use Eclipse + Maven plugin to get library from Nexus, it's good. And we also put our internal library on Nexus. When we release a new version of a library to Nexus, we want to let old version to be "deprecated", is it possible? For example, when use use Eclipse's Maven plugin, he choose the old version and Eclipse shows "it's deprecated". Because some old systems still need the old version, we cannot remove it from Nexus directly. But we don't want new systems to use old version. 回答1: You

Why Log4j thinks my project run in Servlet Environment

て烟熏妆下的殇ゞ 提交于 2021-01-27 03:55:11
问题 I have a simple java project (maven). Which builds a jar and we execute the main method on it. But when I run mvn clean test on the project I get a log line from log4j saying INFO Log4j appears to be running in a Servlet environment, but there's no log4j-web module available. If you want better web container support, please add the log4j-web JAR to your web archive or server lib directory. The log4j2.xml file is in src/main/resources/log4j2.xml . Any ideas whats going on ? 回答1: If you have

Why Log4j thinks my project run in Servlet Environment

有些话、适合烂在心里 提交于 2021-01-27 03:55:00
问题 I have a simple java project (maven). Which builds a jar and we execute the main method on it. But when I run mvn clean test on the project I get a log line from log4j saying INFO Log4j appears to be running in a Servlet environment, but there's no log4j-web module available. If you want better web container support, please add the log4j-web JAR to your web archive or server lib directory. The log4j2.xml file is in src/main/resources/log4j2.xml . Any ideas whats going on ? 回答1: If you have

Why Log4j thinks my project run in Servlet Environment

天大地大妈咪最大 提交于 2021-01-27 03:54:19
问题 I have a simple java project (maven). Which builds a jar and we execute the main method on it. But when I run mvn clean test on the project I get a log line from log4j saying INFO Log4j appears to be running in a Servlet environment, but there's no log4j-web module available. If you want better web container support, please add the log4j-web JAR to your web archive or server lib directory. The log4j2.xml file is in src/main/resources/log4j2.xml . Any ideas whats going on ? 回答1: If you have

Docker之Nexus搭建Maven仓库

孤人 提交于 2021-01-27 02:07:16
Maven公服 http://maven.aliyun.com 1. https://hub.docker.com 搜索nexus 2. docker pull sonatype/nexus3 3. 创建Docker目录,创建nexus目录 cd /usr/local/ mkdir docker cd docker / mkdir nexus cd nexus / vi docker -compose.yml 4. 使用Docker来安装和运行Nexus,docker-compose.yml配置如下: version:'3.1' services: nexus: restart:always image:sonatype / nexus3 container_name:nexus ports: -8081:8081 volumes: - /usr/local/docker/nexus/data:/nexus- data 5. docker-compose up -d 6. 访问http://ip:8081 7. 看日志 docker ps docker logs containerID 8. 如果报错没权限 查看data中是否有数据,让data有所有权限 cd /data/ ll docker - compose down chmod 777 data/ 9. docker

Scala jar read external properties file

怎甘沉沦 提交于 2021-01-26 23:53:47
问题 I have written some code and exported it as a jar file. In this jar there is a file named automation.properties with defaults that I'm loading using val automationPropertiesFileURL = getClass.getResource("/automation.properties") if (automationPropertiesFileURL != null) { val source = Source.fromURL(automationPropertiesFileURL) config = new Properties() config.load(source.bufferedReader()) } But when this jar file gets added as a gradle dependency in C:\User\abc\.gradle and I want to read

Scala jar read external properties file

末鹿安然 提交于 2021-01-26 23:50:53
问题 I have written some code and exported it as a jar file. In this jar there is a file named automation.properties with defaults that I'm loading using val automationPropertiesFileURL = getClass.getResource("/automation.properties") if (automationPropertiesFileURL != null) { val source = Source.fromURL(automationPropertiesFileURL) config = new Properties() config.load(source.bufferedReader()) } But when this jar file gets added as a gradle dependency in C:\User\abc\.gradle and I want to read

Release a snapshot to nexus using maven 3.0.5

梦想的初衷 提交于 2021-01-26 20:39:52
问题 I am unable to release a snapshot version of an artifact which I build using maven to nexus. The version of my artifact states 1.0.0-SNAPSHOT. I can execute mvn clean install without an issue. But when I try to deploy using mvn deploy , I get the following error : Return code is: 400, ReasonPhrase: Repository version policy: RELEASE does not allow version: 1.0.0-20161019.214318-1. -> [Help 1] According to what I was able to find out was that maven3 adds the timestamp instead of the SNAPSHOT

wagon-git and Gradle

冷暖自知 提交于 2021-01-26 18:41:25
问题 This nice little tool promise help me upload artifacts up to a private Bitbucket repo. http://synergian.github.io/wagon-git/bitbucket.html I am having troubles using this guide in my Gradle build... I've found this short and limited example, https://github.com/UniconLabs/ssl-utils/blob/master/build.gradle Most unclear for me is this section about how to prepare the settings.xml inside my maven home. Am I supposed to use my .gradle folder instead since I work with Gradle? Bitbucket Private

wagon-git and Gradle

喜欢而已 提交于 2021-01-26 18:40:55
问题 This nice little tool promise help me upload artifacts up to a private Bitbucket repo. http://synergian.github.io/wagon-git/bitbucket.html I am having troubles using this guide in my Gradle build... I've found this short and limited example, https://github.com/UniconLabs/ssl-utils/blob/master/build.gradle Most unclear for me is this section about how to prepare the settings.xml inside my maven home. Am I supposed to use my .gradle folder instead since I work with Gradle? Bitbucket Private