diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 72aa3e0..acf7ecc 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -7,10 +7,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v2
+ - uses: actions/checkout@v3
- name: "Maven Cache"
- uses: actions/cache@v2
+ uses: actions/cache@v3
with:
path: ~/.m2/repository
key: ${{ runner.os }}-cache-maven-${{ hashFiles('**/pom.xml') }}
@@ -21,7 +21,7 @@ jobs:
java-version: 11
- name: "Maven Test"
- run: mvn clean test jacoco:report coveralls:report -DdryRun=true
+ run: mvn clean test jacoco:report coveralls:report -DdryRun=true -Pbuddy
- name: "Send to Coveralls (build java-${{ github.run_number }})"
uses: MikeEdgar/github-action@raw_coverage_file
@@ -31,7 +31,7 @@ jobs:
coverage-format: raw
- name: "Deploy GH-Pages"
- if: github.ref == 'refs/heads/master' && github.event_name == 'push'
+ if: github.ref == 'refs/heads/main' && github.event_name == 'push'
uses: JamesIves/github-pages-deploy-action@3.7.1
with:
github_token: ${{ secrets.github_token }}
diff --git a/.gitignore b/.gitignore
index 116093c..4faeb8c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,12 +1,70 @@
-.apt_generated/
-target/
-.DS_Store
+### Git ###
+!.gitkeep
+
+
+### STS ###
+.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
-.vscode
-bin/
+.sts4-cache
+
+
+### IntelliJ IDEA ###
+.idea
+*.iws
+*.iml
+*.ipr
+
+
+### NetBeans ###
+/nbproject/private/
+/nbbuild/
+/dist/
+/nbdist/
+
+/.nb-gradle/
+
+
+### VS Code ###
+.vscode/
+
+dump.rdb
+
+
+### OS Specific ###
+.DS_Store
+.tmp/
+
+tmp/
+
+
+### Maven ###
logs/
-*.log*
\ No newline at end of file
+target/
+
+.classpth
+.mvn/timing.properties
+.mvn/wrapper/maven-wrapper.jar
+.project
+
+buildNumber.properties
+dependency-reduced-pom.xml
+pom.xml.next
+pom.xml.tag
+pom.xml.releaseBackup
+pom.xml.versionsBackup
+release.properties
+
+
+### Weaver ###
+dist/
+
+
+### Project Specific ###
+.env*
+
+!**/src/main/**
+!**/src/test/**
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
new file mode 100644
index 0000000..791c062
--- /dev/null
+++ b/CONTRIBUTING.md
@@ -0,0 +1,64 @@
+
+# Contributing to Project Management Service
+
+Though *Project Management Service* is developed and maintained by Texas A&M University Libraries, we welcome community contributions.
+Involvement in *Project Management Service* can take many forms.
+
+
+
+
+## Using
+
+Deploying *Project Management Service* and trying it out at your own institution is itself a way of contributing to the development process.
+For more information on deployment strategies please see the [Deployment Guide][deployment-guide].
+
+
+
+
+## Filing Issues
+
+Once you are using *Project Management Service* the creation of new issues through GitHub is a major method of contribution towards *Project Management Service* development.
+Issues can be motivated by the discovery of a bug in the software, or by the desire to see either new features added or see changes to existing features.
+
+There are two primary types of issues:
+1. Bug Report
+2. Feature Request
+
+A **Bug Report** involves a problem with the existing software or a **Feature** is not working as designed or expected.
+
+A **Feature** involves new functionality or behavior.
+
+
+
+
+## Creating a Pull Request
+
+Community code and documentation contributions are welcome and should take the form of a **GitHub Pull Request** (*PR*).
+Each *PR* will need to be reviewed by a *Project Management Service* developer.
+A review will result in the *PR* being accepted and merged, a descriptive request for changes, or the *PR* being closed along with a detailed explanation.
+
+It is our intention to maintain labeling on issues that are deemed to be low difficulty in order to provide a good point of entry for those looking to begin contributing code or documentation.
+
+A *PR* description should include a list of the specific issues resolved, the predicted *semantic versioning* impact of the changes, and a description which characterizes the nature of the changes made.
+When creating a *PR*, an issue template is automatically provided to simplify this process.
+
+For more information about *semantic versioning* please see [Semantic Versioning Website][semantic-versioning].
+In general keep in mind:
+
+- A **Major Change** is a breaking change that is not backwards compatible.
+- A **Minor Change** is a non-breaking change that is backwards compatible to the last **Major Change**.
+- A **Patch** is a trivial change or bug fix that should not impact compatibility.
+
+
+
+
+## Good Luck!
+
+We look forward to seeing your contributions.
+If you have any additional questions please contact the *Project Management Service* developers at helpdesk@library.tamu.edu.
+
+
+
+
+[deployment-guide]: DEPLOYING.md
+[semantic-versioning]: https://semver.org/
diff --git a/DEPLOYING.md b/DEPLOYING.md
new file mode 100644
index 0000000..f436223
--- /dev/null
+++ b/DEPLOYING.md
@@ -0,0 +1,67 @@
+
+# Project Management Service Deployment Guide
+
+## Production Deployments
+
+For **production** deployments, deploy using `docker-compose` via the [Project App Repo][app-repo].
+This is the recommended method of deployment for production systems.
+Go to the [Project Management App Repo][app-repo] and following the deployment instructions there.
+
+Performing the deployment using the [Project Management App Repo][app-repo] should be something similar to the following:
+```shell
+docker-compose up
+```
+
+The **development** deployment can also use `docker-compose` in the same way.
+
+
+
+
+## Development Deployment using Docker
+
+To manually use `docker` rather than `docker-compose`, run the following:
+
+```shell
+docker image build -t projectservice .
+docker run -it projectservice
+```
+
+_* Note: `-t projectservice` and `-it projectservice` may be changed to another tag name as desired, such as `-t developing_on_this` and `-it developing_on_this`._
+
+
+
+
+## Development Deployment using Maven
+
+Manual deployment can be summed up by running:
+
+```shell
+mvn spring-boot:run
+```
+
+Those steps are a great way to start but they also fail to explain the customization that is often needed.
+There are multiple ways to further configure this for deployment to better meet the desired requirements.
+
+It is highly recommended only to perform *manual installation* when developing.
+For **production** deployment, please use `docker-compose` via the [Project Management App Repo][app-repo] or use the **Docker** method above.
+
+
+
+
+### Directly Configuring the `src/main/resources/application.yml` File
+
+This method of configuration works by altering the configuration file.
+
+With this in mind, the deployment steps now look like:
+
+```shell
+# Edit 'src/main/resources/application.yml' here.
+
+mvn spring-boot:run
+```
+
+
+
+
+
+[app-repo]: https://github.com/TAMULib/ProjectManagement
diff --git a/Dockerfile b/Dockerfile
index 34d12eb..f80b86b 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,24 +1,27 @@
# Settings.
ARG USER_ID=3001
ARG USER_NAME=projectmanagement
-ARG HOME_DIR=/$USER_NAME
-ARG SOURCE_DIR=$HOME_DIR/source
+ARG SOURCE_DIR=/$USER_NAME/source
# Maven stage.
FROM maven:3-openjdk-11-slim as maven
ARG USER_ID
ARG USER_NAME
-ARG HOME_DIR
ARG SOURCE_DIR
-# Create the group (use a high ID to attempt to avoid conflits).
-RUN groupadd -g $USER_ID $USER_NAME
+# Create the user and group (use a high ID to attempt to avoid conflicts).
+RUN groupadd --non-unique -g $USER_ID $USER_NAME && \
+ useradd --non-unique -d /$USER_NAME -m -u $USER_ID -g $USER_ID $USER_NAME
-# Create the user (use a high ID to attempt to avoid conflits).
-RUN useradd -d $HOME_DIR -m -u $USER_ID -g $USER_ID $USER_NAME
+# Update the system and install dependencies.
+RUN apt-get update && \
+ apt-get upgrade -y && \
+ apt-get clean && \
+ rm -rf /var/lib/apt/lists/*
-# Update the system.
-RUN apt-get update && apt-get upgrade -y
+# Make sure source directory exists.
+RUN mkdir -p $SOURCE_DIR && \
+ chown -R $USER_ID:$USER_ID $SOURCE_DIR
# Set deployment directory.
WORKDIR $SOURCE_DIR
@@ -40,24 +43,20 @@ RUN mvn package -Pjar -DskipTests=true
FROM openjdk:11-jre-slim
ARG USER_ID
ARG USER_NAME
-ARG HOME_DIR
ARG SOURCE_DIR
-# Create the group (use a high ID to attempt to avoid conflits).
-RUN groupadd -g $USER_ID $USER_NAME
-
-# Create the user (use a high ID to attempt to avoid conflits).
-RUN useradd -d $HOME_DIR -m -u $USER_ID -g $USER_ID $USER_NAME
+# Create the user and group (use a high ID to attempt to avoid conflicts).
+RUN groupadd --non-unique -g $USER_ID $USER_NAME && \
+ useradd --non-unique -d /$USER_NAME -m -u $USER_ID -g $USER_ID $USER_NAME
# Login as user.
USER $USER_NAME
# Set deployment directory.
-WORKDIR $HOME_DIR
+WORKDIR /$USER_NAME
# Copy over the built artifact from the maven image.
COPY --from=maven $SOURCE_DIR/target/ROOT.jar ./projectmanagement.jar
-
# Run java command.
CMD ["java", "-jar", "./projectmanagement.jar"]
diff --git a/README.md b/README.md
index 27be3a1..3eced01 100644
--- a/README.md
+++ b/README.md
@@ -1,22 +1,61 @@
-[![Build Status](https://github.com/TAMULib/ProjectManagementService/workflows/Build/badge.svg)](https://github.com/TAMULib/ProjectManagementService/actions?query=workflow%3ABuild)
-[![Coverage Status](https://coveralls.io/repos/github/TAMULib/ProjectManagementService/badge.svg)](https://coveralls.io/github/TAMULib/ProjectManagementService)
+[![Build Status][build-badge]][build-status]
+[![Coverage Status][coverage-badge]][coverage-status]
-# Product Management Service
-The Product Management Service is designed to connect our Library Webservice Status Application to our Version Management Software.
+# Project Management Service
-## Building Product Management Service
+A *Spring* backend for the *Project Management Service* developed and maintained by [Texas A&M University Libraries][tamu-library].
-### Development
-```bash
-$ mvn clean spring-boot:run
-```
+This is a service designed to interconnect our *Library Service Status System* with *VersionOne* and *GitHub* Services.
+
+
+Table of contents
+
+ - [Deployment](#deployment)
+ - [Developer Documentation](#developer-documentation)
+ - [Additional Resources](#additional-resources)
+
+
+
+
+## Deployment
+
+For a quick and easy deployment using `docker-compose` consider using the [Project Managment App Repo][app-repo].
+
+For _advanced use cases_, or when `docker-compose` is unavailable, the UI may be either started using `docker` directly or even manually started.
+This process is further described in the [Deployment Guide][deployment-guide].
+
+
-### Production
-```bash
-$ mvn clean package -DskipTests -Dproduction
-```
## Developer Documentation
-- [API Documentation](https://tamulib.github.io/ProjectManagementService)
+- [Contributors Documentation][contribute-guide]
+- [Deployment Documentation][deployment-guide]
+- [API Documentation][api-documentation]
+
+
+
+
+## Additional Resources
+
+Please feel free to file any issues concerning Project Management Service to the issues section of the repository.
+
+Any questions concerning Project Management Service can be directed to helpdesk@library.tamu.edu.
+
+Copyright © 2022 Texas A&M University Libraries under the [MIT License][license].
+
+
+
+
+
+[app-repo]: https://github.com/TAMULib/ProjectManagement
+[build-badge]: https://github.com/TAMULib/ProjectManagementService/workflows/Build/badge.svg
+[build-status]: https://github.com/TAMULib/ProjectManagementService/actions?query=workflow%3ABuild
+[coverage-badge]: https://coveralls.io/repos/github/TAMULib/ProjectManagementService/badge.svg
+[coverage-status]: https://coveralls.io/github/TAMULib/ProjectManagementService
+[api-documentation]: https://tamulib.github.io/ProjectManagementService
+[tamu-library]: http://library.tamu.edu
+[deployment-guide]: DEPLOYING.md
+[contribute-guide]: CONTRIBUTING.md
+[license]: LICENSE
diff --git a/pom.xml b/pom.xml
index 06957e2..00e8667 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1,18 +1,20 @@
-
-
4.0.0
+
edu.tamu
product-management-service
1.0.1
Product-Management-Service
+
A Webservice to manage Products
edu.tamu.weaver
webservice-parent
- 2.1.1-RC10
+ 2.1.1-RC11
@@ -39,6 +41,24 @@
jar
+
+ buddy
+
+
+ net.bytebuddy
+ byte-buddy
+ 1.12.13
+ test
+
+
+
+ net.bytebuddy
+ byte-buddy-agent
+ 1.12.13
+ test
+
+
+
@@ -149,20 +169,6 @@
test
-
- net.bytebuddy
- byte-buddy
- 1.12.13
- test
-
-
-
- net.bytebuddy
- byte-buddy-agent
- 1.12.13
- test
-
-
com.infradna.tool
bridge-method-annotation
@@ -287,14 +293,22 @@
tamu-releases
https://artifacts.library.tamu.edu/repository/maven-releases
- true
- false
+
+ true
+
+
+ false
+
tamu-snapshots
https://artifacts.library.tamu.edu/repository/maven-snapshots
- false
- true
+
+ false
+
+
+ true
+
diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml
index d8e65f2..8c56e49 100644
--- a/src/main/resources/application.yml
+++ b/src/main/resources/application.yml
@@ -1,5 +1,5 @@
server:
- port: 9001
+ port: 9000
servlet:
context-path: /products
diff --git a/src/test/resources/logback-test.xml b/src/test/resources/logback-test.xml
index ff2a2b0..d469ae8 100644
--- a/src/test/resources/logback-test.xml
+++ b/src/test/resources/logback-test.xml
@@ -1,11 +1,8 @@
-
-
-