mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-07 01:54:22 +00:00
Merge pull request #2697 from tdonohue/disable_old_rest
DS-4303: Disable "dspace-rest" from default build. Add more deprecation warnings
This commit is contained in:
@@ -32,11 +32,12 @@ script:
|
||||
# license:check => Validate all source code license headers
|
||||
# -Dmaven.test.skip=false => Enable DSpace Unit Tests
|
||||
# -DskipITs=false => Enable DSpace Integration Tests
|
||||
# -Pdspace-rest => Enable optional dspace-rest module as part of build
|
||||
# -P !assembly => Skip assembly of "dspace-installer" directory (as it can be memory intensive)
|
||||
# -B => Maven batch/non-interactive mode (recommended for CI)
|
||||
# -V => Display Maven version info before build
|
||||
# -Dsurefire.rerunFailingTestsCount=2 => try again for flakey tests, and keep track of/report on number of retries
|
||||
- "mvn clean install license:check -Dmaven.test.skip=false -DskipITs=false -P !assembly -B -V -Dsurefire.rerunFailingTestsCount=2"
|
||||
- "mvn clean install license:check -Dmaven.test.skip=false -DskipITs=false -Pdspace-rest -P !assembly -B -V -Dsurefire.rerunFailingTestsCount=2"
|
||||
|
||||
# After a successful build and test (see 'script'), send code coverage reports to coveralls.io
|
||||
# These code coverage reports are generated by jacoco-maven-plugin (during test process above).
|
||||
|
10
Dockerfile
10
Dockerfile
@@ -23,7 +23,8 @@ USER dspace
|
||||
ADD --chown=dspace . /app/
|
||||
COPY dspace/src/main/docker/local.cfg /app/local.cfg
|
||||
|
||||
# Build DSpace. Copy the dspace-install directory to /install. Clean up the build to keep the docker image small
|
||||
# Build DSpace (note: this build doesn't include the optional, deprecated "dspace-rest" webapp)
|
||||
# Copy the dspace-install directory to /install. Clean up the build to keep the docker image small
|
||||
RUN mvn package && \
|
||||
mv /app/dspace/target/${TARGET_DIR}/* /install && \
|
||||
mvn clean
|
||||
@@ -54,12 +55,9 @@ EXPOSE 8080 8009
|
||||
ENV JAVA_OPTS=-Xmx2000m
|
||||
|
||||
# Run the "server" webapp off the /server path (e.g. http://localhost:8080/server/)
|
||||
# and the v6.x (deprecated) REST API off the "/rest" path
|
||||
RUN ln -s $DSPACE_INSTALL/webapps/server /usr/local/tomcat/webapps/server && \
|
||||
ln -s $DSPACE_INSTALL/webapps/rest /usr/local/tomcat/webapps/rest
|
||||
RUN ln -s $DSPACE_INSTALL/webapps/server /usr/local/tomcat/webapps/server
|
||||
# If you wish to run "server" webapp off the ROOT path, then comment out the above RUN, and uncomment the below RUN.
|
||||
# You also MUST update the URL in dspace/src/main/docker/local.cfg
|
||||
# Please note that server webapp should only run on one path at a time.
|
||||
#RUN mv /usr/local/tomcat/webapps/ROOT /usr/local/tomcat/webapps/ROOT.bk && \
|
||||
# ln -s $DSPACE_INSTALL/webapps/server /usr/local/tomcat/webapps/ROOT && \
|
||||
# ln -s $DSPACE_INSTALL/webapps/rest /usr/local/tomcat/webapps/rest
|
||||
# ln -s $DSPACE_INSTALL/webapps/server /usr/local/tomcat/webapps/ROOT
|
||||
|
@@ -24,7 +24,7 @@ ADD --chown=dspace . /app/
|
||||
COPY dspace/src/main/docker/local.cfg /app/local.cfg
|
||||
|
||||
# Build DSpace. Copy the dspace-install directory to /install. Clean up the build to keep the docker image small
|
||||
RUN mvn package -P'!dspace-rest' && \
|
||||
RUN mvn package && \
|
||||
mv /app/dspace/target/${TARGET_DIR}/* /install && \
|
||||
mvn clean
|
||||
|
||||
|
@@ -25,8 +25,9 @@ USER dspace
|
||||
ADD --chown=dspace . /app/
|
||||
COPY dspace/src/main/docker/local.cfg /app/local.cfg
|
||||
|
||||
# Build DSpace. Copy the dspace-install directory to /install. Clean up the build to keep the docker image small
|
||||
RUN mvn package && \
|
||||
# Build DSpace (including the optional, deprecated "dspace-rest" webapp)
|
||||
# Copy the dspace-install directory to /install. Clean up the build to keep the docker image small
|
||||
RUN mvn package -Pdspace-rest && \
|
||||
mv /app/dspace/target/${TARGET_DIR}/* /install && \
|
||||
mvn clean
|
||||
|
||||
|
@@ -1,7 +1,9 @@
|
||||
#DSpace REST API (Jersey)
|
||||
#DSpace REST API (Jersey) - DEPRECATED
|
||||
|
||||
A RESTful web services API for DSpace, built using JAX-RS1 JERSEY.
|
||||
|
||||
_This REST API has been deprecated and will be removed in v8. Please use the Server API (/server) webapp instead._
|
||||
|
||||
##Getting Started
|
||||
This REST API is integrated directly into the DSpace codebase.
|
||||
|
||||
|
@@ -59,7 +59,9 @@ public class RestIndex {
|
||||
// TODO Better graphics, add arguments to all methods. (limit, offset, item and so on)
|
||||
return "<html><title>DSpace REST - index</title>" +
|
||||
"<body>"
|
||||
+ "<h1>DSpace REST API</h1>" +
|
||||
+ "<h1>DSpace REST API (Deprecated)</h1>" +
|
||||
"<em>This REST API is deprecated and will be removed in v8." +
|
||||
" Please use the new Server API webapp instead.</em><br/>" +
|
||||
"Server path: " + servletContext.getContextPath() +
|
||||
"<h2>Index</h2>" +
|
||||
"<ul>" +
|
||||
|
@@ -35,7 +35,7 @@
|
||||
|
||||
|
||||
<servlet>
|
||||
<servlet-name>DSpace REST API</servlet-name>
|
||||
<servlet-name>DSpace REST API (Deprecated)</servlet-name>
|
||||
<servlet-class>
|
||||
org.glassfish.jersey.servlet.ServletContainer
|
||||
</servlet-class>
|
||||
@@ -47,7 +47,7 @@
|
||||
</servlet>
|
||||
|
||||
<servlet-mapping>
|
||||
<servlet-name>DSpace REST API</servlet-name>
|
||||
<servlet-name>DSpace REST API (Deprecated)</servlet-name>
|
||||
<url-pattern>/*</url-pattern>
|
||||
</servlet-mapping>
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
<!-- Security settings and mapping -->
|
||||
<security-constraint>
|
||||
<web-resource-collection>
|
||||
<web-resource-name>DSpace REST API</web-resource-name>
|
||||
<web-resource-name>DSpace REST API (Deprecated)</web-resource-name>
|
||||
<url-pattern>/*</url-pattern>
|
||||
</web-resource-collection>
|
||||
<user-data-constraint>
|
||||
|
@@ -39,12 +39,11 @@
|
||||
compiling of the corresponding source module.
|
||||
-->
|
||||
<profiles>
|
||||
<!-- As this old REST API module is deprecated, it only builds if you activate it via -Pdspace-rest -->
|
||||
<profile>
|
||||
<id>dspace-rest</id>
|
||||
<activation>
|
||||
<file>
|
||||
<exists>rest/pom.xml</exists>
|
||||
</file>
|
||||
<activeByDefault>false</activeByDefault>
|
||||
</activation>
|
||||
<modules>
|
||||
<module>rest</module>
|
||||
|
18
pom.xml
18
pom.xml
@@ -790,7 +790,7 @@
|
||||
</profile>
|
||||
|
||||
<!--
|
||||
Builds XOAI Gateway WAR for DSpace
|
||||
Builds XOAI Gateway extension for DSpace
|
||||
-->
|
||||
<profile>
|
||||
<id>dspace-oai</id>
|
||||
@@ -805,7 +805,7 @@
|
||||
</profile>
|
||||
|
||||
<!--
|
||||
Builds RDF API and Data Provider WAR for DSpace
|
||||
Builds RDF API and Data Provider extension for DSpace
|
||||
-->
|
||||
<profile>
|
||||
<id>dspace-rdf</id>
|
||||
@@ -819,13 +819,12 @@
|
||||
</modules>
|
||||
</profile>
|
||||
|
||||
<!-- REST Jersey -->
|
||||
<!-- REST Jersey (Deprecated REST API from DSpace 6.x or below) -->
|
||||
<!-- As this module is deprecated, it only builds if you activate it via -Pdspace-rest -->
|
||||
<profile>
|
||||
<id>dspace-rest</id>
|
||||
<activation>
|
||||
<file>
|
||||
<exists>dspace-rest/pom.xml</exists>
|
||||
</file>
|
||||
<activeByDefault>false</activeByDefault>
|
||||
</activation>
|
||||
<modules>
|
||||
<module>dspace-rest</module>
|
||||
@@ -834,7 +833,7 @@
|
||||
|
||||
|
||||
<!--
|
||||
Builds SWORD WAR for DSpace
|
||||
Builds SWORD extension for DSpace
|
||||
-->
|
||||
<profile>
|
||||
<id>dspace-sword</id>
|
||||
@@ -850,7 +849,7 @@
|
||||
|
||||
|
||||
<!--
|
||||
Builds SWORDv2 WAR for DSpace
|
||||
Builds SWORDv2 extension for DSpace
|
||||
-->
|
||||
<profile>
|
||||
<id>dspace-swordv2</id>
|
||||
@@ -864,6 +863,9 @@
|
||||
</modules>
|
||||
</profile>
|
||||
|
||||
<!--
|
||||
Builds Server API webapp for DSpace
|
||||
-->
|
||||
<profile>
|
||||
<id>dspace-server-webapp</id>
|
||||
<activation>
|
||||
|
Reference in New Issue
Block a user