Skip to content

Commit

Permalink
Revert "Migrate to Angular Application builder"
Browse files Browse the repository at this point in the history
This reverts commit ed9723b.
  • Loading branch information
valentin-boehm committed Feb 26, 2024
1 parent cdf4e01 commit 4ffcb3c
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 7 deletions.
7 changes: 4 additions & 3 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@
"prefix": "jhi",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:application",
"builder": "@angular-devkit/build-angular:browser-esbuild",
"options": {
"allowedCommonJsDependencies": ["sockjs-client", "webstomp-client"],
"outputPath": "build/resources/main/static/",
"index": "src/main/webapp/index.html",
"browser": "src/main/webapp/main.ts",
"main": "src/main/webapp/main.ts",
"polyfills": ["./src/main/webapp/sockjs-client.polyfill", "zone.js"],
"tsConfig": "tsconfig.app.json",
"inlineStyleLanguage": "scss",
Expand All @@ -43,7 +43,8 @@
"sourceMap": false,
"namedChunks": true,
"extractLicenses": true,
"serviceWorker": "ngsw-config.json",
"serviceWorker": true,
"ngswConfigPath": "ngsw-config.json",
"budgets": [
{
"type": "initial",
Expand Down
2 changes: 1 addition & 1 deletion gradle/profile_dev.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ task webapp(type: NpmTask) {
inputs.dir("src/main/webapp/")
.withPropertyName("webapp-source-dir")
.withPathSensitivity(PathSensitivity.RELATIVE)
outputs.dir("build/resources/main/static/browser/")
outputs.dir("build/resources/main/static/")
.withPropertyName("webapp-build-dir")

dependsOn npmInstall
Expand Down
2 changes: 1 addition & 1 deletion gradle/war.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ bootWar {
}

war {
webAppDirName = "build/resources/main/static/browser/"
webAppDirName = "build/resources/main/static/"
webXml = file("${project.rootDir}/src/main/webapp/WEB-INF/web.xml")
enabled = true
archiveExtension = "war.original"
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/de/tum/cit/ase/config/WebConfigurer.java
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ private void setLocationForStaticAssets(WebServerFactory server) {
if (server instanceof ConfigurableServletWebServerFactory servletWebServer) {
File root;
String prefixPath = resolvePathPrefix();
root = new File(prefixPath + "build/resources/main/static/browser/");
root = new File(prefixPath + "build/resources/main/static/");
if (root.exists() && root.isDirectory()) {
servletWebServer.setDocumentRoot(root);
}
Expand Down
2 changes: 1 addition & 1 deletion src/test/java/de/tum/cit/ase/config/WebConfigurerTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ void shouldCustomizeServletContainer() {
assertThat(container.getMimeMappings().get("html")).isEqualTo("text/html");
assertThat(container.getMimeMappings().get("json")).isEqualTo("application/json");
if (container.getDocumentRoot() != null) {
assertThat(container.getDocumentRoot()).isEqualTo(new File("build/resources/main/static/browser/"));
assertThat(container.getDocumentRoot()).isEqualTo(new File("build/resources/main/static/"));
}
}

Expand Down

0 comments on commit 4ffcb3c

Please sign in to comment.