@Override protected void init() { if (!initialized) { initialized = true; validateLibraries = project.getModules().isEmpty(); binaries = getFilesFromProperty(JavaClasspathProperties.SONAR_JAVA_BINARIES); List<File> libraries = getFilesFromProperty(JavaClasspathProperties.SONAR_JAVA_LIBRARIES); boolean useDeprecatedProperties = binaries.isEmpty() && libraries.isEmpty(); if (useDeprecatedProperties) { binaries = getFilesFromProperty("sonar.binaries"); libraries = getFilesFromProperty("sonar.libraries"); } if (pom != null && libraries.isEmpty()) { //check mojo elements = getLibrariesFromMaven(pom); } else { elements = Lists.newArrayList(binaries); elements.addAll(libraries); if (useDeprecatedProperties && !elements.isEmpty()) { LOG.warn("sonar.binaries and sonar.libraries are deprecated since version 2.5 of sonar-java-plugin, please use sonar.java.binaries and sonar.java.libraries instead"); } } } }
@Override protected void init() { if (!initialized) { TimeProfiler profiler = new TimeProfiler(getClass()).start("JavaClasspath initialization"); initialized = true; validateLibraries = project.getModules().isEmpty(); binaries = getFilesFromProperty(JavaClasspathProperties.SONAR_JAVA_BINARIES); List<File> libraries = getFilesFromProperty(JavaClasspathProperties.SONAR_JAVA_LIBRARIES); boolean useDeprecatedProperties = binaries.isEmpty() && libraries.isEmpty(); if (useDeprecatedProperties) { binaries = getFilesFromProperty("sonar.binaries"); libraries = getFilesFromProperty("sonar.libraries"); } elements = Lists.newArrayList(binaries); if(libraries.isEmpty()) { LOG.warn("Bytecode of dependencies was not provided for analysis of source files, " + "you might end up with less precise results. Bytecode can be provided using sonar.java.libraries property"); } elements.addAll(libraries); if (useDeprecatedProperties && !elements.isEmpty()) { LOG.warn("sonar.binaries and sonar.libraries are deprecated since version 2.5 of sonar-java-plugin, please use sonar.java.binaries and sonar.java.libraries instead"); } profiler.stop(); } }
Profiler profiler = Profiler.create(LOG).startInfo("JavaClasspath initialization"); initialized = true; binaries = new ArrayList<>(getFilesFromProperty(JavaClasspathProperties.SONAR_JAVA_BINARIES)); Set<File> libraries = getFilesFromProperty(JavaClasspathProperties.SONAR_JAVA_LIBRARIES); if (binaries.isEmpty() && libraries.isEmpty() && useDeprecatedProperties()) { throw new AnalysisException(
Profiler profiler = Profiler.create(LOG).startInfo("JavaClasspath initialization"); initialized = true; binaries = new ArrayList<>(getFilesFromProperty(JavaClasspathProperties.SONAR_JAVA_BINARIES)); Set<File> libraries = getFilesFromProperty(JavaClasspathProperties.SONAR_JAVA_LIBRARIES); if (binaries.isEmpty() && libraries.isEmpty() && useDeprecatedProperties()) { throw new AnalysisException(