working jetty config
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -40,3 +40,6 @@ build/
|
|||||||
### nix / direnv
|
### nix / direnv
|
||||||
.direnv
|
.direnv
|
||||||
result
|
result
|
||||||
|
|
||||||
|
### jetty
|
||||||
|
.jetty/home
|
||||||
|
|||||||
2
flake.lock
generated
2
flake.lock
generated
@@ -29,8 +29,8 @@
|
|||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"ref": "nixos-unstable",
|
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
|
"rev": "9da7f1cf7f8a6e2a7cb3001b048546c92a8258b4",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
42
flake.nix
42
flake.nix
@@ -3,10 +3,14 @@
|
|||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
flake-parts.url = "github:hercules-ci/flake-parts";
|
flake-parts.url = "github:hercules-ci/flake-parts";
|
||||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
nixpkgs.url = "github:NixOS/nixpkgs/9da7f1cf7f8a6e2a7cb3001b048546c92a8258b4";
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = inputs @ {flake-parts, ...}:
|
outputs = inputs @ {
|
||||||
|
flake-parts,
|
||||||
|
self,
|
||||||
|
...
|
||||||
|
}:
|
||||||
flake-parts.lib.mkFlake {inherit inputs;} {
|
flake-parts.lib.mkFlake {inherit inputs;} {
|
||||||
imports = [];
|
imports = [];
|
||||||
systems = ["x86_64-linux" "aarch64-linux" "aarch64-darwin" "x86_64-darwin"];
|
systems = ["x86_64-linux" "aarch64-linux" "aarch64-darwin" "x86_64-darwin"];
|
||||||
@@ -95,14 +99,38 @@
|
|||||||
mermaid-cli
|
mermaid-cli
|
||||||
openjdk
|
openjdk
|
||||||
jetty
|
jetty
|
||||||
ant
|
maven
|
||||||
]
|
]
|
||||||
++ latexPackages;
|
++ latexPackages;
|
||||||
|
|
||||||
shellHook = ''
|
shellHook =
|
||||||
echo "Usage Example:"
|
# bash
|
||||||
echo "jetty ..."
|
''
|
||||||
'';
|
# jetty docs: https://jetty.org/docs/jetty/12.1/operations-guide/begin/index.html
|
||||||
|
export JETTY_HOME="$(readlink -f .)/.jetty/home"
|
||||||
|
export JETTY_BASE="$(readlink -f .)/.jetty/base"
|
||||||
|
|
||||||
|
mkdir -p "$JETTY_HOME" "$JETTY_BASE"
|
||||||
|
for item in ${pkgs.jetty}/*; do
|
||||||
|
ln -sf "$item" "$JETTY_HOME/"
|
||||||
|
done
|
||||||
|
|
||||||
|
jetty() {
|
||||||
|
mkdir -p $JETTY_BASE/webapps/
|
||||||
|
ln -fs "$(readlink -f target/*.war)" $JETTY_BASE/webapps/
|
||||||
|
|
||||||
|
java \
|
||||||
|
-Djetty.home="$JETTY_HOME" \
|
||||||
|
-Djetty.base="$JETTY_BASE" \
|
||||||
|
-jar $JETTY_HOME/start.jar $@
|
||||||
|
}
|
||||||
|
|
||||||
|
jetty --add-modules=http,ee11-cdi,ee11-ext,ee11-deploy,ee11-environment,ee11-annotations,ee11-glassfish-jstl,ee11-jndi,ee11-jsp,ee11-jstl,ee11-plus,ee11-security,ee11-servlet,ee11-servlets,ee11-webapp,ee11-websocket-jakarta,ee11-websocket-jetty,ee11-websocket-jetty-client-webapp
|
||||||
|
|
||||||
|
echo "Usage Example:"
|
||||||
|
echo "jetty --add-modules=... # add modules"
|
||||||
|
echo "jetty # run webserver"
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
flake = {
|
flake = {
|
||||||
|
|||||||
84
pom.xml
84
pom.xml
@@ -12,48 +12,70 @@
|
|||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
<maven.compiler.target>8</maven.compiler.target>
|
<project.report.sourceEncoding>UTF-8</project.report.sourceEncoding>
|
||||||
<maven.compiler.source>8</maven.compiler.source>
|
<maven.compiler.release>21</maven.compiler.release>
|
||||||
<junit.version>5.11.0-M2</junit.version>
|
<junit.version>5.11.0-M2</junit.version>
|
||||||
|
<compiler-plugin.version>3.13.0</compiler-plugin.version>
|
||||||
|
<war-plugin.version>3.4.0</war-plugin.version>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>jakarta.platform</groupId>
|
<groupId>jakarta.platform</groupId>
|
||||||
<artifactId>jakarta.jakartaee-web-api</artifactId>
|
<artifactId>jakarta.jakartaee-web-api</artifactId>
|
||||||
<version>11.0.0-M3</version>
|
<version>11.0.0</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency><dependency>
|
|
||||||
<groupId>org.jboss.weld.se</groupId>
|
|
||||||
<artifactId>weld-se-core</artifactId>
|
|
||||||
<version>6.0.0.Beta1</version>
|
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.glassfish</groupId>
|
||||||
|
<artifactId>jakarta.faces</artifactId>
|
||||||
|
<version>4.1.3</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>jakarta.enterprise</groupId>
|
||||||
|
<artifactId>jakarta.enterprise.cdi-api</artifactId>
|
||||||
|
<version>4.1.0</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>jakarta.enterprise</groupId>
|
||||||
|
<artifactId>jakarta.enterprise.cdi-el-api</artifactId>
|
||||||
|
<version>4.1.0</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.jboss.weld.servlet</groupId>
|
||||||
|
<artifactId>weld-servlet-core</artifactId>
|
||||||
|
<version>5.1.2.Final</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
<groupId>org.junit.jupiter</groupId>
|
<groupId>org.junit.jupiter</groupId>
|
||||||
<artifactId>junit-jupiter-api</artifactId>
|
<artifactId>junit-jupiter-api</artifactId>
|
||||||
<version>${junit.version}</version>
|
<version>${junit.version}</version>
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>org.junit.jupiter</groupId>
|
<dependency>
|
||||||
<artifactId>junit-jupiter-engine</artifactId>
|
<groupId>org.projectlombok</groupId>
|
||||||
<version>${junit.version}</version>
|
<artifactId>lombok</artifactId>
|
||||||
<scope>test</scope>
|
<version>1.18.30</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>org.projectlombok</groupId>
|
|
||||||
<artifactId>lombok</artifactId>
|
|
||||||
<version>RELEASE</version>
|
|
||||||
<scope>provided</scope>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
|
<finalName>demo</finalName>
|
||||||
<plugins>
|
<plugins>
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-war-plugin</artifactId>
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
<version>3.4.0</version>
|
<version>${compiler-plugin.version}</version>
|
||||||
</plugin> </plugins>
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-war-plugin</artifactId>
|
||||||
|
<version>${war-plugin.version}</version>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
</project>
|
</project>
|
||||||
|
|||||||
6
src/main/webapp/WEB-INF/beans.xml
Normal file
6
src/main/webapp/WEB-INF/beans.xml
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<beans 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/beans_4_0.xsd"
|
||||||
|
version="4.0" bean-discovery-mode="annotated">
|
||||||
|
</beans>
|
||||||
@@ -3,13 +3,20 @@
|
|||||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee https://jakarta.ee/xml/ns/jakartaee/web-app_6_0.xsd"
|
xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee https://jakarta.ee/xml/ns/jakartaee/web-app_6_0.xsd"
|
||||||
version="6.0">
|
version="6.0">
|
||||||
|
|
||||||
|
<context-param>
|
||||||
|
<param-name>jakarta.faces.CONFIG_FILES</param-name>
|
||||||
|
<param-value>/WEB-INF/faces-config.xml</param-value>
|
||||||
|
</context-param>
|
||||||
|
|
||||||
<servlet>
|
<servlet>
|
||||||
<servlet-name>Faces Servlet</servlet-name>
|
<servlet-name>Faces Servlet</servlet-name>
|
||||||
<servlet-class>jakarta.faces.webapp.FacesServlet</servlet-class>
|
<servlet-class>jakarta.faces.webapp.FacesServlet</servlet-class>
|
||||||
<load-on-startup>1</load-on-startup>
|
<load-on-startup>1</load-on-startup>
|
||||||
</servlet>
|
</servlet>
|
||||||
|
|
||||||
<servlet-mapping>
|
<servlet-mapping>
|
||||||
<servlet-name>Faces Servlet</servlet-name>
|
<servlet-name>Faces Servlet</servlet-name>
|
||||||
<url-pattern>*.xhtml</url-pattern>
|
<url-pattern>*.xhtml</url-pattern>
|
||||||
</servlet-mapping>
|
</servlet-mapping>
|
||||||
</web-app>
|
</web-app>
|
||||||
|
|||||||
Reference in New Issue
Block a user