是否可以在maven pom.xml文件中为不同的配置文件使用不同的依赖项集?
例如
mvn -P debug
mvn -P release
Run Code Online (Sandbox Code Playgroud)
我想在一个配置文件中选择一个不同的依赖jar文件,该配置文件具有相同的类名和相同接口的不同实现.
好的,所以这可能是一个NooB问题(我更像是一个C++人),但我迷失在java森林及其框架森林......
我正在尝试研究eclipse RCP开发.为此,我正在遵循这个着名的教程:http: //www.vogella.com/tutorials/EclipseRCP/article.html
在步骤15,我需要添加以下依赖包以在我的包中导入.javax.annotation javax.injection
问题是我无法选择它们(它们不在选择列表中)我有javax.el javax.servlet.*和javax.xml.*
查看 http://docs.oracle.com/javase/7/docs/api/overview-summary.html 表明这应该是标准java的一部分.
我错过了什么明显的错误?
使用gradle对SonarQube 5.3运行SonarScanner 1.2,我收到如下错误:
Class not found: javax.annotation.Nullable
Class not found: javax.annotation.CheckReturnValue
Class not found: javax.annotation.Nullable
Class not found: org.joda.convert.FromString
Class not found: org.joda.convert.ToString
Class not found: org.joda.convert.FromString
Class not found: org.joda.convert.ToString
Class not found: org.joda.convert.FromString
Class not found: org.joda.convert.ToString
Class not found: javax.annotation.Nullable
and:
Resource not found: a.b.c.d.ControllerTest
and the likes ( all Integration tests )
Run Code Online (Sandbox Code Playgroud)
我试过了 :
dependencies {
classpath 'org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:1.2'
classpath 'javax.annotation:javax.annotation-api:1.2' }
Run Code Online (Sandbox Code Playgroud)
但这似乎不起作用
-Dsonar.java.libraries =**/lib/*也不能用作gradle参数.
使用gradle 2.2.1,使用jdk 7,sonarscanner 1.2和SonarQube 5.3
这是build.gradle:
apply plugin: 'crypto'
buildDir='gradlebuild'
apply from: …Run Code Online (Sandbox Code Playgroud) 我试图在詹金斯工作上进行声纳分析.我正在使用ant所以我在项目中使用Sonar Runner和sonar.properties.我正在配置二进制文件
sonar.binaries =构建/蚂蚁/类
成功构建后,Sonar启动并运行一段时间.但是在字节码分析过程中我收到了很多警告.
我得到WARN XX - ClassLoader无法访问Class'XX'.
每个班级......
我真的不知道为什么课程都在那里?
java ×3
sonarqube ×2
dependencies ×1
eclipse ×1
eclipse-rcp ×1
gradle ×1
jenkins ×1
maven-2 ×1
sonar-runner ×1