Commit 62bf66f7 authored by naji's avatar naji
Browse files

standalone exe + add standalone required file at pastis-standalone

parent b0da561f
<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
<id>package</id>
<formats>
<format>zip</format>
</formats>
<includeBaseDirectory>false</includeBaseDirectory>
<fileSets>
<fileSet>
<directory>${project.build.directory}/</directory>
<outputDirectory>/</outputDirectory>
<includes>
<include>*.exe</include>
<include>win32/**</include>
</includes>
</fileSet>
<fileSet>
<directory>${project.basedir}/src/main/resources/standalone/</directory>
<outputDirectory>/</outputDirectory>
<includes>
<include>PASTIS-APP.*</include>
<include>readme.txt</include>
</includes>
</fileSet>
</fileSets>
</assembly>
......@@ -16,6 +16,16 @@
<maven.compile.target>11</maven.compile.target>
<maven.compile.source>11</maven.compile.source>
<java.version>11</java.version>
<angular.base.href>/</angular.base.href>
<angular.build.project>pastis</angular.build.project>
<rpm.skip>false</rpm.skip>
<sonar.sources>src/main/java</sonar.sources>
<swagger.dir>ui</swagger.dir>
<swagger.skip>false</swagger.skip>
<webpack.skip>false</webpack.skip>
<webpack.test.skip>false</webpack.test.skip>
<skipAllFrontend>false</skipAllFrontend>
<skipAllFrontendTests>false</skipAllFrontendTests>
</properties>
......@@ -95,12 +105,17 @@
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.skyscreamer</groupId>
<artifactId>jsonassert</artifactId>
<version>${jsonassert.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.skyscreamer</groupId>
<artifactId>jsonassert</artifactId>
<version>${jsonassert.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-impl</artifactId>
<version>2.3.1</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
......@@ -165,4 +180,132 @@
</plugins>
</build>
<profiles>
<profile>
<id>standalone</id>
<dependencies>
<dependency>
<groupId>fr.gouv.vitamui</groupId>
<artifactId>ui-frontend</artifactId>
<scope>provided</scope>
<type>pom</type>
<version>${project.version}</version>
</dependency>
</dependencies>
<build>
<resources>
<resource>
<directory>target/www/</directory>
<targetPath>static/</targetPath>
</resource>
<resource>
<directory>src/main/resources</directory>
</resource>
</resources>
<testResources>
<testResource>
<directory>src/test/resources</directory>
<filtering>true</filtering>
</testResource>
</testResources>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<executions>
<execution>
<id>build-info</id>
<goals>
<goal>build-info</goal>
</goals>
</execution>
<execution>
<id>spring-boot-repackage</id>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
<configuration>
<executable>true</executable>
<attach>true</attach> <!-- Need to use the original jar for integration-tests -->
<mainClass>fr.gouv.vitamui.pastis.standalone.ApiPastisStandaloneApplication</mainClass>
<jvmArguments>-Xmx512m</jvmArguments>
<arguments>
<argument>--spring.profiles.active=dev</argument>
</arguments>
</configuration>
</plugin>
<plugin>
<groupId>com.github.eirslett</groupId>
<artifactId>frontend-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>com.akathist.maven.plugins.launch4j</groupId>
<artifactId>launch4j-maven-plugin</artifactId>
<version>1.7.21</version>
<executions>
<execution>
<id>build-pastis-standalone-executable-windows</id>
<phase>package</phase>
<goals>
<goal>launch4j</goal>
</goals>
<configuration>
<headerType>console</headerType>
<jar>${project.build.directory}/${project.build.finalName}.${project.packaging}</jar>
<outfile>${project.build.directory}/${project.build.finalName}.exe</outfile>
<jre>
<path>./win32/java</path>
<bundledJre64Bit>true</bundledJre64Bit>
<runtimeBits>64</runtimeBits>
</jre>
</configuration>
</execution>
</executions>
</plugin>
<!-- maven plugin resources-->
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<executions>
<execution>
<id>copy-resources-jre</id>
<!-- here the phase you need -->
<phase>package</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${basedir}/target/win32/java</outputDirectory>
<resources>
<resource>
<directory>${java.home}</directory>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<id>assembly</id>
<phase>package</phase>
<goals><goal>single</goal></goals>
<configuration>
<descriptors>
<descriptor>assembly.xml</descriptor>
</descriptors>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"newProjectRoot": "projects",
"projects": {
"vitamui-library": {
"projectType": "library",
"schematics": {
"@schematics/angular:component": {
"prefix": "vitamui",
"styleext": "scss"
},
"@schematics/angular:directive": {
"prefix": "vitamui"
}
},
"root": "projects/vitamui-library",
"sourceRoot": "projects/vitamui-library/src",
"prefix": "vitamui",
"architect": {
"build": {
"builder": "@angular-devkit/build-ng-packagr:build",
"options": {
"tsConfig": "projects/vitamui-library/tsconfig.lib.json",
"project": "projects/vitamui-library/ng-package.json"
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "projects/vitamui-library/src/test.ts",
"tsConfig": "projects/vitamui-library/tsconfig.spec.json",
"karmaConfig": "projects/vitamui-library/karma.conf.js"
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"projects/vitamui-library/tsconfig.lib.json",
"projects/vitamui-library/tsconfig.spec.json"
],
"exclude": [
"**/node_modules/**"
]
}
}
}
},
"pastis": {
"root": "projects/pastis/",
"sourceRoot": "projects/pastis/src",
"projectType": "application",
"architect": {
"build": {
"builder": "@angular-builders/custom-webpack:browser",
"options": {
"customWebpackConfig": {
"path": "./extra-webpack.config.js"
},
"outputPath": "../ui-pastis/src/main/resources/public",
"index": "projects/pastis/src/index.html",
"main": "projects/pastis/src/main.ts",
"polyfills": "projects/pastis/src/polyfills.ts",
"tsConfig": "projects/pastis/tsconfig.app.json",
"rebaseRootRelativeCssUrls": true,
"assets": [
"projects/pastis/src/assets",
"projects/pastis/src/favicon.ico",
{
"glob": "**/*",
"input": "node_modules/ui-frontend-common/assets",
"output": "/assets"
}
],
"styles": [
"projects/pastis/src/sass/styles.scss",
"projects/pastis/src/assets/css/_colors.scss"
],
"stylePreprocessorOptions": {
"includePaths": [
"projects/commons/src/sass"
]
},
"scripts": []
},
"configurations": {
"standalone": {
"fileReplacements": [
{
"replace": "projects/pastis/src/environments/environment.ts",
"with": "projects/pastis/src/environments/environment.standalone.ts"
}
],
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"extractCss": true,
"namedChunks": false,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
"budgets": [
{
"type": "initial",
"maximumWarning": "2mb",
"maximumError": "17mb"
}
]
}
}
},
"serve": {
"builder": "@angular-builders/custom-webpack:dev-server",
"options": {
"browserTarget": "pastis:build",
"host": "dev.vitamui.com",
"port": 4251
},
"configurations": {
"production": {
"browserTarget": "pastis:build:production"
}
}
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "pastis:build"
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "projects/pastis/src/test.ts",
"polyfills": "projects/pastis/src/polyfills.ts",
"tsConfig": "projects/pastis/tsconfig.spec.json",
"karmaConfig": "projects/pastis/karma.conf.js",
"assets": [
"projects/pastis/src/favicon.ico",
"projects/pastis/src/assets"
],
"styles": [
"projects/pastis/src/styles.scss"
],
"scripts": []
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"projects/pastis/tsconfig.app.json",
"projects/pastis/tsconfig.spec.json",
"projects/pastis/e2e/tsconfig.json"
],
"exclude": [
"**/node_modules/**"
]
}
},
"e2e": {
"builder": "@angular-devkit/build-angular:protractor",
"options": {
"protractorConfig": "projects/pastis/e2e/protractor.conf.js",
"devServerTarget": "pastis:serve"
},
"configurations": {
"production": {
"devServerTarget": "pastis:serve:production"
}
}
}
}
}
},
"defaultProject": "pastis",
"cli": {
"analytics": false
}
}
/*
* Copyright French Prime minister Office/SGMAP/DINSIC/Vitam Program (2019-2020)
* and the signatories of the "VITAM - Accord du Contributeur" agreement.
*
* contact@programmevitam.fr
*
* This software is a computer program whose purpose is to implement
* implement a digital archiving front-office system for the secure and
* efficient high volumetry VITAM solution.
*
* This software is governed by the CeCILL-C license under French law and
* abiding by the rules of distribution of free software. You can use,
* modify and/ or redistribute the software under the terms of the CeCILL-C
* license as circulated by CEA, CNRS and INRIA at the following URL
* "http://www.cecill.info".
*
* As a counterpart to the access to the source code and rights to copy,
* modify and redistribute granted by the license, users are provided only
* with a limited warranty and the software's author, the holder of the
* economic rights, and the successive licensors have only limited
* liability.
*
* In this respect, the user's attention is drawn to the risks associated
* with loading, using, modifying and/or developing or reproducing the
* software by the user in light of its specific status of free software,
* that may mean that it is complicated to manipulate, and that also
* therefore means that it is reserved for developers and experienced
* professionals having in-depth computer knowledge. Users are therefore
* encouraged to load and test the software's suitability as regards their
* requirements in conditions enabling the security of their systems and/or
* data to be ensured and, more generally, to use and operate it in the
* same conditions as regards security.
*
* The fact that you are presently reading this means that you have had
* knowledge of the CeCILL-C license and that you accept its terms.
*/
export interface AppConfiguration {
THEME_COLORS: any;
}
{
"name": "vitamui-ui",
"version": "5.4.0-SNAPSHOT",
"license": "MIT",
"pki": {
"path": "../../dev-deployment/environments/certs/server/hosts/localhost",
"asset": "reverse"
},
"scripts": {
"ng": "ng",
"ng-high-memory": "node --max_old_space_size=4000 ./node_modules/@angular/cli/bin/ng",
"start": "ng serve --proxy-config proxy.conf.json --disable-host-check --ssl --ssl-key $npm_package_pki_path/$npm_package_pki_asset.key --ssl-cert $npm_package_pki_path/$npm_package_pki_asset.crt",
"start:en": "ng serve --proxy-config proxy.conf.json --configuration=en --disable-host-check --ssl --ssl-key $npm_package_pki_path/$npm_package_pki_asset.key --ssl-cert $npm_package_pki_path/$npm_package_pki_asset.crt",
"start:demo": "ng serve demo --proxy-config proxy.conf.json --disable-host-check --ssl --ssl-key $npm_package_pki_path/$npm_package_pki_asset.key --ssl-cert $npm_package_pki_path/$npm_package_pki_asset.crt",
"start:portal": "ng serve portal --proxy-config proxy.conf.json --disable-host-check --ssl --ssl-key $npm_package_pki_path/$npm_package_pki_asset.key --ssl-cert $npm_package_pki_path/$npm_package_pki_asset.crt",
"start:starter-kit": "ng serve --proxy-config proxy.conf.json starter-kit --disable-host-check --ssl --ssl-key $npm_package_pki_path/$npm_package_pki_asset.key --ssl-cert $npm_package_pki_path/$npm_package_pki_asset.crt",
"start:starter-kit-mocked-server": "ng serve --port 5000 --proxy-config proxy-mock.conf.json starter-kit",
"json-server": "json-server --watch projects/starter-kit/mock-api/_db.js --config projects/starter-kit/mock-api/config.json --routes projects/starter-kit/mock-api/routes.json ",
"mock-starter-kit": "concurrently 'npm run json-server' 'npm run start:starter-kit-mocked-server'",
"start:identity": "ng serve identity --proxy-config proxy.conf.json --disable-host-check --ssl --ssl-key $npm_package_pki_path/$npm_package_pki_asset.key --ssl-cert $npm_package_pki_path/$npm_package_pki_asset.crt",
"start:pastis": "ng serve pastis --proxy-config proxy.conf.json --disable-host-check --ssl --ssl-key $npm_package_pki_path/$npm_package_pki_asset.key --ssl-cert $npm_package_pki_path/$npm_package_pki_asset.crt",
"start:referential": "ng serve referential --proxy-config proxy.conf.json --disable-host-check --ssl --ssl-key $npm_package_pki_path/$npm_package_pki_asset.key --ssl-cert $npm_package_pki_path/$npm_package_pki_asset.crt",
"start:ingest": "ng serve ingest --proxy-config proxy.conf.json --disable-host-check --ssl --ssl-key $npm_package_pki_path/$npm_package_pki_asset.key --ssl-cert $npm_package_pki_path/$npm_package_pki_asset.crt",
"start:archive-search": "ng serve archive-search --proxy-config proxy.conf.json --disable-host-check --ssl --ssl-key $npm_package_pki_path/$npm_package_pki_asset.key --ssl-cert $npm_package_pki_path/$npm_package_pki_asset.crt",
"build": "ng build --configuration=standalone --i18n-locale fr --build-optimizer=false --optimization=false",
"postinstall": "ngcc",
"build:prod": "export NODE_OPTIONS=--max_old_space_size=4096; ng build --prod --output-path ../../../target/www",
"build:dev": "ng build --prod --i18n-locale fr --build-optimizer=false --optimization=false",
"build:fr": "ng build --prod --i18n-locale fr --output-path ../../../target/www/fr",
"build:en": "ng build --prod --i18n-file src/locale/messages.en.xlf --i18n-format xlf --i18n-locale en --output-path ../../../target/www/en",
"build:all": "npm run build:fr && npm run build:en",
"build:demo": "ng build demo --prod --i18n-locale fr",
"build:portal": "export NODE_OPTIONS=--max_old_space_size=4096; ng build portal --prod",
"build:identity": "export NODE_OPTIONS=--max_old_space_size=4096; ng build identity --prod --output-path ../../../target/www/fr",
"build:ingest": "export NODE_OPTIONS=--max_old_space_size=4096; ng build ingest --prod --i18n-locale fr",
"build:archive-search": "export NODE_OPTIONS=--max_old_space_size=4096; ng build archive-search --prod --i18n-locale fr",
"build:referential": "export NODE_OPTIONS=--max_old_space_size=4096; ng build referential --prod --i18n-locale fr",
"build:pastis": "export NODE_OPTIONS=--max_old_space_size=4096; ng build pastis --prod --i18n-locale fr",
"analyze-portal": "ng build portal --stats-json --prod ; webpack-bundle-analyzer dist/portal/stats-es2015.json",
"analyze-identity": "ng build identity --stats-json --prod --i18n-locale fr ; webpack-bundle-analyzer dist/identity/stats-es2015.json",
"analyze-referential": "ng build referential --stats-json --prod --i18n-locale fr ; webpack-bundle-analyzer dist/referential/stats-es2015.json",
"analyze-ingest": "ng build ingest --stats-json --prod --i18n-locale fr ; webpack-bundle-analyzer dist/ingest/stats-es2015.json",
"analyze-archive-search": "ng build archive-search --stats-json --prod --i18n-locale fr ; webpack-bundle-analyzer dist/archive-search/stats-es2015.json",
"test": "ng test --watch=false",
"test:demo": "ng test demo --watch=false",
"test:portal": "ng test portal --watch=false",
"test:identity": "ng test identity --watch=false",
"test:ingest": "ng test ingest --watch=false",
"test:referential": "ng test referential --watch=false",
"test:archive-search": "ng test archive-search --watch=false",
"test:vitamui-library": "ng test vitamui-library --watch=false",
"test:conf-ci": "ng test --watch=false --karma-config=karma.conf.ci.js",
"test:sonar": "ng test --code-coverage --watch=false",
"lint": "ng lint --format=stylish",
"lint:demo": "ng lint demo --format=stylish",
"lint:identity": "ng lint identity --format=stylish",
"lint:ingest": "ng lint ingest --format=stylish",
"lint:portal": "ng lint portal --format=stylish",
"lint:archive-search": "ng lint archive-search --format=stylish",
"lint:referential": "ng lint referential --format=stylish",
"lint:vitamui-library": "ng lint vitamui-library --format=stylish",
"e2e": "ng e2e",
"i18n-extract": "ng xi18n --outputPath=locale --i18n-locale=fr",
"i18n-merge": "xliffmerge --profile xliffmerge.json fr en",
"i18n:identity": "ng xi18n identity --outputPath=src/locale --i18n-locale=fr && xliffmerge --profile projects/identity/xliffmerge.json fr en",
"i18n:ingest": "ng xi18n ingest --outputPath=src/locale --i18n-locale=fr && xliffmerge --profile projects/ingest/xliffmerge.json fr en",
"i18n:archive-search": "ng xi18n archive-search --outputPath=src/locale --i18n-locale=fr && xliffmerge --profile projects/archive-search/xliffmerge.json fr en",
"i18n:referential": "ng xi18n referential --outputPath=src/locale --i18n-locale=fr && xliffmerge --profile projects/referential/xliffmerge.json fr en",
"check:demo": "npm run lint:demo && npm run build:demo",
"check:portal": "npm run lint:portal && npm run test:portal && npm run build:portal",
"check:identity": "npm run lint:identity && npm run test:identity && npm run build:identity",
"extract-translations": "ngx-translate-extract --input ./projects/portal/src --output ./projects/portal/src/assets/i18n/*.json --sort --format namespaced-json --key-as-default-value",
"check:referential": "npm run lint:referential && npm run test:referential && npm run build:referential",
"check:archive-search": "npm run lint:archive-search && npm run test:archive-search && npm run build:archive-search",
"copy-scss:vitamui-library": "cp-cli ./projects/vitamui-library/src/sass ./dist/sass",
"build:vitamui-library": "ng build vitamui-library",
"watch:vitamui-library": "ng build vitamui-library --watch"
},
"private": true,
"dependencies": {
"@angular/animations": "10.1.3",
"@angular/cdk": "^10.1.3",
"@angular/common": "10.1.3",
"@angular/compiler": "10.1.3",
"@angular/core": "10.1.3",
"@angular/forms": "10.1.3",
"@angular/localize": "^10.1.6",
"@angular/material": "^10.1.3",
"@angular/platform-browser": "10.1.3",
"@angular/platform-browser-dynamic": "10.1.3",
"@angular/pwa": "^0.803.29",
"@angular/router": "10.1.3",
"@angular/service-worker": "10.1.3",
"@babel/compat-data": "^7.8.0",
"@ngx-translate/core": "^12.1.2",
"@ngx-translate/http-loader": "^6.0.0",
"@types/d3": "^3.5.43",
"@types/uuid": "^7.0.0",
"angular-svg-icon": "^11.2.0",
"autoprefixer": "^9.7.5",
"bootstrap": "^4.5.0",
"bufferutil": "^4.0.1",
"classlist.js": "^1.1.20150312",
"core-js": "^2.6.11",
"d3": "^3.5.17",
"d3-svg-legend": "^1.13.0",
"flag-icon-css": "^3.5.0",
"generate-schema": "^2.6.0",
"hammerjs": "^2.0.8",
"jquery": "^3.5.1",
"lodash": "^4.17.15",
"material-design-icons": "^3.0.1",
"ng2-date-picker": "^8.0.0",
"ng2-file-upload": "^1.4.0",
"ng2-nvd3": "^2.0.0",
"ngx-color-picker": "^9.0.0",
"ngx-filesize": "^2.0.2",
"ngx-quicklink": "^0.2.1",
"ngx-toastr": "^11.3.3",
"ngx-translate-multi-http-loader": "^3.0.0",
"ngx-ui-loader": "^10.0.0",
"popper.js": "^1.16.1",
"remove": "^0.1.5",
"rxjs": "^6.5.5",
"serialize-javascript": "^5.0.1",
"tslib": "^2.0.3",
"ui-frontend-common": "file:../ui-frontend-common/ui-frontend-common-2.1.30.tgz",
"underscore": "^1.13.1",
"utf-8-validate": "^5.0.2",
"uuid": "^7.0.2",
"web-animations-js": "^2.3.2",
"zone.js": "~0.10.3"
},
"devDependencies": {
"@angular-builders/custom-webpack": "^8.4.1",
"@angular-devkit/build-angular": "^0.1001.3",
"@angular-devkit/build-ng-packagr": "^0.1001.3",
"@angular/cli": "^10.1.3",
"@angular/compiler-cli": "10.1.3",
"@angular/language-service": "10.1.3",
"@angular/localize": "^10.2.3",
"@biesbjerg/ngx-translate-extract": "^7.0.2",
"@types/jasmine": "~3.3.0",
"@types/jasminewd2": "^2.0.8",
"@types/lodash": "^4.14.156",
"@types/node": "~8.9.1",
"@types/underscore": "^1.11.2",
"codelyzer": "^5.2.2",
"concurrently": "^5.3.0",
"cp-cli": "^2.0.0",
"jasmine-core": "^3.7.0",
"jasmine-marbles": "^0.4.1",