Skip to content

Commit

Permalink
Merge pull request #5621 from nickgros/watch-src-files
Browse files Browse the repository at this point in the history
  • Loading branch information
nickgros authored Jan 27, 2025
2 parents a44a52d + 24a3ae2 commit 2c059c2
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 5 deletions.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,9 @@
},
"scripts": {
"build": "mvn -B package --file pom.xml",
"dev": "concurrently -k -n \"CODESERVER,TOMCAT\" -c \"auto,auto\" \"yarn dev:codeserver\" \"yarn dev:tomcat\"",
"dev": "concurrently -k -n \"CODESERVER,WATCHER,TOMCAT\" -c \"auto,auto,auto\" \"yarn dev:codeserver\" \"yarn dev:watcher\" \"yarn dev:tomcat\"",
"dev:codeserver": "mvn clean gwt:run-codeserver",
"dev:watcher": "wait-on tcp:9876 && mvn fizzed-watcher:run",
"dev:tomcat": "wait-on tcp:9876 && docker pull tomcat:9.0; docker run --name swc-dev --rm -p 8888:8080 -v \"/$(pwd)/target/portal-develop-SNAPSHOT/:/usr/local/tomcat/webapps/ROOT/\" -v \"/$HOME/.m2/settings.xml\":/root/.m2/settings.xml tomcat:9.0",
"docker:start": "docker pull tomcat:9.0; docker run --name swc-tomcat -d --rm -p 8888:8080 -v \"/$(pwd)/target/portal-develop-SNAPSHOT.war:/usr/local/tomcat/webapps/ROOT.war\" -v \"/$(pwd)/e2e_workflow/settings.xml\":/root/.m2/settings.xml tomcat:9.0",
"docker:stop": "docker stop swc-tomcat",
Expand Down
34 changes: 30 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@
<attachClasses>true</attachClasses>
</configuration>
</execution>
<!-- This next section is to copy the source maps into the WEB-INF directory
<!-- This next section is to copy the source maps into the WEB-INF directory
(during the package phase, from junit output) -->
<execution>
<id>execution2</id>
Expand All @@ -301,8 +301,34 @@
</executions>
</plugin>

<!-- We use this assembly to package the GWT RPC dependencies so they
are aviablible fore integration testing. -->
<plugin>
<groupId>com.fizzed</groupId>
<artifactId>fizzed-watcher-maven-plugin</artifactId>
<version>1.0.6</version>
<!-- This configuration is used to watch the node_modules directory for changes and copy those to the static assets folder when they change -->
<!-- Then those assets are copied into the exploded WAR -->
<configuration>
<touchFile>target/classes/watcher_explode_war.txt</touchFile>
<watches>
<watch>
<directory>
${project.basedir}/node_modules/synapse-react-client/dist/umd
</directory>
</watch>
<watch>
<directory>${project.basedir}/src/main/webapp/css</directory>
<directory>${project.basedir}/src/main/webapp/sass</directory>
</watch>
</watches>
<goals>
<goal>process-resources</goal>
<goal>war:exploded</goal>
</goals>
</configuration>
</plugin>

<!-- We use this assembly to compile the GWT RPC dependencies so they
are available for integration testing. -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
Expand All @@ -316,7 +342,7 @@
<execution>
<id>make-assembly</id>
<!-- this is used for inheritance merges -->
<phase>package</phase>
<phase>compile</phase>
<!-- bind to the packaging phase -->
<goals>
<goal>single</goal>
Expand Down

0 comments on commit 2c059c2

Please sign in to comment.