Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor packages #226

Open
wants to merge 6 commits into
base: webrepl
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@

<modelVersion>4.0.0</modelVersion>

<artifactId>jsh4jpv3</artifactId>
<artifactId>jpv3-webrepl</artifactId>
<packaging>jar</packaging>
<version>${revision}</version>

<name>jsh4jpv3</name>
<name>jpv3-webrepl</name>
<description>A JShell service to evaluate JPv3 scripts</description>
<url>http://projects.freelibrary.info/jiiify-presentation</url>

Expand Down Expand Up @@ -149,7 +149,7 @@
</filters>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>info.freelibrary.jsh4jvp3.Server</mainClass>
<mainClass>info.freelibrary.iiif.webrepl.Server</mainClass>
</transformer>
</transformers>
</configuration>
Expand Down Expand Up @@ -257,8 +257,6 @@
<platform>linux/amd64</platform>
<platform>linux/arm64/v8</platform>
</platforms>
<!-- Multi-arch builds don't work on GA because containerd isn't supported (cf. reason number two on
https://github.com/fabric8io/docker-maven-plugin/issues/1557#issuecomment-1325203489) -->
<attestations>
<sbom>${docker.sbom}</sbom>
<provenance>${docker.provenance}</provenance>
Expand Down
4 changes: 2 additions & 2 deletions src/main/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ RUN apk add --no-cache nano curl && \
addgroup -S jpv3 && \
adduser -S jpv3 -G jpv3 -s bash

COPY --chown=jpv3:jpv3 --chmod=0400 "maven/jsh4jpv3-${project.version}-uber.jar" "/opt/jpv3.jar"
COPY --chown=jpv3:jpv3 --chmod=0400 "maven/${project.name}-${project.version}-uber.jar" "/opt/${project.name}.jar"
COPY --chown=jpv3:jpv3 --chmod=0400 "imports.jsh" "/etc/jshell/imports.jsh"

EXPOSE 8888

USER jpv3

CMD ["sh", "-c", "exec java ${JAVA_OPTS} -jar /opt/jpv3.jar"]
CMD ["sh", "-c", "exec java ${JAVA_OPTS} -jar /opt/${project.name}.jar"]
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

package info.freelibrary.jsh4jvp3;
package info.freelibrary.iiif.webrepl;

/**
* The application's configuration variables.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

package info.freelibrary.jsh4jvp3;
package info.freelibrary.iiif.webrepl;

import static info.freelibrary.util.Constants.EOL;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@

package info.freelibrary.jsh4jvp3;
package info.freelibrary.iiif.webrepl;

import static info.freelibrary.jsh4jvp3.Status.METHOD_NOT_ALLOWED;
import static info.freelibrary.jsh4jvp3.Status.NOT_FOUND;
import static info.freelibrary.jsh4jvp3.Status.OK;
import static info.freelibrary.iiif.webrepl.Status.METHOD_NOT_ALLOWED;
import static info.freelibrary.iiif.webrepl.Status.NOT_FOUND;
import static info.freelibrary.iiif.webrepl.Status.OK;
import static info.freelibrary.util.Constants.EMPTY;
import static info.freelibrary.util.Constants.EOL;
import static info.freelibrary.util.Constants.INADDR_ANY;
Expand Down Expand Up @@ -338,7 +338,7 @@ private String getJarClasspath() throws ClassNotFoundException, URISyntaxExcepti
* @param aBody A response body
* @return The newly constructed response
*/
private Response getResponse(final info.freelibrary.jsh4jvp3.Status aEnum, final List<Header> aHeaderList,
private Response getResponse(final info.freelibrary.iiif.webrepl.Status aEnum, final List<Header> aHeaderList,
final byte[] aBody) {
return new Response(aEnum.getCode(), aEnum.getMessage(), aHeaderList, aBody);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

package info.freelibrary.jsh4jvp3;
package info.freelibrary.iiif.webrepl;

/**
* An encapsulation of HTTP response information.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

package info.freelibrary.jsh4jvp3;
package info.freelibrary.iiif.webrepl;

import java.io.ByteArrayOutputStream;
import java.io.IOException;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

package info.freelibrary.jsh4jpv3;
package info.freelibrary.iiif.webrepl;

import static info.freelibrary.util.Constants.INADDR_ANY;
import static java.nio.charset.StandardCharsets.UTF_8;
Expand All @@ -25,8 +25,6 @@
import info.freelibrary.util.StringUtils;
import info.freelibrary.util.ThrowingConsumer;

import info.freelibrary.jsh4jvp3.Status;

/**
* A test of the server's endpoints.
*/
Expand Down
Loading