mirror of https://github.com/apache/archiva.git
add rest ui services documentation move rest services from the webapp-js to web-common module
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1394756 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
68f37c8366
commit
d381f0d431
|
@ -109,6 +109,18 @@
|
|||
<excludes>META-INF/**,org/**</excludes>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>archiva-rest-ui-api-docs-extract</id>
|
||||
<phase>site</phase>
|
||||
<goals>
|
||||
<goal>unpack-dependencies</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<includeArtifactIds>archiva-web-common</includeArtifactIds>
|
||||
<outputDirectory>${project.build.directory}/site/</outputDirectory>
|
||||
<excludes>META-INF/**,org/**,WEB-INF/**</excludes>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
|
@ -120,6 +132,10 @@
|
|||
<groupId>org.apache.archiva</groupId>
|
||||
<artifactId>archiva-rest-api</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.archiva</groupId>
|
||||
<artifactId>archiva-web-common</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<reporting>
|
||||
|
|
|
@ -20,8 +20,8 @@
|
|||
<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/maven-v4_0_0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<artifactId>archiva-rest</artifactId>
|
||||
<groupId>org.apache.archiva</groupId>
|
||||
<artifactId>archiva-rest</artifactId>
|
||||
<version>1.4-M4-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>archiva-rest-services</artifactId>
|
||||
|
|
|
@ -26,9 +26,14 @@
|
|||
</parent>
|
||||
|
||||
<artifactId>archiva-web-common</artifactId>
|
||||
<packaging>bundle</packaging>
|
||||
<!-- DO NOT USE bundle packaging generated documentation is not included in the jar !!! -->
|
||||
<packaging>jar</packaging>
|
||||
<name>Archiva Web :: Web Common</name>
|
||||
|
||||
<properties>
|
||||
<enunciate.docsDir>${project.build.outputDirectory}/rest-docs-archiva-ui</enunciate.docsDir>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.apache.archiva</groupId>
|
||||
|
@ -80,11 +85,31 @@
|
|||
<groupId>org.apache.archiva.redback</groupId>
|
||||
<artifactId>redback-system</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.archiva</groupId>
|
||||
<artifactId>archiva-repository-layer</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.archiva</groupId>
|
||||
<artifactId>archiva-rest-api</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.archiva</groupId>
|
||||
<artifactId>archiva-rest-services</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.archiva</groupId>
|
||||
<artifactId>audit</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.servlet</groupId>
|
||||
<artifactId>javax.servlet-api</artifactId>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.ws.rs</groupId>
|
||||
<artifactId>jsr311-api</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.archiva.redback.components</groupId>
|
||||
<artifactId>spring-taskqueue</artifactId>
|
||||
|
@ -119,6 +144,14 @@
|
|||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-context-support</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jsoup</groupId>
|
||||
<artifactId>jsoup</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.servlet</groupId>
|
||||
<artifactId>servlet-api</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-web</artifactId>
|
||||
|
@ -215,12 +248,6 @@
|
|||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.archiva</groupId>
|
||||
<artifactId>archiva-rest-services</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.archiva</groupId>
|
||||
<artifactId>archiva-webdav</artifactId>
|
||||
|
@ -335,6 +362,15 @@
|
|||
</Import-Package>
|
||||
</instructions>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>create-manifest</id>
|
||||
<phase>process-test-classes</phase>
|
||||
<goals>
|
||||
<goal>manifest</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
|
@ -347,6 +383,15 @@
|
|||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-jar-plugin</artifactId>
|
||||
<configuration>
|
||||
<archive>
|
||||
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
|
||||
</archive>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package org.apache.archiva.webapp.ui.services.api;
|
||||
package org.apache.archiva.web.api;
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
|
@ -1,4 +1,4 @@
|
|||
package org.apache.archiva.webapp.ui.services.api;
|
||||
package org.apache.archiva.web.api;
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
|
@ -1,4 +1,4 @@
|
|||
package org.apache.archiva.webapp.ui.services.api;
|
||||
package org.apache.archiva.web.api;
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
|
@ -45,7 +45,7 @@ import org.apache.archiva.rest.api.services.ArchivaRestServiceException;
|
|||
import org.apache.archiva.rest.services.AbstractRestService;
|
||||
import org.apache.archiva.scheduler.ArchivaTaskScheduler;
|
||||
import org.apache.archiva.scheduler.repository.RepositoryTask;
|
||||
import org.apache.archiva.webapp.ui.services.model.FileMetadata;
|
||||
import org.apache.archiva.web.model.FileMetadata;
|
||||
import org.apache.archiva.xml.XMLException;
|
||||
import org.apache.commons.io.FilenameUtils;
|
||||
import org.apache.commons.io.IOUtils;
|
|
@ -1,4 +1,4 @@
|
|||
package org.apache.archiva.webapp.ui.services.api;
|
||||
package org.apache.archiva.web.api;
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
|
@ -19,7 +19,7 @@ package org.apache.archiva.webapp.ui.services.api;
|
|||
*/
|
||||
|
||||
import org.apache.archiva.web.runtime.ArchivaRuntimeInfo;
|
||||
import org.apache.archiva.webapp.ui.services.model.ApplicationRuntimeInfo;
|
||||
import org.apache.archiva.web.model.ApplicationRuntimeInfo;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
|
@ -1,4 +1,4 @@
|
|||
package org.apache.archiva.webapp.ui.services.api;
|
||||
package org.apache.archiva.web.api;
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
|
@ -20,7 +20,7 @@ package org.apache.archiva.webapp.ui.services.api;
|
|||
|
||||
import org.apache.archiva.rest.api.services.ArchivaRestServiceException;
|
||||
import org.apache.archiva.security.common.ArchivaRoleConstants;
|
||||
import org.apache.archiva.webapp.ui.services.model.FileMetadata;
|
||||
import org.apache.archiva.web.model.FileMetadata;
|
||||
import org.apache.cxf.jaxrs.ext.multipart.MultipartBody;
|
||||
import org.apache.archiva.redback.authorization.RedbackAuthorization;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package org.apache.archiva.webapp.ui.services.api;
|
||||
package org.apache.archiva.web.api;
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
|
@ -18,7 +18,7 @@ package org.apache.archiva.webapp.ui.services.api;
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
import org.apache.archiva.webapp.ui.services.model.ApplicationRuntimeInfo;
|
||||
import org.apache.archiva.web.model.ApplicationRuntimeInfo;
|
||||
import org.apache.archiva.redback.authorization.RedbackAuthorization;
|
||||
|
||||
import javax.ws.rs.GET;
|
|
@ -1,4 +1,4 @@
|
|||
package org.apache.archiva.webapp.ui.services.docs;
|
||||
package org.apache.archiva.web.docs;
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
|
@ -1,4 +1,4 @@
|
|||
package org.apache.archiva.webapp.ui.services.model;
|
||||
package org.apache.archiva.web.model;
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
|
@ -1,4 +1,4 @@
|
|||
package org.apache.archiva.webapp.ui.services.model;
|
||||
package org.apache.archiva.web.model;
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
|
@ -22,17 +22,44 @@
|
|||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:context="http://www.springframework.org/schema/context"
|
||||
xmlns:util="http://www.springframework.org/schema/util"
|
||||
xmlns:jaxrs="http://cxf.apache.org/jaxrs"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
|
||||
http://www.springframework.org/schema/context
|
||||
http://www.springframework.org/schema/context/spring-context-3.0.xsd
|
||||
http://www.springframework.org/schema/util
|
||||
http://www.springframework.org/schema/util/spring-util-3.0.xsd"
|
||||
http://www.springframework.org/schema/util/spring-util-3.0.xsd
|
||||
http://cxf.apache.org/jaxrs
|
||||
http://cxf.apache.org/schemas/jaxrs.xsd"
|
||||
default-lazy-init="true">
|
||||
|
||||
<context:annotation-config/>
|
||||
<context:component-scan base-package="org.apache.archiva.web.spring, org.apache.archiva.web.startup, org.apache.archiva.web.runtime"/>
|
||||
<context:component-scan base-package="org.apache.archiva.web.spring, org.apache.archiva.web.startup, org.apache.archiva.web.runtime, org.apache.archiva.web.api"/>
|
||||
|
||||
<util:properties id="archivaRuntimeProperties" location="classpath:application.properties" />
|
||||
|
||||
<jaxrs:server id="archivaUiServices" address="/archivaUiServices">
|
||||
|
||||
<jaxrs:providers>
|
||||
<bean class="org.codehaus.jackson.jaxrs.JacksonJsonProvider"/>
|
||||
<ref bean="authenticationInterceptor#rest"/>
|
||||
<ref bean="permissionInterceptor#rest"/>
|
||||
<ref bean="archivaRestServiceExceptionMapper"/>
|
||||
</jaxrs:providers>
|
||||
|
||||
<jaxrs:serviceBeans>
|
||||
<ref bean="runtimeInfoService#rest"/>
|
||||
<ref bean="dataValidatorService#rest"/>
|
||||
<ref bean="fileUploadService#rest"/>
|
||||
</jaxrs:serviceBeans>
|
||||
|
||||
<jaxrs:outInterceptors>
|
||||
<ref bean="threadLocalUserCleaner#rest"/>
|
||||
</jaxrs:outInterceptors>
|
||||
|
||||
<jaxrs:outFaultInterceptors>
|
||||
|
||||
</jaxrs:outFaultInterceptors>
|
||||
</jaxrs:server>
|
||||
|
||||
</beans>
|
|
@ -1,4 +1,4 @@
|
|||
package org.apache.archiva.webapp.ui.services.api;
|
||||
package org.apache.archiva;
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
|
@ -18,7 +18,8 @@ package org.apache.archiva.webapp.ui.services.api;
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
import org.apache.archiva.webapp.ui.services.model.ApplicationRuntimeInfo;
|
||||
import org.apache.archiva.web.api.RuntimeInfoService;
|
||||
import org.apache.archiva.web.model.ApplicationRuntimeInfo;
|
||||
import org.apache.commons.io.FileUtils;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.cxf.jaxrs.client.JAXRSClientFactory;
|
|
@ -40,7 +40,7 @@
|
|||
<archiva.baseRestUrl />
|
||||
<rest.admin.pwd />
|
||||
<test.useTomcat>false</test.useTomcat>
|
||||
<enunciate.docsDir>${project.build.outputDirectory}/rest-docs-archiva-ui</enunciate.docsDir>
|
||||
|
||||
|
||||
</properties>
|
||||
|
||||
|
@ -758,6 +758,12 @@
|
|||
<artifactId>spring-web</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.jsoup</groupId>
|
||||
<artifactId>jsoup</artifactId>
|
||||
</dependency>
|
||||
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.archiva</groupId>
|
||||
<artifactId>archiva-test-mocks</artifactId>
|
||||
|
|
|
@ -22,25 +22,16 @@
|
|||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:context="http://www.springframework.org/schema/context"
|
||||
xmlns:util="http://www.springframework.org/schema/util"
|
||||
xmlns:jaxrs="http://cxf.apache.org/jaxrs"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
|
||||
http://www.springframework.org/schema/context
|
||||
http://www.springframework.org/schema/context/spring-context-3.0.xsd
|
||||
http://www.springframework.org/schema/util
|
||||
http://www.springframework.org/schema/util/spring-util-3.0.xsd
|
||||
http://cxf.apache.org/jaxrs
|
||||
http://cxf.apache.org/schemas/jaxrs.xsd"
|
||||
http://www.springframework.org/schema/util/spring-util-3.0.xsd"
|
||||
default-lazy-init="true">
|
||||
|
||||
<import resource="classpath:META-INF/cxf/cxf.xml"/>
|
||||
<!--
|
||||
<import resource="classpath:META-INF/cxf/cxf-extension-jaxrs-binding.xml"/>
|
||||
-->
|
||||
<import resource="classpath:META-INF/cxf/cxf-servlet.xml"/>
|
||||
|
||||
<context:annotation-config/>
|
||||
<context:component-scan base-package="org.apache.archiva.webapp.ui.services.api"/>
|
||||
<context:component-scan base-package="org.apache.archiva.web.api"/>
|
||||
|
||||
|
||||
<util:properties id="archivaRuntimeProperties" location="classpath:application.properties" />
|
||||
|
@ -54,29 +45,7 @@
|
|||
<constructor-arg value="${appserver.base}/data/jcr"/>
|
||||
</bean>
|
||||
|
||||
<jaxrs:server id="archivaUiServices" address="/archivaUiServices">
|
||||
|
||||
<jaxrs:providers>
|
||||
<bean class="org.codehaus.jackson.jaxrs.JacksonJsonProvider"/>
|
||||
<ref bean="authenticationInterceptor#rest"/>
|
||||
<ref bean="permissionInterceptor#rest"/>
|
||||
<ref bean="archivaRestServiceExceptionMapper"/>
|
||||
</jaxrs:providers>
|
||||
|
||||
<jaxrs:serviceBeans>
|
||||
<ref bean="runtimeInfoService#rest"/>
|
||||
<ref bean="dataValidatorService#rest"/>
|
||||
<ref bean="fileUploadService#rest"/>
|
||||
</jaxrs:serviceBeans>
|
||||
|
||||
<jaxrs:outInterceptors>
|
||||
<ref bean="threadLocalUserCleaner#rest"/>
|
||||
</jaxrs:outInterceptors>
|
||||
|
||||
<jaxrs:outFaultInterceptors>
|
||||
|
||||
</jaxrs:outFaultInterceptors>
|
||||
</jaxrs:server>
|
||||
|
||||
|
||||
</beans>
|
|
@ -81,7 +81,7 @@
|
|||
|
||||
<servlet>
|
||||
<servlet-name>RestDocumentation</servlet-name>
|
||||
<servlet-class>org.apache.archiva.webapp.ui.services.docs.RestDocsServlet</servlet-class>
|
||||
<servlet-class>org.apache.archiva.web.docs.RestDocsServlet</servlet-class>
|
||||
<load-on-startup>3</load-on-startup>
|
||||
</servlet>
|
||||
|
||||
|
|
Loading…
Reference in New Issue