Skip to content

Commit

Permalink
DN-34: Updated to map.apps 4.18.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Michel Bröker committed Jun 11, 2024
1 parent faf5a96 commit 08b5b2d
Show file tree
Hide file tree
Showing 13 changed files with 97 additions and 50 deletions.
20 changes: 11 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,19 @@ Simply add the bundle "dn_editingusernameprocessor" to your app.

[dn_editingusernameprocessor Documentation](https://github.com/conterra/mapapps-editing-usernameprocessor/tree/master/src/main/js/bundles/dn_editingusernameprocessor)

## Development Guide
## Quick start

### Define the mapapps remote base
Clone this project and ensure that you have all required dependencies installed correctly (see [Documentation](https://docs.conterra.de/en/mapapps/latest/developersguide/getting-started/set-up-development-environment.html)).

Before you can run the project you have to define the mapapps.remote.base property in the pom.xml-file:
`<mapapps.remote.base>http://%YOURSERVER%/ct-mapapps-webapp-%VERSION%</mapapps.remote.base>`
Then run the following commands from the project root directory to start a local development server:

### Other methods to to define the mapapps.remote.base property.
```bash
# install all required node modules
$ mvn initialize

1. Goal parameters
`mvn install -Dmapapps.remote.base=http://%YOURSERVER%/ct-mapapps-webapp-%VERSION%`
# start dev server
$ mvn compile -Denv=dev -Pinclude-mapapps-deps

2. Build properties Change the mapapps.remote.base in the build.properties file and run:
`mvn install -Denv=dev -Dlocal.configfile=%ABSOLUTEPATHTOPROJECTROOT%/build.properties`
# run unit tests
$ mvn test -P run-js-tests,include-mapapps-deps
```
2 changes: 1 addition & 1 deletion RELEASE.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
✅ Tested for map.apps 4.16.0 / Linie 4
✅ Tested for map.apps 4.18.1 / Linie 4

#### Release Notes
- autogenerated SNAPSHOT-Release
12 changes: 7 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,16 @@
"watch-types": "tsc -w --noEmit"
},
"devDependencies": {
"@conterra/ct-mapapps-typings": "~4.16.0",
"@conterra/ct-mapapps-typings": "~4.18.1",
"@conterra/mapapps-mocha-runner": "1.1.1",
"@types/arcgis-js-api": "4.28.0",
"@conterra/reactivity-core": "^0.4.0",
"@types/chai": "4.3.10",
"@types/license-checker": "^25.0.6",
"@types/mocha": "10.0.4",
"arcgis-js-api": "4.29.10",
"chai": "4.3.10",
"ct-mapapps-browser-sync": "0.0.34",
"ct-mapapps-gulp-js": "0.10.2",
"ct-mapapps-browser-sync": "0.0.39",
"ct-mapapps-gulp-js": "0.10.3",
"eslint-config-ct-prodeng": "1.4.0",
"license-checker": "25.0.1",
"mocha": "10.2.0",
Expand All @@ -28,7 +29,8 @@
"stylelint-config-recommended-less": "2.0.0",
"ts-node": "^10.9.1",
"tsx": "^4.6.0",
"typescript": "5.2.2",
"typescript": "5.4.5",
"vue": "2.7.15",
"vue-template-compiler": "2.7.15"
}
}
72 changes: 60 additions & 12 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
limitations under the License.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>de.conterra.devnet</groupId>
Expand Down Expand Up @@ -90,6 +91,10 @@
<artifactId>ct-jsregistry-maven-plugin</artifactId>
<version>${ct.jsregistry.version}</version>
</plugin>
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8.2</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
Expand Down Expand Up @@ -165,11 +170,6 @@
<artifactId>setproperties-maven-plugin</artifactId>
<version>1.0.2</version>
</plugin>
<plugin>
<groupId>de.conterra.jsrt</groupId>
<artifactId>ct-jsrt-test-maven-plugin</artifactId>
<version>${ct.jsrt-test.version}</version>
</plugin>
</plugins>
</pluginManagement>
<sourceDirectory>src/main/js</sourceDirectory>
Expand All @@ -195,6 +195,29 @@
</testResource>
</testResources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>3.4.1</version>
<executions>
<execution>
<id>enforce-versions</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<requireMavenVersion>
<version>[3.8.0,)</version>
</requireMavenVersion>
<requireJavaVersion>
<version>[17,)</version>
</requireJavaVersion>
</rules>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>de.conterra.maven</groupId>
<artifactId>setproperties-maven-plugin</artifactId>
Expand All @@ -207,9 +230,7 @@
</execution>
</executions>
<configuration>
<!-- add here properties which are used in plugin configuration resolution -->
<properties>
<!-- deployment of map.apps installation -->
<mapapps.remote.base>.</mapapps.remote.base>
</properties>
</configuration>
Expand Down Expand Up @@ -336,6 +357,9 @@
<include>**/gulpfile.js</include>
<include>**/pom.xml</include>
</includes>
<excludes>
<exclude>src/main/js/**/*.min.js</exclude>
</excludes>
<mapping>
<vue>XML_STYLE</vue>
</mapping>
Expand Down Expand Up @@ -405,6 +429,7 @@
<configuration>
<!-- only build zip files -->
<skipDeploy>true</skipDeploy>
<createApp>false</createApp>
<sourceDirectory>${js.build.outputPath}/apps</sourceDirectory>
<outputDirectory>${project.build.directory}</outputDirectory>
</configuration>
Expand All @@ -416,6 +441,24 @@
<goal>deployApps</goal>
</goals>
</execution>
<execution>
<id>build-app-template</id>
<phase>prepare-package</phase>
<goals>
<goal>deployAppTemplate</goal>
</goals>
<configuration>
<templateFile>${project.build.directory}/${project.artifactId}-sample-app.zip</templateFile>
<templateResources>
<templateResource>
<directory>${js.build.outputPath}/apps/sample</directory>
<includes>
<include>**/*</include>
</includes>
</templateResource>
</templateResources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
Expand Down Expand Up @@ -470,12 +513,12 @@
<root.build.outputPath>${project.build.directory}/webapp</root.build.outputPath>
<js.build.outputPath>${root.build.outputPath}/js</js.build.outputPath>

<mapapps.version>4.16.0</mapapps.version>
<vuetify.version>1.5.28</vuetify.version>
<mapapps.version>4.18.1</mapapps.version>
<vuetify.version>1.5.30</vuetify.version>
<!-- JS lib versions -->
<apprt.version>${mapapps.version}</apprt.version>
<!-- java lib versions -->
<ct.jsregistry.version>1.5.14</ct.jsregistry.version>
<ct.jsregistry.version>2.1.1</ct.jsregistry.version>
<ct.jsrt-test.version>2.0.2</ct.jsrt-test.version>

<!-- the default app, replaced in the *.html files to switch app names-->
Expand Down Expand Up @@ -505,7 +548,7 @@
required -->
<mapapps.useChunkedRequestEncoding>true</mapapps.useChunkedRequestEncoding>
<!-- enable this if "upload" profile should only deploy bundles -->
<skip.apps.upload>true</skip.apps.upload>
<skip.apps.upload>false</skip.apps.upload>
<!-- enable this if "upload" profile should pre-optimize apps -->
<triggerPreOptimization>false</triggerPreOptimization>
</properties>
Expand Down Expand Up @@ -553,6 +596,11 @@
<artifactId>apprt-polyfill</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>de.conterra.js</groupId>
<artifactId>reactivity</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
</profile>
<profile>
Expand Down
2 changes: 1 addition & 1 deletion src/main/config/assembly.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@
<outputDirectory>.</outputDirectory>
</fileSet>
</fileSets>
</assembly>
</assembly>
16 changes: 0 additions & 16 deletions src/main/js/apps/sample/app.js

This file was deleted.

6 changes: 2 additions & 4 deletions src/main/js/apps/sample/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,8 @@
"basemaptoggler",
"mapnavigation",
"popups-default",
"dn_editingusernameprocessor"
],
"require": [
"${app}.app"
"dn_editingusernameprocessor",
"console"
],
"i18n": [
"bundle"
Expand Down
1 change: 1 addition & 0 deletions src/main/types/mocha-global.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
declare const testConfig: (opts?: Record<string, any>) => void;
7 changes: 7 additions & 0 deletions src/main/types/thirdparty.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/*
* Copyright (C) con terra GmbH
*/

declare module "dojo/*";
declare module "dijit/*";
declare module "dojox/*";
4 changes: 4 additions & 0 deletions src/main/types/vue-shim.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
declare module "*.vue" {
import Vue from "vue";
export default Vue;
}
2 changes: 1 addition & 1 deletion src/test/webapp/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
proxyUrl: url
});
});
var trustedServers = "@@cors.request.trustedServers@@".split("\s*,\s*")
var trustedServers = "@@cors.request.trustedServers@@".split(/\s*,\s*/)
.filter(function(item){ return item && item.match(/^[^@.].*$/)});
$apprt.changeConfig({
isDebug: true,
Expand Down
1 change: 1 addition & 0 deletions src/test/webapp/js/tests/test-init.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// eslint-disable-next-line no-undef
testConfig({
jsregistry: [{
//root: "url to registry..",
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"compilerOptions": {
"target": "ESNext",
"module": "ESNext",
"moduleResolution": "node",
"moduleResolution": "bundler",
"baseUrl": ".",
"paths": {
"*": ["./src/main/js/bundles/*", "./node_modules/@conterra/ct-mapapps-typings/*"]
Expand Down

0 comments on commit 08b5b2d

Please sign in to comment.