diff --git a/.github/workflows/ci-publish.yaml b/.github/workflows/ci-publish.yaml index 4d41af1f0..3c177b302 100644 --- a/.github/workflows/ci-publish.yaml +++ b/.github/workflows/ci-publish.yaml @@ -59,11 +59,11 @@ jobs: run: |- pushd target echo "# SHA1" >> checksums.txt - sha1sum dependency-track-apiserver.jar dependency-track-bundled.jar >> checksums.txt + sha1sum dependency-track-apiserver.jar >> checksums.txt echo "# SHA256" >> checksums.txt - sha256sum dependency-track-apiserver.jar dependency-track-bundled.jar >> checksums.txt + sha256sum dependency-track-apiserver.jar >> checksums.txt echo "# SHA512" >> checksums.txt - sha512sum dependency-track-apiserver.jar dependency-track-bundled.jar >> checksums.txt + sha512sum dependency-track-apiserver.jar >> checksums.txt popd - name: Update Release @@ -82,6 +82,5 @@ jobs: gh release upload ${{ needs.read-version.outputs.version }} \ --clobber \ target/dependency-track-apiserver.jar \ - target/dependency-track-bundled.jar \ target/checksums.txt \ target/bom.json diff --git a/.lift.toml b/.lift.toml deleted file mode 100644 index 1add3694e..000000000 --- a/.lift.toml +++ /dev/null @@ -1,5 +0,0 @@ -ignoreRules = [ - "UnnecessaryFinal", # Being explicit with final is a good thing - "Var", # Recommends @Var annotations instead of final - "YodaCondition" # Encourages behavior that could lead to NPEs -] diff --git a/.run/Build Bundled Image.run.xml b/.run/Build Bundled Image.run.xml deleted file mode 100644 index 1cfe5b644..000000000 --- a/.run/Build Bundled Image.run.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/.run/Build Bundled.run.xml b/.run/Build Bundled.run.xml deleted file mode 100644 index 034e7a213..000000000 --- a/.run/Build Bundled.run.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/.run/Jetty with H2 Console.run.xml b/.run/Jetty with H2 Console.run.xml deleted file mode 100644 index e3f2bdf9b..000000000 --- a/.run/Jetty with H2 Console.run.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/DEVELOPING.md b/DEVELOPING.md index db21eefc1..ed6d1f335 100644 --- a/DEVELOPING.md +++ b/DEVELOPING.md @@ -51,22 +51,10 @@ Build an executable JAR containing just the API server: mvn clean package -P clean-exclude-wars -P enhance -P embedded-jetty -DskipTests -Dlogback.configuration.file=src/main/docker/logback.xml ``` -Build an executable JAR that contains both API server and frontend (aka "bundled" distribution): - -```shell -mvn clean package -P clean-exclude-wars -P enhance -P embedded-jetty -P bundle-ui -DskipTests -Dlogback.configuration.file=src/main/docker/logback.xml -``` - -> When using the `bundle-ui` profile, Maven will download -> a [`DependencyTrack/frontend`](https://github.com/DependencyTrack/frontend) -> release and include it in the JAR. The frontend version is specified via the `frontend.version` property -> in [`pom.xml`](./pom.xml). - -The resulting files are placed in `./target` as `dependency-track-apiserver.jar` or `dependency-track-bundled.jar` -respectively. -Both JARs ship with +The resulting file is placed in `./target` as `dependency-track-apiserver.jar`. +The JAR ships with an [embedded Jetty server](https://github.com/stevespringett/Alpine/tree/master/alpine-executable-war), -there's no need to deploy them in an application server like Tomcat or WildFly. +there's no need to deploy it in an application server like Tomcat or WildFly. ## Running @@ -109,39 +97,9 @@ To build and run the API server in one go, invoke the Jetty Maven plugin as foll mvn jetty:run -P enhance -Dlogback.configurationFile=src/main/docker/logback.xml ``` -> Note that the `bundle-ui` profile has no effect using this method. -> It works only for the API server, not the bundled distribution. - The above command is also suitable for debugging. For IntelliJ, simply *Debug* the [Jetty](./.run/Jetty.run.xml) run configuration. -### Skipping NVD mirroring - -For local debugging and testing, it is sometimes desirable to skip the NVD mirroring process -that is executed a minute after Dependency-Track has started. - -This can be achieved by tricking Dependency-Track into thinking that it already -mirrored the NVD data, so there's no need to re-download it again. - -Prior to starting Dependency-Track, execute the `data-nist-generate-dummy.sh` script: - -```shell -./scripts/data-nist-generate-dummy.sh -``` - -> **Note** -> The `modified` feed will still be downloaded. But that feed is so small that it -> doesn't really have an impact. -When testing containerized deployments, simply mount the local directory containing the prepared -NVD data into the container: - -```shell -./scripts/data-nist-generate-dummy.sh -docker run -d --name dtrack \ - -v "$HOME/.dependency-track:/data/.dependency-track" \ - -p '127.0.0.1:8080:8080' dependencytrack/apiserver:snapshot -``` - ## Debugging with Frontend Start the API server via the Jetty Maven plugin (see [Debugging](#debugging) above). The API server will listen on @@ -206,7 +164,7 @@ Now just execute the test again, and it should just work. ## Building Container Images -Ensure you've built either API server or the bundled distribution, or both. +Ensure you've built the API server JAR. To build the API server image: @@ -214,12 +172,6 @@ To build the API server image: docker build --build-arg WAR_FILENAME=dependency-track-apiserver.jar -t dependencytrack/apiserver:local -f ./src/main/docker/Dockerfile . ``` -To build the bundled image: - -```shell -docker build --build-arg WAR_FILENAME=dependency-track-bundled.jar -t dependencytrack/bundled:local -f ./src/main/docker/Dockerfile . -``` - ## Shedlock Shedlock is being used to ensure that scheduled tasks are executed at most once at the same time. If a task is being executed on one node, it acquires a lock which prevents execution of the same task from another node (or thread). diff --git a/pom.xml b/pom.xml index 0a53bd555..b00847167 100644 --- a/pom.xml +++ b/pom.xml @@ -683,87 +683,6 @@ ${project.build.finalName}-apiserver - - h2-console - - - - org.eclipse.jetty - jetty-maven-plugin - ${plugin.jetty.version} - - - / - - src/test/webapp/WEB-INF/h2-console-activation.xml - - - - - - - bundle-ui - - - env.ACTIVATE_BUNDLE_UI - true - - - - ${project.build.finalName}-bundled - - - - - maven-antrun-plugin - 3.1.0 - - - frontend-download - prepare-package - - - - - - - run - - - - frontend-extract - prepare-package - - - - - - - - run - - - - frontend-resource-deploy - prepare-package - - - - - - - - - - - run - - - - - - - diff --git a/src/test/webapp/WEB-INF/h2-console-activation.xml b/src/test/webapp/WEB-INF/h2-console-activation.xml deleted file mode 100644 index 227517995..000000000 --- a/src/test/webapp/WEB-INF/h2-console-activation.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - h2.console.enabled - true - - - h2.console.path - /h2-console - - \ No newline at end of file