]> source.dussan.org Git - sonarqube.git/commitdiff
Replace GMavenPlus by beanshell
authorSimon Brandhof <simon.brandhof@sonarsource.com>
Tue, 7 Apr 2015 20:10:22 +0000 (22:10 +0200)
committerSimon Brandhof <simon.brandhof@sonarsource.com>
Tue, 7 Apr 2015 20:10:22 +0000 (22:10 +0200)
I'm afraid of the side-effects of the required property "allowSystemExits" of GMavenPlus (yet another groovy maven plugin)

pom.xml

diff --git a/pom.xml b/pom.xml
index c57694d18368ee1db773eea73ac7ac6fcdaba83b..6ec2d1c6be87ffbb62d799418794f2045a8e002d 100644 (file)
--- a/pom.xml
+++ b/pom.xml
       early the tests that are coupled with local environment.
       -->
       <plugin>
-        <groupId>org.codehaus.gmavenplus</groupId>
-        <artifactId>gmavenplus-plugin</artifactId>
-        <version>1.5</version>
+        <groupId>com.github.genthaler</groupId>
+        <artifactId>beanshell-maven-plugin</artifactId>
+        <version>1.0</version>
         <executions>
           <execution>
             <id>randomize-environment</id>
             <phase>validate</phase>
             <goals>
-              <goal>execute</goal>
+              <goal>run</goal>
             </goals>
             <configuration>
-              <scripts>
-                <script>
-                  <![CDATA[
-                String[] timezones = ["GMT-9", "UTC", "GMT+9"];
-                String testTimezone = timezones[new Random().nextInt(timezones.length)];
-                project.properties['testTimezone'] = testTimezone;
-                log.info('Timezone used for tests: ' + testTimezone);
+              <script>
+                <![CDATA[
+                String[] timezones = new String[] {"GMT-9", "UTC", "GMT+9"};
+                String testTimezone = timezones[new java.util.Random().nextInt(timezones.length)];
+                project.getProperties().setProperty("testTimezone", testTimezone);
+                logger.info("Timezone used for tests: " + testTimezone);
                 ]]>
-                </script>
-              </scripts>
+              </script>
             </configuration>
           </execution>
         </executions>
-        <dependencies>
-          <dependency>
-            <groupId>org.codehaus.groovy</groupId>
-            <artifactId>groovy-all</artifactId>
-            <!-- any version of Groovy \>= 1.5.0 should work here -->
-            <version>2.4.1</version>
-            <scope>runtime</scope>
-          </dependency>
-        </dependencies>
       </plugin>
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>