]> source.dussan.org Git - archiva.git/commitdiff
Fixes for JDK11
authorMartin Stockhammer <martin_s@apache.org>
Sun, 1 Sep 2019 09:18:11 +0000 (11:18 +0200)
committerMartin Stockhammer <martin_s@apache.org>
Sun, 1 Sep 2019 09:18:11 +0000 (11:18 +0200)
archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/enunciate/enunciate.xml
archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/java/org/apache/archiva/rest/services/BrowseServiceTest.java
archiva-modules/archiva-web/archiva-rss/src/test/java/org/apache/archiva/rss/processor/NewArtifactsRssFeedProcessorTest.java
archiva-modules/archiva-web/archiva-web-common/src/enunciate/enunciate.xml

index 2afff728e95d31abd4ce0653205179f36b4f656e..c0f27aad4c2836cfc95ee54ac23ed0c8f8d488f9 100644 (file)
   ~ 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"/>
     <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
index 350d849cb6f981205ea4559a539f43d6f244e335..25686faeedc948ea7de1d7f027868cd859ea5e9e 100644 (file)
@@ -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
+        } );
     }
 
 
index 8b27d5241565f36106fa61920701bee55d727bd7..40cccc0486ee074e3cf7127c863ac4cecebe5cee 100644 (file)
@@ -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 )
index c1ea80ab0e6e1b2e93a7a64daddeec5571f147f3..b94485267541c253753fe690c372024646bd611e 100644 (file)
   ~ 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>