You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by ti...@apache.org on 2018/10/05 10:24:15 UTC
[maven-surefire] branch 1532_2 updated (328a735 -> c8e1807)
This is an automated email from the ASF dual-hosted git repository.
tibordigana pushed a change to branch 1532_2
in repository https://gitbox.apache.org/repos/asf/maven-surefire.git.
discard 328a735 [SUREFIRE-1532] MIME type for javascript is now officially application/javascript
new c8e1807 [SUREFIRE-1532] MIME type for javascript is now officially application/javascript
This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version. This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:
* -- * -- B -- O -- O -- O (328a735)
\
N -- N -- N refs/heads/1532_2 (c8e1807)
You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.
Any revisions marked "omit" are not gone; other references still
refer to them. Any revisions marked "discard" are gone forever.
The 1 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:
surefire-its/pom.xml | 1 -
.../surefire/its/jiras/Surefire260TestWithIdenticalNamesIT.java | 7 ++++++-
2 files changed, 6 insertions(+), 2 deletions(-)
[maven-surefire] 01/01: [SUREFIRE-1532] MIME type for javascript is
now officially application/javascript
Posted by ti...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
tibordigana pushed a commit to branch 1532_2
in repository https://gitbox.apache.org/repos/asf/maven-surefire.git
commit c8e1807996622242b1bab6a1e1a57aa08ef9d611
Author: Tibor17 <ti...@apache.org>
AuthorDate: Fri Oct 5 02:51:51 2018 +0200
[SUREFIRE-1532] MIME type for javascript is now officially application/javascript
---
.../surefire/report/SurefireReportGenerator.java | 2 +-
surefire-its/pom.xml | 2 +-
.../surefire/its/JUnit47RedirectOutputIT.java | 2 +-
.../jiras/Surefire260TestWithIdenticalNamesIT.java | 39 ++++++----
.../surefire-260-testWithIdenticalNames/pom.xml | 91 +++++++++++++---------
5 files changed, 82 insertions(+), 54 deletions(-)
diff --git a/maven-surefire-report-plugin/src/main/java/org/apache/maven/plugins/surefire/report/SurefireReportGenerator.java b/maven-surefire-report-plugin/src/main/java/org/apache/maven/plugins/surefire/report/SurefireReportGenerator.java
index f9b9480..6c02ad9 100644
--- a/maven-surefire-report-plugin/src/main/java/org/apache/maven/plugins/surefire/report/SurefireReportGenerator.java
+++ b/maven-surefire-report-plugin/src/main/java/org/apache/maven/plugins/surefire/report/SurefireReportGenerator.java
@@ -78,7 +78,7 @@ public final class SurefireReportGenerator
sink.body();
SinkEventAttributeSet atts = new SinkEventAttributeSet();
- atts.addAttribute( TYPE, "text/javascript" );
+ atts.addAttribute( TYPE, "application/javascript" );
sink.unknown( "script", new Object[]{ HtmlMarkup.TAG_TYPE_START }, atts );
sink.unknown( "cdata", new Object[]{ HtmlMarkup.CDATA_TYPE, javascriptToggleDisplayCode() }, null );
sink.unknown( "script", new Object[]{ HtmlMarkup.TAG_TYPE_END }, null );
diff --git a/surefire-its/pom.xml b/surefire-its/pom.xml
index 391543e..187b04c 100644
--- a/surefire-its/pom.xml
+++ b/surefire-its/pom.xml
@@ -56,7 +56,7 @@
<dependency>
<groupId>net.sourceforge.htmlunit</groupId>
<artifactId>htmlunit</artifactId>
- <version>2.8</version>
+ <version>2.33</version>
<scope>test</scope>
</dependency>
<dependency>
diff --git a/surefire-its/src/test/java/org/apache/maven/surefire/its/JUnit47RedirectOutputIT.java b/surefire-its/src/test/java/org/apache/maven/surefire/its/JUnit47RedirectOutputIT.java
index aa38dac..c3144e1 100644
--- a/surefire-its/src/test/java/org/apache/maven/surefire/its/JUnit47RedirectOutputIT.java
+++ b/surefire-its/src/test/java/org/apache/maven/surefire/its/JUnit47RedirectOutputIT.java
@@ -19,7 +19,7 @@ package org.apache.maven.surefire.its;
* under the License.
*/
-import org.apache.commons.lang.StringUtils;
+import org.apache.commons.lang3.StringUtils;
import org.apache.maven.surefire.its.fixture.OutputValidator;
import org.apache.maven.surefire.its.fixture.SurefireJUnit4IntegrationTestCase;
import org.apache.maven.surefire.its.fixture.SurefireLauncher;
diff --git a/surefire-its/src/test/java/org/apache/maven/surefire/its/jiras/Surefire260TestWithIdenticalNamesIT.java b/surefire-its/src/test/java/org/apache/maven/surefire/its/jiras/Surefire260TestWithIdenticalNamesIT.java
index aab3380..6dd1ecd 100644
--- a/surefire-its/src/test/java/org/apache/maven/surefire/its/jiras/Surefire260TestWithIdenticalNamesIT.java
+++ b/surefire-its/src/test/java/org/apache/maven/surefire/its/jiras/Surefire260TestWithIdenticalNamesIT.java
@@ -30,6 +30,7 @@ import com.gargoylesoftware.htmlunit.html.HtmlDivision;
import com.gargoylesoftware.htmlunit.html.HtmlPage;
import org.junit.Test;
+import static org.apache.maven.surefire.its.fixture.HelperAssertions.assumeJavaVersion;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
@@ -47,26 +48,32 @@ public class Surefire260TestWithIdenticalNamesIT
public void testWithIdenticalNames()
throws IOException
{
- SurefireLauncher surefireLauncher = unpack( "surefire-260-testWithIdenticalNames" ).failNever();
- surefireLauncher.executeTest();
- surefireLauncher.reset();
- OutputValidator validator = surefireLauncher.addSurefireReportGoal().executeCurrentGoals();
+ assumeJavaVersion( 1.8d );
+ OutputValidator validator = unpack( "surefire-260-testWithIdenticalNames" )
+ .failNever()
+ .addGoal( "site" )
+ .addSurefireReportGoal()
+ .executeCurrentGoals();
TestFile siteFile = validator.getSiteFile( "surefire-report.html" );
final URI uri = siteFile.toURI();
- final WebClient webClient = new WebClient();
- webClient.setJavaScriptEnabled( true );
- final HtmlPage page = webClient.getPage( uri.toURL() );
-
- final HtmlAnchor a =
- (HtmlAnchor) page.getByXPath( "//a[@href = \"javascript:toggleDisplay('surefire260.TestB.testDup');\"]" )
+ WebClient webClient = new WebClient();
+ try
+ {
+ HtmlPage page = webClient.getPage( uri.toURL() );
+ HtmlAnchor a = ( HtmlAnchor ) page.getByXPath(
+ "//a[@href = \"javascript:toggleDisplay('surefire260.TestB.testDup');\"]" )
.get( 0 );
- final HtmlDivision content = (HtmlDivision) page.getElementById( "surefire260.TestB.testDup-failure" );
- assertNotNull( content );
- assertTrue( content.getAttribute( "style" ).contains( "none" ) );
- a.click();
- assertFalse( content.getAttribute( "style" ).contains( "none" ) );
- webClient.closeAllWindows();
+ HtmlDivision content = ( HtmlDivision ) page.getElementById( "surefire260.TestB.testDup-failure" );
+ assertNotNull( content );
+ assertTrue( content.getAttribute( "style" ).contains( "none" ) );
+ a.click();
+ assertFalse( content.getAttribute( "style" ).contains( "none" ) );
+ }
+ finally
+ {
+ webClient.close();
+ }
}
}
diff --git a/surefire-its/src/test/resources/surefire-260-testWithIdenticalNames/pom.xml b/surefire-its/src/test/resources/surefire-260-testWithIdenticalNames/pom.xml
index aa0706b..bdb9d6f 100644
--- a/surefire-its/src/test/resources/surefire-260-testWithIdenticalNames/pom.xml
+++ b/surefire-its/src/test/resources/surefire-260-testWithIdenticalNames/pom.xml
@@ -21,44 +21,65 @@
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
+ <modelVersion>4.0.0</modelVersion>
- <groupId>org.apache.maven.plugins.surefire</groupId>
- <artifactId>surefire-260-testsWithIdenticalNames</artifactId>
- <version>1.0-SNAPSHOT</version>
- <name>surefire-260-testsWithIdenticalNames</name>
+ <groupId>org.apache.maven.plugins.surefire</groupId>
+ <artifactId>surefire-260-testsWithIdenticalNames</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ <name>surefire-260-testsWithIdenticalNames</name>
- <properties>
- <maven.compiler.source>1.6</maven.compiler.source>
- <maven.compiler.target>1.6</maven.compiler.target>
- </properties>
+ <properties>
+ <maven.compiler.source>1.6</maven.compiler.source>
+ <maven.compiler.target>1.6</maven.compiler.target>
+ </properties>
- <dependencies>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>4.8.1</version>
- <scope>test</scope>
- </dependency>
- </dependencies>
+ <dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.8.1</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <version>${surefire.version}</version>
- <dependencies>
- </dependencies>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-report-plugin</artifactId>
- <version>${surefire.version}</version>
- <dependencies>
- </dependencies>
- </plugin>
- </plugins>
- </build>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <version>${surefire.version}</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-report-plugin</artifactId>
+ <version>${surefire.version}</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-site-plugin</artifactId>
+ <version>3.7.1</version>
+ </plugin>
+ </plugins>
+ </build>
+
+ <reporting>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-project-info-reports-plugin</artifactId>
+ <version>3.0.0</version>
+ <configuration>
+ <dependencyLocationsEnabled>false</dependencyLocationsEnabled>
+ </configuration>
+ <reportSets>
+ <reportSet>
+ <reports>
+ <report>index</report>
+ </reports>
+ </reportSet>
+ </reportSets>
+ </plugin>
+ </plugins>
+ </reporting>
</project>