aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Stockhammer <martin_s@apache.org>2019-09-01 11:18:11 +0200
committerMartin Stockhammer <martin_s@apache.org>2019-09-01 11:18:11 +0200
commitf39fc917a8b87f4437095ef7d2d26c6344911e07 (patch)
tree5f2291a136145110b3775cc9a30675c59227edca
parent36249f664600be844e3204276d957f23767f83f0 (diff)
downloadarchiva-f39fc917a8b87f4437095ef7d2d26c6344911e07.tar.gz
archiva-f39fc917a8b87f4437095ef7d2d26c6344911e07.zip
Fixes for JDK11
-rw-r--r--archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/enunciate/enunciate.xml16
-rw-r--r--archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/java/org/apache/archiva/rest/services/BrowseServiceTest.java10
-rw-r--r--archiva-modules/archiva-web/archiva-rss/src/test/java/org/apache/archiva/rss/processor/NewArtifactsRssFeedProcessorTest.java2
-rw-r--r--archiva-modules/archiva-web/archiva-web-common/src/enunciate/enunciate.xml24
4 files changed, 31 insertions, 21 deletions
diff --git a/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/enunciate/enunciate.xml b/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/enunciate/enunciate.xml
index 2afff728e..c0f27aad4 100644
--- a/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/enunciate/enunciate.xml
+++ b/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/enunciate/enunciate.xml
@@ -17,12 +17,10 @@
~ specific language governing permissions and limitations
~ under the License.
-->
-<enunciate xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://enunciate.webcohesion.com/schemas/enunciate-2.0.0.xsd">
-
- <services>
- <rest defaultRestSubcontext="restServices"/>
- </services>
+<enunciate xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:noNamespaceSchemaLocation="https://raw.githubusercontent.com/stoicflame/enunciate/v2.12.0/top/src/main/resources/META-INF/enunciate-2.2.0.xsd" >
+ <title>Apache Archiva REST API</title>
<modules>
<cxf disabled="false"/>
@@ -32,12 +30,16 @@
<obj-c disabled="true"/>
<jaxws-ri disabled="true"/>
<jaxws-support disabled="true"/>
+ <jaxrs>
+ <application path="restServices"/>
+ </jaxrs>
- <docs disabled="false" title="Apache Archiva REST API" includeExampleXml="true" includeExampleJson="true"
- includeDefaultDownloads="false" docsSubdir="" freemarkerTemplate="${project.basedir}/src/enunciate/archiva.fmt" css="${project.basedir}/src/enunciate/archiva.css" >
+ <docs disabled="false"
+ docsSubdir="" freemarkerTemplate="${project.basedir}/src/enunciate/archiva.fmt" css="${project.basedir}/src/enunciate/archiva.css" >
<!--<war docsDir="apidocs" />-->
</docs>
+
</modules>
</enunciate> \ No newline at end of file
diff --git a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/java/org/apache/archiva/rest/services/BrowseServiceTest.java b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/java/org/apache/archiva/rest/services/BrowseServiceTest.java
index 350d849cb..25686faee 100644
--- a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/java/org/apache/archiva/rest/services/BrowseServiceTest.java
+++ b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/java/org/apache/archiva/rest/services/BrowseServiceTest.java
@@ -376,11 +376,13 @@ public class BrowseServiceTest
// START SNIPPET: get-artifacts-by-property
BrowseService browseService = getBrowseService( authorizationHeader, true );
- List<Artifact> artifactDownloadInfos =
- browseService.getArtifactsByProperty( "org.name", "The Apache Software Foundation", TEST_REPO_ID );
+ tryAssert( ( ) -> {
+ List<Artifact> artifactDownloadInfos =
+ browseService.getArtifactsByProperty( "org.name", "The Apache Software Foundation", TEST_REPO_ID );
- assertThat( artifactDownloadInfos ).isNotNull().isNotEmpty().hasSize( 7 );
- // END SNIPPET: get-artifacts-by-property
+ assertThat( artifactDownloadInfos ).isNotNull( ).isNotEmpty( ).hasSize( 7 );
+ // END SNIPPET: get-artifacts-by-property
+ } );
}
diff --git a/archiva-modules/archiva-web/archiva-rss/src/test/java/org/apache/archiva/rss/processor/NewArtifactsRssFeedProcessorTest.java b/archiva-modules/archiva-web/archiva-rss/src/test/java/org/apache/archiva/rss/processor/NewArtifactsRssFeedProcessorTest.java
index 8b27d5241..40cccc048 100644
--- a/archiva-modules/archiva-web/archiva-rss/src/test/java/org/apache/archiva/rss/processor/NewArtifactsRssFeedProcessorTest.java
+++ b/archiva-modules/archiva-web/archiva-rss/src/test/java/org/apache/archiva/rss/processor/NewArtifactsRssFeedProcessorTest.java
@@ -132,7 +132,7 @@ public class NewArtifactsRssFeedProcessorTest
assertEquals( entries.size(), 1 );
assertTrue(
entries.get( 0 ).getTitle().contains( "New Artifacts in Repository 'test-repo' as of " ));
- assertTrue( entries.get( 0 ).getPublishedDate().toInstant().equals( whenGathered.toInstant() ) );
+ assertTrue( entries.get( 0 ).getPublishedDate().toInstant().truncatedTo( ChronoUnit.MILLIS ).equals( whenGathered.toInstant().truncatedTo( ChronoUnit.MILLIS ) ) );
}
private ArtifactMetadata createArtifact( String artifactId, String version, ZonedDateTime whenGathered )
diff --git a/archiva-modules/archiva-web/archiva-web-common/src/enunciate/enunciate.xml b/archiva-modules/archiva-web/archiva-web-common/src/enunciate/enunciate.xml
index c1ea80ab0..b94485267 100644
--- a/archiva-modules/archiva-web/archiva-web-common/src/enunciate/enunciate.xml
+++ b/archiva-modules/archiva-web/archiva-web-common/src/enunciate/enunciate.xml
@@ -17,25 +17,31 @@
~ specific language governing permissions and limitations
~ under the License.
-->
-<enunciate xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://enunciate.webcohesion.com/schemas/enunciate-2.0.0.xsd">
-
- <services>
- <rest defaultRestSubcontext="archivaUiServices"/>
- </services>
+<enunciate xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:noNamespaceSchemaLocation="https://raw.githubusercontent.com/stoicflame/enunciate/v2.12.0/top/src/main/resources/META-INF/enunciate-2.2.0.xsd">
+ <title>Archiva UI Rest API</title>
<modules>
+ <jaxrs>
+ <application path="archivaUiServices" />
+ </jaxrs>
+
+
<cxf disabled="false"/>
- <jersey disabled="true" />
+ <jersey disabled="true"/>
<c disabled="true"/>
<csharp disabled="true"/>
<obj-c disabled="true"/>
<jaxws-ri disabled="true"/>
<jaxws-support disabled="true"/>
+ <jaxon1 disabled="true"/>
- <docs disabled="false" title="Apache Archiva UI REST API" includeExampleXml="true" includeExampleJson="true"
- includeDefaultDownloads="false" docsSubdir="" freemarkerTemplate="${project.basedir}/src/enunciate/archiva.fmt" css="${project.basedir}/src/enunciate/archiva.css">
- <!-- <war docsDir="apidocs" />-->
+ <docs disabled="false"
+ docsSubdir=""
+ freemarkerTemplate="${project.basedir}/src/enunciate/archiva.fmt"
+ css="${project.basedir}/src/enunciate/archiva.css">
+ <!-- <war docsDir="apidocs" />-->
</docs>
</modules>