Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ARG BUILD_IMAGE=gradle:9-jdk21
ARG RUN_IMAGE=jeffersonlab/wildfly:1.6.2
ARG RUN_IMAGE=jeffersonlab/wildfly:2.2.0

################## Stage 0
FROM ${BUILD_IMAGE} AS builder
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# adm [![CI](https://github.com/JeffersonLab/adm/actions/workflows/ci.yaml/badge.svg)](https://github.com/JeffersonLab/adm/actions/workflows/ci.yaml) [![Docker](https://img.shields.io/docker/v/jeffersonlab/adm?sort=semver&label=DockerHub)](https://hub.docker.com/r/jeffersonlab/adm)
A [Java EE 8](https://en.wikipedia.org/wiki/Jakarta_EE) web application for app deployment at Jefferson Lab built with the [Smoothness](https://github.com/JeffersonLab/smoothness) web template.
A [Jakarta EE 10](https://en.wikipedia.org/wiki/Jakarta_EE) web application for app deployment at Jefferson Lab built with the [Smoothness](https://github.com/JeffersonLab/smoothness) web template.


![Screenshot](https://github.com/JeffersonLab/adm/raw/main/Screenshot.png?raw=true "Screenshot")
Expand Down Expand Up @@ -38,10 +38,10 @@ http://localhost:8080/adm
**Note**: Login with demo username "tbrown" and password "password". Use env "local-demo", app "testapp", ver "1.0.0".

## Install
This application requires a Java 17+ JVM and standard library to run, plus a Java EE 8+ application server (developed with Wildfly).
This application requires a Java 17+ JVM and standard library to run, plus a Jakarta EE 10 application server (developed with Wildfly).

1. Install service [dependencies](https://github.com/JeffersonLab/adm/blob/main/deps.yaml)
2. Download [Wildfly 26.1.3](https://www.wildfly.org/downloads/)
2. Download [Wildfly 37.0.1](https://www.wildfly.org/downloads/)
3. [Configure](https://github.com/JeffersonLab/adm#configure) Wildfly and start it
4. Download [adm.war](https://github.com/JeffersonLab/workmap/releases) and deploy it to Wildfly
5. Navigate your web browser to [localhost:8080/adm](http://localhost:8080/adm)
Expand Down
17 changes: 6 additions & 11 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ description = 'Application deployment manager app'
group = 'org.jlab'
version = new File("${projectDir}/VERSION").text.trim()
ext.version = project.version
ext.smoothnessVersion = '4.13.0'
ext.smoothnessVersion = '5.0.2'
ext.releaseDate = new Date().format('MMM dd yyyy')

tasks.withType(JavaCompile).configureEach {
Expand All @@ -17,10 +17,6 @@ tasks.withType(JavaCompile).configureEach {
}
repositories {
mavenCentral()

maven {
url = "https://s01.oss.sonatype.org/content/repositories/releases/"
}
}
dependencies {
// No matter what smoothness weblib MUST be included in WAR (https://github.com/JeffersonLab/smoothness/issues/4)
Expand All @@ -29,13 +25,12 @@ dependencies {
implementation 'org.apache.sshd:sshd-core:2.12.1'

// Smoothness setup should install these into Wildfly
providedCompile 'org.tuckey:urlrewritefilter:4.0.4'
providedCompile 'org.tuckey:urlrewritefilter:5.1.3'

// Wildfly 26.1.3.Final provides:
providedCompile 'javax:javaee-api:8.0.1',
'javax.servlet:jstl:1.2',
'org.hibernate:hibernate-core:5.3.28.Final',
'org.hibernate:hibernate-envers:5.3.28.Final'
// Wildfly 37.0.1.Final provides:
providedCompile 'jakarta.platform:jakarta.jakartaee-api:10.0.0',
'org.hibernate:hibernate-core:6.6.19.Final',
'org.glassfish.web:jakarta.servlet.jsp.jstl:3.0.1'
}
tasks.named('jar') {
enabled = false
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package org.jlab.adm.business.session;

import jakarta.annotation.security.PermitAll;
import jakarta.persistence.EntityManager;
import jakarta.persistence.TypedQuery;
import jakarta.persistence.criteria.*;
import java.util.ArrayList;
import java.util.List;
import javax.annotation.security.PermitAll;
import javax.persistence.EntityManager;
import javax.persistence.TypedQuery;
import javax.persistence.criteria.*;

public abstract class AbstractFacade<T> {
private final Class<T> entityClass;
Expand Down
10 changes: 5 additions & 5 deletions src/main/java/org/jlab/adm/business/session/AppEnvFacade.java
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package org.jlab.adm.business.session;

import jakarta.annotation.security.PermitAll;
import jakarta.ejb.Stateless;
import jakarta.persistence.EntityManager;
import jakarta.persistence.PersistenceContext;
import jakarta.persistence.criteria.*;
import java.util.ArrayList;
import java.util.List;
import javax.annotation.security.PermitAll;
import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import javax.persistence.criteria.*;
import org.jlab.adm.persistence.entity.AppEnv;

@Stateless
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/org/jlab/adm/business/session/AppFacade.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package org.jlab.adm.business.session;

import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import jakarta.ejb.Stateless;
import jakarta.persistence.EntityManager;
import jakarta.persistence.PersistenceContext;
import org.jlab.adm.persistence.entity.App;

@Stateless
Expand Down
12 changes: 6 additions & 6 deletions src/main/java/org/jlab/adm/business/session/DeployJobFacade.java
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
package org.jlab.adm.business.session;

import jakarta.annotation.security.PermitAll;
import jakarta.ejb.Stateless;
import jakarta.persistence.EntityManager;
import jakarta.persistence.PersistenceContext;
import jakarta.persistence.TypedQuery;
import jakarta.persistence.criteria.*;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.List;
import javax.annotation.security.PermitAll;
import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import javax.persistence.TypedQuery;
import javax.persistence.criteria.*;
import org.jlab.adm.persistence.entity.DeployJob;

@Stateless
Expand Down
10 changes: 5 additions & 5 deletions src/main/java/org/jlab/adm/business/session/DeployerFacade.java
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package org.jlab.adm.business.session;

import jakarta.annotation.Resource;
import jakarta.annotation.security.PermitAll;
import jakarta.ejb.EJB;
import jakarta.ejb.SessionContext;
import jakarta.ejb.Stateless;
import java.io.IOException;
import java.math.BigInteger;
import java.util.regex.Pattern;
import javax.annotation.Resource;
import javax.annotation.security.PermitAll;
import javax.ejb.EJB;
import javax.ejb.SessionContext;
import javax.ejb.Stateless;
import org.jlab.adm.persistence.entity.AppEnv;
import org.jlab.adm.persistence.entity.DeployJob;
import org.jlab.smoothness.business.exception.UserFriendlyException;
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/org/jlab/adm/business/session/SSHFacade.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
package org.jlab.adm.business.session;

import jakarta.annotation.security.PermitAll;
import jakarta.ejb.Asynchronous;
import jakarta.ejb.EJB;
import jakarta.ejb.Stateless;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.PrintWriter;
Expand All @@ -9,10 +13,6 @@
import java.util.Date;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.annotation.security.PermitAll;
import javax.ejb.Asynchronous;
import javax.ejb.EJB;
import javax.ejb.Stateless;
import org.apache.sshd.client.SshClient;
import org.apache.sshd.client.session.ClientSession;
import org.jlab.adm.persistence.entity.AppEnv;
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/org/jlab/adm/persistence/entity/App.java
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package org.jlab.adm.persistence.entity;

import jakarta.persistence.*;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Objects;
import javax.persistence.*;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

@Entity
@Table(schema = "ADM_OWNER")
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/org/jlab/adm/persistence/entity/AppEnv.java
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package org.jlab.adm.persistence.entity;

import jakarta.persistence.*;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Objects;
import javax.persistence.*;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

@Entity
@Table(schema = "ADM_OWNER", name = "APP_ENV")
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/org/jlab/adm/persistence/entity/DeployJob.java
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package org.jlab.adm.persistence.entity;

import jakarta.persistence.*;
import jakarta.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigInteger;
import java.util.Date;
import javax.persistence.*;
import javax.validation.constraints.NotNull;

@Entity
@Table(schema = "ADM_OWNER", name = "DEPLOY_JOB")
Expand Down
10 changes: 5 additions & 5 deletions src/main/java/org/jlab/adm/presentation/controller/Choose.java
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package org.jlab.adm.presentation.controller;

import jakarta.servlet.ServletException;
import jakarta.servlet.annotation.WebServlet;
import jakarta.servlet.http.HttpServlet;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

@WebServlet(
name = "Choose",
Expand Down
16 changes: 8 additions & 8 deletions src/main/java/org/jlab/adm/presentation/controller/Deploy.java
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
package org.jlab.adm.presentation.controller;

import jakarta.ejb.EJB;
import jakarta.json.Json;
import jakarta.json.JsonObjectBuilder;
import jakarta.servlet.ServletException;
import jakarta.servlet.annotation.WebServlet;
import jakarta.servlet.http.HttpServlet;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.PrintWriter;
import java.math.BigInteger;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.ejb.EJB;
import javax.json.Json;
import javax.json.JsonObjectBuilder;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.jlab.adm.business.session.DeployerFacade;
import org.jlab.smoothness.business.exception.UserFriendlyException;

Expand Down
12 changes: 6 additions & 6 deletions src/main/java/org/jlab/adm/presentation/controller/Log.java
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
package org.jlab.adm.presentation.controller;

import jakarta.ejb.EJB;
import jakarta.servlet.ServletException;
import jakarta.servlet.annotation.WebServlet;
import jakarta.servlet.http.HttpServlet;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.math.BigInteger;
import java.text.DecimalFormat;
import java.util.ArrayList;
import java.util.List;
import javax.ejb.EJB;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.jlab.adm.business.session.DeployJobFacade;
import org.jlab.adm.persistence.entity.DeployJob;
import org.jlab.smoothness.presentation.util.Paginator;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package org.jlab.adm.presentation.controller.inventory;

import jakarta.ejb.EJB;
import jakarta.servlet.ServletException;
import jakarta.servlet.annotation.WebServlet;
import jakarta.servlet.http.HttpServlet;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;
import javax.ejb.EJB;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.jlab.adm.business.session.AbstractFacade;
import org.jlab.adm.business.session.AppEnvFacade;
import org.jlab.adm.persistence.entity.AppEnv;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package org.jlab.adm.presentation.controller.inventory;

import jakarta.ejb.EJB;
import jakarta.servlet.ServletException;
import jakarta.servlet.annotation.WebServlet;
import jakarta.servlet.http.HttpServlet;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;
import javax.ejb.EJB;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.jlab.adm.business.session.AbstractFacade;
import org.jlab.adm.business.session.AppFacade;
import org.jlab.adm.persistence.entity.App;
Expand Down
1 change: 0 additions & 1 deletion src/main/resources/META-INF/persistence.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
<shared-cache-mode>NONE</shared-cache-mode>
<properties>
<property name="hibernate.transaction.jta.platform" value="org.hibernate.service.jta.platform.internal.JBossAppServerJtaPlatform"/>
<property name="hibernate.dialect" value="org.hibernate.dialect.Oracle12cDialect"/>
</properties>
<class>org.jlab.smoothness.persistence.entity.Setting</class>
</persistence-unit>
Expand Down
12 changes: 6 additions & 6 deletions src/main/webapp/WEB-INF/functions.tld
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<?xml version="1.0" encoding="UTF-8" ?>
<taglib
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-jsptaglibrary_2_1.xsd"
version="2.1">
<taglib xmlns="https://jakarta.ee/xml/ns/jakartaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee
https://jakarta.ee/xml/ns/jakartaee/web-jsptaglibrary_3_0.xsd"
version="3.0">

<display-name>Custom Functions</display-name>
<tlib-version>1.0</tlib-version>
<short-name>adm</short-name>
<uri>http://jlab.org/adm/functions</uri>
<uri>jlab.tags.adm</uri>

<function>
<name>millisToHumanReadable</name>
Expand Down
2 changes: 1 addition & 1 deletion src/main/webapp/WEB-INF/tags/inventory-page.tag
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<%@tag description="The Setup Page Template Tag" pageEncoding="UTF-8"%>
<%@taglib prefix="s" uri="http://jlab.org/jsp/smoothness"%>
<%@taglib prefix="s" uri="jlab.tags.smoothness"%>
<%@taglib prefix="t" tagdir="/WEB-INF/tags"%>
<%@attribute name="title"%>
<%@attribute name="stylesheets" fragment="true"%>
Expand Down
8 changes: 4 additions & 4 deletions src/main/webapp/WEB-INF/tags/primary-nav.tag
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<%@tag description="Primary Navigation Tag" pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@taglib prefix="s" uri="http://jlab.org/jsp/smoothness"%>
<%@taglib prefix="c" uri="jakarta.tags.core"%>
<%@taglib prefix="fn" uri="jakarta.tags.functions"%>
<%@taglib prefix="fmt" uri="jakarta.tags.fmt"%>
<%@taglib prefix="s" uri="jlab.tags.smoothness"%>
<ul>
<li${'/choose' eq currentPath ? ' class="current-primary"' : ''}><a
href="${pageContext.request.contextPath}/choose">Choose</a></li>
Expand Down
8 changes: 4 additions & 4 deletions src/main/webapp/WEB-INF/tags/setup-nav.tag
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<%@tag description="Setup Navigation Tag" pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@taglib prefix="s" uri="http://jlab.org/jsp/smoothness"%>
<%@taglib prefix="c" uri="jakarta.tags.core"%>
<%@taglib prefix="fn" uri="jakarta.tags.functions"%>
<%@taglib prefix="fmt" uri="jakarta.tags.fmt"%>
<%@taglib prefix="s" uri="jlab.tags.smoothness"%>
<ul>
<li${'/setup/settings' eq currentPath ? ' class="current-secondary"' : ''}>
<a href="${pageContext.request.contextPath}/setup/settings">Settings</a>
Expand Down
8 changes: 4 additions & 4 deletions src/main/webapp/WEB-INF/views/choose.jsp
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@taglib prefix="s" uri="http://jlab.org/jsp/smoothness"%>
<%@taglib prefix="c" uri="jakarta.tags.core"%>
<%@taglib prefix="fn" uri="jakarta.tags.functions"%>
<%@taglib prefix="fmt" uri="jakarta.tags.fmt"%>
<%@taglib prefix="s" uri="jlab.tags.smoothness"%>
<%@taglib prefix="t" tagdir="/WEB-INF/tags"%>
<c:set value="Choose" var="title"/>
<s:page title="${title}">
Expand Down
Loading