View | Details | Raw Unified | Return to bug 60494
Collapse All | Expand All

(-)a/build.properties (-1 / +6 lines)
Lines 284-289 slf4j-api.jar = slf4j-api-${slf4j-api.version}.jar Link Here
284
slf4j-api.loc               = ${maven2.repo}/org/slf4j/slf4j-api/${slf4j-api.version}
284
slf4j-api.loc               = ${maven2.repo}/org/slf4j/slf4j-api/${slf4j-api.version}
285
slf4j-api.md5               = c9be56284a92dcb2576679282eff80bf
285
slf4j-api.md5               = c9be56284a92dcb2576679282eff80bf
286
286
287
sonarqube-ant-task.version  = 2.5
288
sonarqube-ant-task.jar      = sonarqube-ant-task-${sonarqube-ant-task.version}.jar
289
sonarqube-ant-task.loc      = ${maven2.repo}/org/sonarsource/scanner/ant/sonarqube-ant-task/${sonarqube-ant-task.version}
290
sonarqube-ant-task.md5      = 0458ef676194411fcccad3bdec8b22c9
291
287
jtidy.version               = r938
292
jtidy.version               = r938
288
jtidy.jar                   = jtidy-${jtidy.version}.jar
293
jtidy.jar                   = jtidy-${jtidy.version}.jar
289
jtidy.loc                   = ${maven2.repo}/net/sf/jtidy/jtidy/${jtidy.version}
294
jtidy.loc                   = ${maven2.repo}/net/sf/jtidy/jtidy/${jtidy.version}
Lines 398-401 rat-tasks.md5 = 96b699581b4475ed5756a0c24af745e8 Link Here
398
jacocoant.version            = 0.7.7.201606060606
403
jacocoant.version            = 0.7.7.201606060606
399
jacocoant.jar                = org.jacoco.ant-${jacocoant.version}-nodeps.jar
404
jacocoant.jar                = org.jacoco.ant-${jacocoant.version}-nodeps.jar
400
jacocoant.loc                = ${maven2.repo}/org/jacoco/org.jacoco.ant/${jacocoant.version}
405
jacocoant.loc                = ${maven2.repo}/org/jacoco/org.jacoco.ant/${jacocoant.version}
401
jacocoant.md5                = fc093f67abf5bafb782d2eafa2f5815e
406
jacocoant.md5                = fc093f67abf5bafb782d2eafa2f5815e
(-)a/build.xml (+124 lines)
Lines 134-139 Link Here
134
              reportlevel="${findbugs.level}"
134
              reportlevel="${findbugs.level}"
135
              excludeFilter="fb-excludes.xml"
135
              excludeFilter="fb-excludes.xml"
136
              jvmargs="-Xms512m -Xmx512m"
136
              jvmargs="-Xms512m -Xmx512m"
137
              omitVisitors="InefficientStringBuffering"
137
              outputFile="${findbugs.outName}.xml" >
138
              outputFile="${findbugs.outName}.xml" >
138
      <sourcePath path="${src.core}" />
139
      <sourcePath path="${src.core}" />
139
      <sourcePath path="${src.http}" />
140
      <sourcePath path="${src.http}" />
Lines 2804-2809 run JMeter unless all the JMeter jars are added. Link Here
2804
    </junit>
2805
    </junit>
2805
  </target>
2806
  </target>
2806
2807
2808
  <target name="complete-junit"  depends="compile-tests" 
2809
    description="Run individual JUnit test (-Dtest.case=org.apache.jorphan.test.AllTests) (-Dtest.format=plain) (-Dtest.showoutput=true)"
2810
    xmlns:jacoco="antlib:org.jacoco.ant">
2811
  <mkdir dir="reports"/>
2812
  <property name="test.format" value="plain"/>
2813
  <property name="test.case" value="org.apache.jorphan.test.AllTests"/>
2814
  <property name="test.showoutput" value="false"/>
2815
  <taskdef uri="antlib:org.jacoco.ant" resource="org/jacoco/ant/antlib.xml">
2816
    <classpath refid="sonar.classpath" />
2817
  </taskdef>
2818
  <jacoco:coverage destfile="reports/jacoco.exec">
2819
  <junit fork="true"
2820
      dir="${basedir}/bin"
2821
      showoutput="${test.showoutput}"
2822
      printsummary="on">
2823
    <formatter type="${test.format}" usefile="yes"/>
2824
    <formatter type="xml"/>
2825
    <jvmarg value="-Dfile.encoding=${test.encoding}"/>
2826
    <!-- Allow headless to be passed in -->
2827
    <jvmarg value="-Djava.awt.headless=${java.awt.headless}"/>
2828
    <classpath>
2829
      <fileset dir="${dest.jar}" includes="*.jar"/>
2830
      <pathelement location="${build.test}"/>
2831
      <pathelement location="${build.test-res}"/>
2832
      <path refid="classpath"/>
2833
    </classpath>
2834
    <batchtest todir="reports" skipNonTests="true">
2835
        <fileset dir="${src.test}">
2836
            <include name="**/*Test*.java" />
2837
            <exclude name="**/AllTests.java" />
2838
        </fileset>
2839
    </batchtest>
2840
  </junit>
2841
  </jacoco:coverage>
2842
  </target>
2843
2807
  <!-- Utility target to collate reports -->
2844
  <!-- Utility target to collate reports -->
2808
  <target name="junitreport">
2845
  <target name="junitreport">
2809
    <mkdir dir="reports"/>
2846
    <mkdir dir="reports"/>
Lines 3029-3034 run JMeter unless all the JMeter jars are added. Link Here
3029
    <process_jarfile jarname="xpp3"/>
3066
    <process_jarfile jarname="xpp3"/>
3030
    <process_jarfile jarname="xstream"/>
3067
    <process_jarfile jarname="xstream"/>
3031
    <process_jarfile jarname="jacocoant" dest.dir="${lib.coverage}" />
3068
    <process_jarfile jarname="jacocoant" dest.dir="${lib.coverage}" />
3069
    <process_jarfile jarname="sonarqube-ant-task" dest.dir="${lib.coverage}" />
3032
  </target>
3070
  </target>
3033
3071
3034
  <target name="_process_doc_jars">
3072
  <target name="_process_doc_jars">
Lines 3324-3327 run JMeter unless all the JMeter jars are added. Link Here
3324
      <fileset dir="${maven.dir}" includes="*.*" excludes="*.asc *.md5 *.sha1 *.sha"/>
3362
      <fileset dir="${maven.dir}" includes="*.*" excludes="*.asc *.md5 *.sha1 *.sha"/>
3325
    </gpg>
3363
    </gpg>
3326
  </target>
3364
  </target>
3365
3366
  <path id="sonar.classpath">
3367
    <fileset dir="./lib/opt" includes="**/*.jar" />
3368
  </path>
3369
3370
  <taskdef uri="antlib:org.sonar.ant" resource="org/sonar/ant/antlib.xml">
3371
    <classpath refid="sonar.classpath" />
3372
  </taskdef>
3373
3374
  <property name="sonar.organizationName" value="Apache" />
3375
  <property name="sonar.projectName" value="JMeter" />
3376
3377
  <property name="sonar.projectKey" value="${sonar.organizationName}:${sonar.projectName}" />
3378
  <property name="sonar.projectVersion" value="${jmeter.version}" />
3379
  <property name="sonar.language" value="java" />
3380
  <property name="sonar.modules" value="core,http,ftp,java,jdbc,ldap,mail,components,functions,jorphan,tcp,jms,native" />
3381
  <property name="sonar.java.binaries" value="${build.core},${build.http},${build.core},${build.http},${build.ftp},${build.java},${build.jdbc},${build.ldap},${build.mail},${build.components},${build.functions},${build.jorphan},${build.tcp},${build.jms},${build.native}" />
3382
  <property name="sonar.java.libraries" value="lib,lib/opt" />
3383
3384
  <property name="sonar.junit.reportsPath" value="reports" />
3385
  <property name="sonar.jacoco.reportPath" value="reports/jacoco.exec" />
3386
3387
  <property name="core.sonar.projectName" value="core" />
3388
  <property name="core.sonar.sources" value="${src.core}" />
3389
  <property name="core.sonar.projectBaseDir" value="./" />
3390
  <property name="http.sonar.projectName" value="http" />
3391
  <property name="http.sonar.sources" value="${src.http}" />
3392
  <property name="http.sonar.projectBaseDir" value="./" />
3393
  <property name="ftp.sonar.projectName" value="ftp" />
3394
  <property name="ftp.sonar.sources" value="${src.ftp}" />
3395
  <property name="ftp.sonar.projectBaseDir" value="./" />
3396
  <property name="java.sonar.projectName" value="java" />
3397
  <property name="java.sonar.sources" value="${src.java}" />
3398
  <property name="java.sonar.projectBaseDir" value="./" />
3399
  <property name="jdbc.sonar.projectName" value="jdbc" />
3400
  <property name="jdbc.sonar.sources" value="${src.jdbc}" />
3401
  <property name="jdbc.sonar.projectBaseDir" value="./" />
3402
  <property name="ldap.sonar.projectName" value="ldap" />
3403
  <property name="ldap.sonar.sources" value="${src.ldap}" />
3404
  <property name="ldap.sonar.projectBaseDir" value="./" />
3405
  <property name="mail.sonar.projectName" value="mail" />
3406
  <property name="mail.sonar.sources" value="${src.mail}" />
3407
  <property name="mail.sonar.projectBaseDir" value="./" />
3408
  <property name="components.sonar.projectName" value="components" />
3409
  <property name="components.sonar.sources" value="${src.components}" />
3410
  <property name="components.sonar.projectBaseDir" value="./" />
3411
  <property name="functions.sonar.projectName" value="functions" />
3412
  <property name="functions.sonar.sources" value="${src.functions}" />
3413
  <property name="functions.sonar.projectBaseDir" value="./" />
3414
  <property name="jorphan.sonar.projectName" value="jorphan" />
3415
  <property name="jorphan.sonar.sources" value="${src.jorphan}" />
3416
  <property name="jorphan.sonar.projectBaseDir" value="./" />
3417
  <property name="tcp.sonar.projectName" value="tcp" />
3418
  <property name="tcp.sonar.sources" value="${src.tcp}" />
3419
  <property name="tcp.sonar.projectBaseDir" value="./" />
3420
  <property name="jms.sonar.projectName" value="jms" />
3421
  <property name="jms.sonar.sources" value="${src.jms}" />
3422
  <property name="jms.sonar.projectBaseDir" value="./" />
3423
  <property name="native.sonar.projectName" value="native" />
3424
  <property name="native.sonar.sources" value="${src.native}" />
3425
  <property name="native.sonar.projectBaseDir" value="./" />
3426
3427
  <target name="sonar" depends="compile, install, complete-junit">
3428
    <property environment="env" />
3429
    <condition property="sonar.host.url" value="${env.SONAR_HOST_URL}" else="http://localhost:9000">
3430
      <isset property="env.SONAR_HOST_URL" />
3431
    </condition>
3432
    <condition property="sonar.login" value="${env.SONAR_LOGIN}">
3433
      <isset property="env.SONAR_LOGIN" />
3434
    </condition>
3435
    <condition property="sonar.password" value="${env.SONAR_PASSWORD}">
3436
      <isset property="env.SONAR_PASSWORD" />
3437
    </condition>
3438
    <condition property="sonar.jdbc.url" value="${env.SONAR_JDBC_URL}">
3439
      <isset property="env.SONAR_JDBC_URL" />
3440
    </condition>
3441
    <condition property="sonar.jdbc.username" value="${env.SONAR_JDBC_USERNAME}">
3442
      <isset property="env.SONAR_JDBC_USERNAME" />
3443
    </condition>
3444
    <condition property="sonar.jdbc.password" value="${env.SONAR_JDBC_PASSWORD}">
3445
      <isset property="env.SONAR_JDBC_PASSWORD" />
3446
    </condition>
3447
    <sonar:sonar xmlns:sonar="antlib:org.sonar.ant">
3448
    </sonar:sonar>
3449
  </target>
3450
3327
</project>
3451
</project>
(-)a/test/src/org/apache/jmeter/JMeterVersionTest.java (-3 / +5 lines)
Lines 115-123 public class JMeterVersionTest extends JMeterTestCase { Link Here
115
        versions.remove("rat");
115
        versions.remove("rat");
116
        propNames.remove("rat-tasks");
116
        propNames.remove("rat-tasks");
117
        versions.remove("rat-tasks");
117
        versions.remove("rat-tasks");
118
        // remove optional jacoco jars (required for coverage reporting, not required for jmeter)
118
        // remove optional jacoco and sonar jars (required for coverage reporting, not required for jmeter)
119
        propNames.remove("jacocoant");
119
        for (String optLib : Arrays.asList("jacocoant", "sonarqube-ant-task")) {
120
        versions.remove("jacocoant");
120
            propNames.remove(optLib);
121
            versions.remove(optLib);
122
        }
121
        prop = buildProp;
123
        prop = buildProp;
122
        final File licencesDir = getFileFromHome("licenses/bin");
124
        final File licencesDir = getFileFromHome("licenses/bin");
123
        licencesDir.list(new FilenameFilter() {
125
        licencesDir.list(new FilenameFilter() {

Return to bug 60494