diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index fdafc1c..8b051af 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -20,7 +20,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-java@v4 with: - java-version: '11' + java-version: '17' distribution: 'temurin' cache: maven - run: mvn -Dhttps.protocols=TLSv1.2 -B package --file pom.xml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5cbc934..47e20e1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -14,7 +14,7 @@ jobs: - uses: actions/checkout@v2 - uses: actions/setup-java@v2 with: - java-version: '11' + java-version: '17' distribution: 'temurin' cache: maven - run: mvn -Dhttps.protocols=TLSv1.2 package -pl MetFragCommandLine -am -DskipTests diff --git a/Dockerfile b/Dockerfile index 172bb79..81782f3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,7 +14,7 @@ LocalDatabasesFolderForWeb = /vol/file_databases' > /MetFragRelaunched/MetFragWe RUN mvn -Dhttps.protocols=TLSv1.2 -f MetFragRelaunched clean package -pl MetFragLib -pl MetFragWeb -am -DskipTests -FROM tomee:9 +FROM tomee:10 RUN set -eux; \ apt-get update; \ diff --git a/MetFragRest/pom.xml b/MetFragRest/pom.xml index b51f967..90bd764 100644 --- a/MetFragRest/pom.xml +++ b/MetFragRest/pom.xml @@ -1,97 +1,67 @@ - - 4.0.0 - - de.ipbhalle.metfrag - MetFrag - 2.6.0 - - de.ipbhalle.metfrag.metfragrest - MetFragRest - jar - MetFragRest - http://maven.apache.org + + 4.0.0 + + de.ipbhalle.metfrag + MetFrag + 2.6.0 + + de.ipbhalle.metfrag.metfragrest + MetFragRest + jar + MetFragRest + http://maven.apache.org - - - de.ipbhalle.metfraglib - MetFragLib - - - org.springframework.boot - spring-boot-starter-web - - - org.springframework.boot - spring-boot-starter-logging - - - - - org.springframework.boot - spring-boot-starter-log4j2 - - - - - org.springframework.boot - spring-boot-starter-hateoas - - - jakarta.platform - jakarta.jakartaee-api - compile - - - - - - - - - - org.springframework.boot - spring-boot-dependencies - 2.5.15 - pom - import - - - - - - - org.springframework.boot - spring-boot-maven-plugin - 2.5.15 - - - - repackage - - - - - - + + + de.ipbhalle.metfraglib + MetFragLib + + + org.springframework.boot + spring-boot-starter-web + + + org.springframework.boot + spring-boot-starter-logging + + + + + org.springframework.boot + spring-boot-starter-log4j2 + + + org.springframework.boot + spring-boot-starter-hateoas + + + + + + org.springframework.boot + spring-boot-dependencies + 2.5.15 + pom + import + + + + + + + org.springframework.boot + spring-boot-maven-plugin + 2.5.15 + + + + repackage + + + + + + diff --git a/MetFragRest/src/main/java/de/ipbhalle/metfragrest/MetFragRestController.java b/MetFragRest/src/main/java/de/ipbhalle/metfragrest/MetFragRestController.java index 2810097..33be1b0 100644 --- a/MetFragRest/src/main/java/de/ipbhalle/metfragrest/MetFragRestController.java +++ b/MetFragRest/src/main/java/de/ipbhalle/metfragrest/MetFragRestController.java @@ -13,7 +13,7 @@ import java.util.zip.ZipEntry; import java.util.zip.ZipOutputStream; -import jakarta.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpServletResponse; import org.apache.log4j.Logger; import org.apache.tomcat.util.http.fileupload.FileUtils; diff --git a/MetFragWeb/src/main/java/de/ipbhalle/metfragweb/controller/CompareSpectraD3JSBean.java b/MetFragWeb/src/main/java/de/ipbhalle/metfragweb/controller/CompareSpectraD3JSBean.java index 0f7af66..84408d2 100644 --- a/MetFragWeb/src/main/java/de/ipbhalle/metfragweb/controller/CompareSpectraD3JSBean.java +++ b/MetFragWeb/src/main/java/de/ipbhalle/metfragweb/controller/CompareSpectraD3JSBean.java @@ -2,13 +2,15 @@ import java.awt.image.RenderedImage; import java.io.IOException; +import java.io.Serializable; import java.util.Random; -import jakarta.faces.bean.ManagedBean; -import jakarta.faces.bean.SessionScoped; +import jakarta.enterprise.context.SessionScoped; import jakarta.faces.context.FacesContext; import jakarta.faces.event.ActionEvent; import javax.imageio.ImageIO; + +import jakarta.inject.Named; import jakarta.servlet.ServletContext; import jakarta.servlet.http.HttpServletRequest; import jakarta.servlet.http.HttpSession; @@ -36,9 +38,9 @@ import de.ipbhalle.metfraglib.settings.MetFragGlobalSettings; import de.ipbhalle.metfraglib.settings.Settings; -@ManagedBean +@Named @SessionScoped -public class CompareSpectraD3JSBean { +public class CompareSpectraD3JSBean implements Serializable { private String peakList1; private String peakList2; diff --git a/MetFragWeb/src/main/java/de/ipbhalle/metfragweb/controller/MetFragLandingBean.java b/MetFragWeb/src/main/java/de/ipbhalle/metfragweb/controller/MetFragLandingBean.java index e68d321..fd5a805 100644 --- a/MetFragWeb/src/main/java/de/ipbhalle/metfragweb/controller/MetFragLandingBean.java +++ b/MetFragWeb/src/main/java/de/ipbhalle/metfragweb/controller/MetFragLandingBean.java @@ -1,20 +1,20 @@ package de.ipbhalle.metfragweb.controller; import jakarta.annotation.PostConstruct; -import jakarta.faces.bean.ManagedBean; -import jakarta.faces.bean.RequestScoped; +import jakarta.enterprise.context.RequestScoped; import jakarta.faces.context.FacesContext; import de.ipbhalle.metfraglib.parameter.Constants; import de.ipbhalle.metfraglib.parameter.VariableNames; import de.ipbhalle.metfragweb.datatype.Parameter; +import jakarta.inject.Named; import jakarta.servlet.http.HttpServletRequest; import org.primefaces.PrimeFaces; -@ManagedBean +@Named @RequestScoped public class MetFragLandingBean { diff --git a/MetFragWeb/src/main/java/de/ipbhalle/metfragweb/controller/MetFragWebBean.java b/MetFragWeb/src/main/java/de/ipbhalle/metfragweb/controller/MetFragWebBean.java index f5664e0..87b68eb 100644 --- a/MetFragWeb/src/main/java/de/ipbhalle/metfragweb/controller/MetFragWebBean.java +++ b/MetFragWeb/src/main/java/de/ipbhalle/metfragweb/controller/MetFragWebBean.java @@ -2,18 +2,20 @@ import java.awt.image.RenderedImage; import java.io.IOException; +import java.io.Serializable; import java.net.InetAddress; import java.net.UnknownHostException; import java.util.List; import jakarta.annotation.PostConstruct; +import jakarta.enterprise.context.SessionScoped; import jakarta.faces.application.FacesMessage; -import jakarta.faces.bean.ManagedBean; -import jakarta.faces.bean.SessionScoped; import jakarta.faces.context.FacesContext; import jakarta.faces.event.ActionEvent; import jakarta.faces.model.SelectItem; import javax.imageio.ImageIO; + +import jakarta.inject.Named; import jakarta.servlet.ServletContext; import jakarta.servlet.http.HttpServletRequest; import jakarta.servlet.http.HttpSession; @@ -72,9 +74,9 @@ import de.ipbhalle.metfragweb.validator.SmartsExpressionValidator; import de.ipbhalle.metfragweb.validator.SmartsValidator; -@ManagedBean +@Named @SessionScoped -public class MetFragWebBean { +public class MetFragWebBean implements Serializable { private final String version = "v2.6.0"; /* diff --git a/MetFragWeb/src/main/webapp/WEB-INF/faces-config.xml b/MetFragWeb/src/main/webapp/WEB-INF/faces-config.xml deleted file mode 100644 index 1729888..0000000 --- a/MetFragWeb/src/main/webapp/WEB-INF/faces-config.xml +++ /dev/null @@ -1,70 +0,0 @@ - - - - metFragBean - de.ipbhalle.metfragweb.controller.MetFragWebBean - session - - - compareSpectraD3JSBean - de.ipbhalle.metfragweb.controller.CompareSpectraD3JSBean - session - - - metFragLandingBean - de.ipbhalle.metfragweb.controller.MetFragLandingBean - request - - - doubleNumberValidator - de.ipbhalle.metfragweb.validator.DoubleValueValidator - - - smartsValidator - de.ipbhalle.metfragweb.validator.SmartsValidator - - - formulaValidator - de.ipbhalle.metfragweb.validator.FormulaValidator - - - peakListValidator - de.ipbhalle.metfragweb.validator.PeakListValidator - - - elementsValidator - de.ipbhalle.metfragweb.validator.ElementsValidator - - - positiveDoubleNumberValidator - de.ipbhalle.metfragweb.validator.PositiveDoubleValueValidator - - - searchPPMValidator - de.ipbhalle.metfragweb.validator.SearchPPMValidator - - - - org.primefaces.application.DialogActionListener - - - org.primefaces.application.DialogNavigationHandler - - - org.primefaces.application.DialogViewHandler - - - - - org.primefaces.application.exceptionhandler.PrimeExceptionHandlerELResolver - - - - - de.ipbhalle.metfragweb.exception.ViewExpiredExceptionExceptionHandlerFactory - - - diff --git a/MetFragWeb/src/main/webapp/WEB-INF/web.xml b/MetFragWeb/src/main/webapp/WEB-INF/web.xml index 77947b2..dc82b56 100644 --- a/MetFragWeb/src/main/webapp/WEB-INF/web.xml +++ b/MetFragWeb/src/main/webapp/WEB-INF/web.xml @@ -1,32 +1,28 @@ + xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee https://jakarta.ee/xml/ns/jakartaee/web-app_6_0.xsd" + version = "6.0" metadata-complete = "false"> MetFragWeb + index.xhtml - 30 + 50 - - xhtml - application/xml - - + jakarta.faces.FACELETS_BUFFER_SIZE 65535 - State saving method: 'client' or 'server' (=default). See JSF Specification 2.5.2 jakarta.faces.STATE_SAVING_METHOD server - - jakarta.servlet.jsp.jstl.fmt.LocalizationContext - resources.application - + + + + primefaces.THEME aristo @@ -44,10 +40,6 @@ Faces Servlet *.xhtml - - - - jakarta.faces.FACELETS_SKIP_COMMENTS true diff --git a/MetFragWeb/src/main/webapp/comparespectrad3js.xhtml b/MetFragWeb/src/main/webapp/comparespectrad3js.xhtml index bd62939..c0270e0 100644 --- a/MetFragWeb/src/main/webapp/comparespectrad3js.xhtml +++ b/MetFragWeb/src/main/webapp/comparespectrad3js.xhtml @@ -14,7 +14,7 @@ + background: #E2E2E2 url('resources/images/body-bg.png') repeat-x scroll 0 0; overflow-x: hidden;">