]> source.dussan.org Git - sonarqube.git/commitdiff
Fix disabling of JS tests by Maven
authorSimon Brandhof <simon.brandhof@sonarsource.com>
Tue, 2 Dec 2014 08:58:47 +0000 (09:58 +0100)
committerSimon Brandhof <simon.brandhof@sonarsource.com>
Tue, 2 Dec 2014 08:59:04 +0000 (09:59 +0100)
server/sonar-web/Gruntfile.coffee
server/sonar-web/pom.xml

index 404017b9b0674a63ae842503e13882a7e089cd64..18182116218808f7e9a2e1cf9ca6fcdef948f8f2 100644 (file)
@@ -393,15 +393,29 @@ module.exports = (grunt) ->
                                  'requirejs', 'clean:js', 'copy:build', 'copy:requirejs', 'uglify:build',
                                  'clean:build']
 
-  grunt.registerTask 'build', ['clean:css', 'clean:js',
-                               'less:build', 'cssUrlRewrite:build'
-                               'coffee:build', 'handlebars:build', 'copy:js',
-                               'concat:build',
-                               'requirejs', 'clean:js', 'copy:build', 'copy:requirejs', 'uglify:build',
-                               'clean:build']
-
   grunt.registerTask 'test', ['clean:js', 'coffee:build', 'handlebars:build', 'copy:js', 'concat:dev',
                               'express:test', 'casper:test']
 
   grunt.registerTask 'single', ['clean:js', 'coffee:build', 'handlebars:build', 'copy:js', 'concat:dev',
                             'express:test', 'casper:single']
+
+
+  # task used by Maven build (see pom.xml).
+  grunt.registerTask 'maven-build-skip-tests-true', [
+                                  'clean:css', 'clean:js',
+                                   'less:build', 'cssUrlRewrite:build'
+                                   'coffee:build', 'handlebars:build', 'copy:js',
+                                   'concat:build',
+                                   'requirejs', 'clean:js', 'copy:build', 'copy:requirejs', 'uglify:build',
+                                   'clean:build']
+
+  grunt.registerTask 'maven-build-skip-tests-false', [
+                                   'clean:js', 'coffee:build', 'handlebars:build', 'copy:js', 'concat:dev',
+                                   'express:test', 'casper:test',
+
+                                   'clean:css', 'clean:js',
+                                   'less:build', 'cssUrlRewrite:build'
+                                   'coffee:build', 'handlebars:build', 'copy:js',
+                                   'concat:build',
+                                   'requirejs', 'clean:js', 'copy:build', 'copy:requirejs', 'uglify:build',
+                                   'clean:build']
index 4cc8a62f8ad32716cf1aaa0c5f3c763bd85a61b2..5aa019599ecbf617b28af78abb827a2c1dba6f59 100644 (file)
@@ -12,8 +12,6 @@
   <name>SonarQube :: Web</name>
 
   <properties>
-    <gruntTask>test build</gruntTask>
-
     <!-- self-analysis -->
     <sonar.sources>src/main/js</sonar.sources>
     <sonar.exclusions>src/main/js/third-party/**/*,src/main/js/require.js,src/main/js/tests/**/*</sonar.exclusions>
               <goal>grunt</goal>
             </goals>
             <configuration>
-              <arguments>${gruntTask} --port=${jsTestPort}</arguments>
+              <arguments>maven-build-skip-tests-${skipWebTests} --port=${jsTestPort}</arguments>
             </configuration>
           </execution>
         </executions>
   </build>
 
   <profiles>
-    <profile>
-      <id>skipJsTests</id>
-      <activation>
-        <property>
-          <name>skipTests</name>
-        </property>
-      </activation>
-      <properties>
-        <gruntTask>build</gruntTask>
-      </properties>
-    </profile>
     <profile>
       <id>release</id>
       <build>