Major
Detail
Major
Detail
Detail
#24788
Missing deployment of top-logic.js and CSS for production mode
Currently there are 2 settings is-deployed in tl:JSFileCompiler and is-deployed in tl:ThemeFactory. These flags control whether files are generated at server startup.
With the setting is-deployed="true" the corresponding files must be generated during the deployment. There is currently no tooling for this.
Improvement
During app deployment, styles and scripts are always generated and packed into the WAR. There is a new configuration fragment production-mode.xml that is included in the metaConf.txt and switches on the is-deployed mode. A newly created application has a deploy-aspect prod by default, which is used to include the production-mode.xml configuration.
An application with settings as local but in production-mode is built as follows:
mvn clean install -DdeployAspects=local,prod -Pwith-h2
Code migration
In an existing application, the deploy-aspect prod must be created manually (if desired):
cp -ar deploy/local deploy/prod echo "production-mode.xml" > deploy/prod/WEB-INF/conf/metaConf.txt
Test
- Create a new application.
- Build with deploy aspects "local" and "prod".
- Deploy to web container.
- Login possible, ThemeFactory and JSFileCompiler run in "deployed" mode.
mvn -P tl archetype:generate -DarchetypeGroupId=com.top-logic -DarchetypeArtifactId=tl-archetype-app -DarchetypeVersion=7.5.0-SNAPSHOT cd my-app/ mvn clean install -DdeployAspects=local,prod -Pwith-h2 sudo cp target/my-app-1.0-SNAPSHOT-app.war /var/lib/tomcat9/webapps/