You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ol...@apache.org on 2020/08/27 05:27:09 UTC

[sling-org-apache-sling-scripting-freemarker] branch master updated (0c87a94 -> 086f92d)

This is an automated email from the ASF dual-hosted git repository.

olli pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-scripting-freemarker.git.


    from 0c87a94  Adding sonarqube badges as per SLING-9682
     new 350ee8e  suppress warnings for rule java:S100
     new 086f92d  SLING-9701 Enable code coverage with JaCoCo

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 pom.xml                                            | 26 ++++++++++++++++++++++
 ...FreemarkerScriptEngineFactoryConfiguration.java |  1 +
 .../freemarker/it/tests/FreemarkerTestSupport.java |  4 +++-
 3 files changed, 30 insertions(+), 1 deletion(-)


[sling-org-apache-sling-scripting-freemarker] 02/02: SLING-9701 Enable code coverage with JaCoCo

Posted by ol...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

olli pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-scripting-freemarker.git

commit 086f92d66d2fecc29f361fe0de0c39d23686e041
Author: Oliver Lietz <ol...@apache.org>
AuthorDate: Thu Aug 27 07:25:04 2020 +0200

    SLING-9701 Enable code coverage with JaCoCo
---
 pom.xml                                            | 26 ++++++++++++++++++++++
 .../freemarker/it/tests/FreemarkerTestSupport.java |  4 +++-
 2 files changed, 29 insertions(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index bf34829..921b7b1 100644
--- a/pom.xml
+++ b/pom.xml
@@ -72,10 +72,36 @@
               <name>bundle.filename</name>
               <value>${basedir}/target/${project.build.finalName}.jar</value>
             </property>
+            <property>
+              <name>jacoco.command</name>
+              <value>${jacoco.command}</value>
+            </property>
           </systemProperties>
         </configuration>
       </plugin>
       <plugin>
+        <groupId>org.jacoco</groupId>
+        <artifactId>jacoco-maven-plugin</artifactId>
+        <executions>
+          <execution>
+            <id>prepare-agent</id>
+            <configuration>
+              <propertyName>jacoco.command</propertyName>
+            </configuration>
+            <goals>
+              <goal>prepare-agent</goal>
+            </goals>
+          </execution>
+          <execution>
+            <id>report</id>
+            <phase>post-integration-test</phase>
+            <goals>
+              <goal>report</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+      <plugin>
         <groupId>org.apache.servicemix.tooling</groupId>
         <artifactId>depends-maven-plugin</artifactId>
       </plugin>
diff --git a/src/test/java/org/apache/sling/scripting/freemarker/it/tests/FreemarkerTestSupport.java b/src/test/java/org/apache/sling/scripting/freemarker/it/tests/FreemarkerTestSupport.java
index 209c244..5f027f1 100644
--- a/src/test/java/org/apache/sling/scripting/freemarker/it/tests/FreemarkerTestSupport.java
+++ b/src/test/java/org/apache/sling/scripting/freemarker/it/tests/FreemarkerTestSupport.java
@@ -42,6 +42,7 @@ import static org.apache.sling.testing.paxexam.SlingOptions.slingScriptingJsp;
 import static org.ops4j.pax.exam.CoreOptions.composite;
 import static org.ops4j.pax.exam.CoreOptions.junitBundles;
 import static org.ops4j.pax.exam.CoreOptions.mavenBundle;
+import static org.ops4j.pax.exam.CoreOptions.vmOption;
 
 public abstract class FreemarkerTestSupport extends TestSupport {
 
@@ -78,7 +79,8 @@ public abstract class FreemarkerTestSupport extends TestSupport {
             slingResourcePresence(),
             mavenBundle().groupId("org.jsoup").artifactId("jsoup").versionAsInProject(),
             mavenBundle().groupId("org.apache.servicemix.bundles").artifactId("org.apache.servicemix.bundles.hamcrest").versionAsInProject(),
-            junitBundles()
+            junitBundles(),
+            vmOption(System.getProperty("jacoco.command"))
         );
     }
 


[sling-org-apache-sling-scripting-freemarker] 01/02: suppress warnings for rule java:S100

Posted by ol...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

olli pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-scripting-freemarker.git

commit 350ee8ea482bbd2c3831fd962801bd98806f761d
Author: Oliver Lietz <ol...@apache.org>
AuthorDate: Thu Aug 27 07:24:06 2020 +0200

    suppress warnings for rule java:S100
---
 .../freemarker/internal/FreemarkerScriptEngineFactoryConfiguration.java  | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/main/java/org/apache/sling/scripting/freemarker/internal/FreemarkerScriptEngineFactoryConfiguration.java b/src/main/java/org/apache/sling/scripting/freemarker/internal/FreemarkerScriptEngineFactoryConfiguration.java
index 5abdcf1..17e354c 100644
--- a/src/main/java/org/apache/sling/scripting/freemarker/internal/FreemarkerScriptEngineFactoryConfiguration.java
+++ b/src/main/java/org/apache/sling/scripting/freemarker/internal/FreemarkerScriptEngineFactoryConfiguration.java
@@ -25,6 +25,7 @@ import org.osgi.service.metatype.annotations.ObjectClassDefinition;
     name = "Apache Sling Scripting FreeMarker ScriptEngineFactory",
     description = "Scripting engine for FreeMarker templates"
 )
+@SuppressWarnings("java:S100")
 @interface FreemarkerScriptEngineFactoryConfiguration {
 
     @AttributeDefinition(