ISIS-1521: recreates simpleapp archetype
Project: http://git-wip-us.apache.org/repos/asf/isis/repo Commit: http://git-wip-us.apache.org/repos/asf/isis/commit/f349adea Tree: http://git-wip-us.apache.org/repos/asf/isis/tree/f349adea Diff: http://git-wip-us.apache.org/repos/asf/isis/diff/f349adea Branch: refs/heads/release-1.15.0-RC1 Commit: f349adea5fe69def4790a219aad0e3b3561627ff Parents: 02067e2 Author: Dan Haywood <[email protected]> Authored: Sun Aug 6 08:46:46 2017 +0100 Committer: Dan Haywood <[email protected]> Committed: Sun Aug 6 08:46:46 2017 +0100 ---------------------------------------------------------------------- example/archetype/simpleapp/pom.xml | 59 -- .../appended-resources/supplemental-models.xml | 26 - .../META-INF/maven/archetype-metadata.xml | 209 ------ .../archetype-resources/.gitattributes | 51 -- .../resources/archetype-resources/.gitignore | 41 -- .../resources/archetype-resources/README.adoc | 245 ------- .../archetype-resources/_checks/checkstyle.xml | 290 -------- .../archetype-resources/_checks/pmd.xml | 49 -- .../application/lib/.gitignore | 5 - .../application/logging-integtest.properties | 114 ---- .../archetype-resources/application/pom.xml | 128 ---- ...ainAppApplicationModuleFixtureSubmodule.java | 26 - ...nAppFixtureScriptsSpecificationProvider.java | 49 -- .../fixture/scenarios/DomainAppDemo.java | 51 -- .../fixture/teardown/DomainAppTearDown.java | 35 - .../manifest/DomainAppAppManifest.java | 154 ----- .../DomainAppAppManifestBypassSecurity.java | 32 - .../DomainAppAppManifestWithFixtures.java | 43 -- ...ppAppManifestWithFixturesBypassSecurity.java | 32 - ...inAppApplicationModuleServicesSubmodule.java | 26 - .../services/dbmanager/HsqlDbManagerMenu.java | 77 --- .../services/homepage/HomePageService.java | 46 -- .../services/homepage/HomePageViewModel.java | 49 -- .../homepage/HomePageViewModel.layout.xml | 52 -- .../services/homepage/HomePageViewModel.png | Bin 456 -> 0 bytes .../application/manifest/isis.properties | 398 ----------- .../bdd/specglue/BootstrappingGlue.java | 42 -- .../bdd/specglue/CatalogOfFixturesGlue.java | 34 - .../application/bdd/specs/RunIntegBddSpecs.java | 45 -- .../SimpleObjectSpec_listAllAndCreate.feature | 26 - .../integtests/DomainAppIntegTestAbstract.java | 64 -- .../application/integtests/Smoke_IntegTest.java | 113 ---- .../module-simple/.gitignore | 5 - .../module-simple/build.gradle | 72 -- .../archetype-resources/module-simple/gradlew | 164 ----- .../module-simple/gradlew.bat | 90 --- .../module-simple/layouts.gradle | 49 -- .../module-simple/liveReload.gradle | 56 -- .../module-simple/logging-dn-enhance.properties | 44 -- .../module-simple/logging-integtest.properties | 114 ---- .../archetype-resources/module-simple/pom.xml | 138 ---- .../src/main/java/META-INF/persistence.xml | 29 - .../modules/simple/SimpleModuleManifest.java | 76 --- .../simple/dom/SimpleModuleDomSubmodule.java | 33 - .../modules/simple/dom/impl/SimpleObject.java | 133 ---- .../simple/dom/impl/SimpleObject.layout.xml | 69 -- .../modules/simple/dom/impl/SimpleObject.png | Bin 653 -> 0 bytes .../simple/dom/impl/SimpleObjectMenu.java | 80 --- .../simple/dom/impl/SimpleObjectRepository.java | 61 -- .../fixture/SimpleModuleFixtureSubmodule.java | 26 - .../fixture/scenario/CreateSimpleObjects.java | 80 --- .../fixture/scenario/SimpleObjectData.java | 52 -- .../fixture/teardown/SimpleModuleTearDown.java | 39 -- .../dom/impl/SimpleObjectRepository_Test.java | 128 ---- .../simple/dom/impl/SimpleObject_Test.java | 52 -- .../SimpleModuleIntegTestAbstract.java | 86 --- .../tests/SimpleObjectMenu_IntegTest.java | 150 ----- .../tests/SimpleObject_IntegTest.java | 162 ----- .../simple/specglue/SimpleObjectMenuGlue.java | 56 -- .../archetype-resources/pom-jdo-enhance-all.xml | 92 --- .../main/resources/archetype-resources/pom.xml | 390 ----------- .../archetype-resources/webapp/lib/.gitignore | 5 - .../archetype-resources/webapp/pom.xml | 248 ------- .../domainapp/webapp/DomainApplication.java | 105 --- .../webapp/DomainApplication.properties | 31 - .../src/main/java/domainapp/webapp/welcome.html | 43 -- .../src/main/jettyconsole/isis-banner.pdn | Bin 64162 -> 0 bytes .../src/main/jettyconsole/isis-banner.png | Bin 27310 -> 0 bytes .../WEB-INF/authentication_shiro.properties | 28 - .../src/main/webapp/WEB-INF/isis.properties | 39 -- .../src/main/webapp/WEB-INF/logging.properties | 225 ------- .../main/webapp/WEB-INF/persistor.properties | 116 ---- .../webapp/src/main/webapp/WEB-INF/shiro.ini | 93 --- .../src/main/webapp/WEB-INF/translations-en.po | 674 ------------------- .../src/main/webapp/WEB-INF/translations-es.po | 673 ------------------ .../src/main/webapp/WEB-INF/translations-nl.po | 674 ------------------- .../src/main/webapp/WEB-INF/translations.po | 673 ------------------ .../WEB-INF/viewer_restfulobjects.properties | 69 -- .../webapp/WEB-INF/viewer_wicket.properties | 140 ---- .../webapp/src/main/webapp/WEB-INF/web.xml | 357 ---------- .../src/main/webapp/about/images/isis-logo.png | Bin 14160 -> 0 bytes .../webapp/src/main/webapp/about/index.html | 120 ---- .../webapp/src/main/webapp/css/application.css | 19 - .../src/main/webapp/images/spinning-icon.gif | Bin 5266 -> 0 bytes .../src/main/webapp/scripts/application.js | 3 - .../src/main/webapp/swagger-ui/index.html | 164 ----- .../projects/basic/archetype.properties | 5 - .../src/test/resources/projects/basic/goal.txt | 0 88 files changed, 9641 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/isis/blob/f349adea/example/archetype/simpleapp/pom.xml ---------------------------------------------------------------------- diff --git a/example/archetype/simpleapp/pom.xml b/example/archetype/simpleapp/pom.xml deleted file mode 100644 index 51bd4a9..0000000 --- a/example/archetype/simpleapp/pom.xml +++ /dev/null @@ -1,59 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. ---> -<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/xsd/maven-4.0.0.xsd"> - <modelVersion>4.0.0</modelVersion> - <groupId>org.apache.isis.archetype</groupId> - <artifactId>simpleapp-archetype</artifactId> - <version>1.15.0-SNAPSHOT</version> - <packaging>maven-archetype</packaging> - <name>simpleapp-archetype</name> - <build> - <extensions> - <extension> - <groupId>org.apache.maven.archetype</groupId> - <artifactId>archetype-packaging</artifactId> - <version>2.2</version> - </extension> - </extensions> - <pluginManagement> - <plugins> - <plugin> - <artifactId>maven-archetype-plugin</artifactId> - <version>2.2</version> - </plugin> - </plugins> - </pluginManagement> - </build> - <scm> - <connection>scm:git:[email protected]:danhaywood/java-mavenmixin-standard.git</connection> - <developerConnection>scm:git:[email protected]:danhaywood/java-mavenmixin-standard.git</developerConnection> - <url>[email protected]:danhaywood/java-mavenmixin-standard.git</url> - <tag>HEAD</tag> - </scm> - <parent> - <groupId>org.apache.isis.core</groupId> - <artifactId>isis</artifactId> - <version>1.15.0-SNAPSHOT</version> - <relativePath>../../../core/pom.xml</relativePath> - </parent> - <properties> - <archetype.test.skip>true</archetype.test.skip> - </properties> -</project> http://git-wip-us.apache.org/repos/asf/isis/blob/f349adea/example/archetype/simpleapp/src/main/appended-resources/supplemental-models.xml ---------------------------------------------------------------------- diff --git a/example/archetype/simpleapp/src/main/appended-resources/supplemental-models.xml b/example/archetype/simpleapp/src/main/appended-resources/supplemental-models.xml deleted file mode 100644 index 01c58d8..0000000 --- a/example/archetype/simpleapp/src/main/appended-resources/supplemental-models.xml +++ /dev/null @@ -1,26 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. ---> -<supplementalDataModels - xmlns="http://maven.apache.org/supplemental-model/1.0.0" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/supplemental-model/1.0.0 - http://maven.apache.org/xsd/supplemental-model-1.0.0.xsd"> - -</supplementalDataModels> http://git-wip-us.apache.org/repos/asf/isis/blob/f349adea/example/archetype/simpleapp/src/main/resources/META-INF/maven/archetype-metadata.xml ---------------------------------------------------------------------- diff --git a/example/archetype/simpleapp/src/main/resources/META-INF/maven/archetype-metadata.xml b/example/archetype/simpleapp/src/main/resources/META-INF/maven/archetype-metadata.xml deleted file mode 100644 index 5d02ab8..0000000 --- a/example/archetype/simpleapp/src/main/resources/META-INF/maven/archetype-metadata.xml +++ /dev/null @@ -1,209 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. ---> -<archetype-descriptor xmlns="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.0.0" name="simpleapp" xsi:schemaLocation="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.0.0 http://maven.apache.org/xsd/archetype-descriptor-1.0.0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <fileSets> - <fileSet filtered="true" encoding="UTF-8"> - <directory>_checks</directory> - <includes> - <include>**/*.xml</include> - </includes> - </fileSet> - <fileSet filtered="true" encoding="UTF-8"> - <directory>modules/module-simple</directory> - <includes> - <include>**/*.txt</include> - <include>**/*.java</include> - <include>**/*.xml</include> - <include>**/*.properties</include> - </includes> - </fileSet> - <fileSet encoding="UTF-8"> - <directory>modules/module-simple</directory> - <includes> - <include>**/*.pot</include> - <include>**/*.png</include> - <include>**/*.jar</include> - <include>**/*.lst</include> - <include>**/*.class</include> - </includes> - </fileSet> - <fileSet filtered="true" encoding="UTF-8"> - <directory/> - <includes> - <include>pom-jdo-enhance-all.xml</include> - </includes> - </fileSet> - <fileSet encoding="UTF-8"> - <directory/> - <includes> - <include>.gitattributes</include> - <include>.gitignore</include> - <include>README.adoc</include> - </includes> - </fileSet> - </fileSets> - <modules> - <module name="${rootArtifactId}-module-simple" id="${rootArtifactId}-module-simple" dir="module-simple"> - <fileSets> - <fileSet filtered="true" encoding="UTF-8"> - <directory>src/main/java</directory> - <includes> - <include>**/*.java</include> - <include>**/*.xml</include> - </includes> - </fileSet> - <fileSet encoding="UTF-8"> - <directory>src/main/java</directory> - <includes> - <include>**/*.png</include> - </includes> - </fileSet> - <fileSet filtered="true" encoding="UTF-8"> - <directory>src/test/java</directory> - <includes> - <include>**/*.java</include> - </includes> - </fileSet> - <fileSet filtered="true" encoding="UTF-8"> - <directory/> - <includes> - <include>logging-dn-enhance.properties</include> - <include>logging-integtest.properties</include> - </includes> - </fileSet> - <fileSet encoding="UTF-8"> - <directory/> - <includes> - <include>.gitignore</include> - <include>build.gradle</include> - <include>gradlew</include> - <include>gradlew.bat</include> - <include>layouts.gradle</include> - <include>liveReload.gradle</include> - <include>translations.pot</include> - </includes> - </fileSet> - </fileSets> - </module> - <module name="${rootArtifactId}-application" id="${rootArtifactId}-application" dir="application"> - <fileSets> - <fileSet filtered="true" encoding="UTF-8"> - <directory>src/main/java</directory> - <includes> - <include>**/*.java</include> - <include>**/*.xml</include> - </includes> - </fileSet> - <fileSet encoding="UTF-8"> - <directory>src/main/java</directory> - <includes> - <include>**/*.png</include> - </includes> - </fileSet> - <fileSet filtered="true" encoding="UTF-8"> - <directory>src/main/resources</directory> - <includes> - <include>**/*.properties</include> - </includes> - </fileSet> - <fileSet filtered="true" encoding="UTF-8"> - <directory>src/test/java</directory> - <includes> - <include>**/*.java</include> - </includes> - </fileSet> - <fileSet encoding="UTF-8"> - <directory>src/test/java</directory> - <includes> - <include>**/*.feature</include> - </includes> - </fileSet> - <fileSet encoding="UTF-8"> - <directory>lib</directory> - <includes> - <include>**/*.gitignore</include> - </includes> - </fileSet> - <fileSet filtered="true" encoding="UTF-8"> - <directory/> - <includes> - <include>logging-integtest.properties</include> - </includes> - </fileSet> - <fileSet encoding="UTF-8"> - <directory/> - <includes> - <include>translations.pot</include> - </includes> - </fileSet> - </fileSets> - </module> - <module name="${rootArtifactId}-webapp" id="${rootArtifactId}-webapp" dir="webapp"> - <fileSets> - <fileSet filtered="true" encoding="UTF-8"> - <directory>src/main/java</directory> - <includes> - <include>**/*.java</include> - <include>**/*.html</include> - <include>**/*.properties</include> - </includes> - </fileSet> - <fileSet filtered="true" encoding="UTF-8"> - <directory>src/main/webapp</directory> - <includes> - <include>**/*.xml</include> - <include>**/*.html</include> - <include>**/*.properties</include> - </includes> - </fileSet> - <fileSet encoding="UTF-8"> - <directory>src/main/resources</directory> - <includes> - <include>**/*.</include> - </includes> - </fileSet> - <fileSet encoding="UTF-8"> - <directory>src/main/jettyconsole</directory> - <includes> - <include>**/*.png</include> - <include>**/*.pdn</include> - </includes> - </fileSet> - <fileSet encoding="UTF-8"> - <directory>src/main/webapp</directory> - <includes> - <include>**/*.css</include> - <include>**/*.gif</include> - <include>**/*.ini</include> - <include>**/*.png</include> - <include>**/*.js</include> - <include>**/*.po</include> - </includes> - </fileSet> - <fileSet encoding="UTF-8"> - <directory>lib</directory> - <includes> - <include>**/*.gitignore</include> - </includes> - </fileSet> - </fileSets> - </module> - </modules> -</archetype-descriptor> http://git-wip-us.apache.org/repos/asf/isis/blob/f349adea/example/archetype/simpleapp/src/main/resources/archetype-resources/.gitattributes ---------------------------------------------------------------------- diff --git a/example/archetype/simpleapp/src/main/resources/archetype-resources/.gitattributes b/example/archetype/simpleapp/src/main/resources/archetype-resources/.gitattributes deleted file mode 100644 index b1eafb6..0000000 --- a/example/archetype/simpleapp/src/main/resources/archetype-resources/.gitattributes +++ /dev/null @@ -1,51 +0,0 @@ -# -# -# text files are normalized (convert crlf => lf) -# binary files are not normalized (binary is a macro for -text -diff) -# -# - - -# Unless otherwise stated, assume text - -* text=auto - - -*.java text diff=java -*.html text diff=html -*.xhtml text diff=html -*.xml text -*.txt text - - -*.jar binary -*.so binary -*.dll binary - -# images -*.jpg binary -*.jpeg binary -*.png binary -*.pdn binary -*.pdn binary - - -*.cs text diff=csharp - -*.sln merge=union -*.csproj merge=union -*.vbproj merge=union -*.fsproj merge=union -*.dbproj merge=union - -*.doc diff=astextplain -*.DOC diff=astextplain -*.docx diff=astextplain -*.DOCX diff=astextplain -*.dot diff=astextplain -*.DOT diff=astextplain -*.pdf diff=astextplain -*.PDF diff=astextplain -*.rtf diff=astextplain -*.RTF diff=astextplain - http://git-wip-us.apache.org/repos/asf/isis/blob/f349adea/example/archetype/simpleapp/src/main/resources/archetype-resources/.gitignore ---------------------------------------------------------------------- diff --git a/example/archetype/simpleapp/src/main/resources/archetype-resources/.gitignore b/example/archetype/simpleapp/src/main/resources/archetype-resources/.gitignore deleted file mode 100644 index e859485..0000000 --- a/example/archetype/simpleapp/src/main/resources/archetype-resources/.gitignore +++ /dev/null @@ -1,41 +0,0 @@ -*~ -*.swp -*.class -bin/ -target/ -target-ide/ -logs/ -.settings/ -.project -.classpath -.idea -*.iml - -build/ - -JArchitectOut/ -*.jdproj - -neo4j_DB/ - -# log files -datanucleus.log -isis.log -i18n-po.log -hs_err_pid*.log - -# Package Files # -*.war -*.ear - -dependency-reduced-pom.xml -pom.xml.tag -pom.xml.next -pom.xml.releaseBackup -pom.xml.versionsBackup - -.clover/ - - -rebel.xml -translations.pot http://git-wip-us.apache.org/repos/asf/isis/blob/f349adea/example/archetype/simpleapp/src/main/resources/archetype-resources/README.adoc ---------------------------------------------------------------------- diff --git a/example/archetype/simpleapp/src/main/resources/archetype-resources/README.adoc b/example/archetype/simpleapp/src/main/resources/archetype-resources/README.adoc deleted file mode 100644 index c10deca..0000000 --- a/example/archetype/simpleapp/src/main/resources/archetype-resources/README.adoc +++ /dev/null @@ -1,245 +0,0 @@ -= SimpleApp - -This application was generated by the link:http://isis.apache.org[Apache Isis] link:http://isis.apache.org/guides/ugfun.html#_ugfun_getting-started_simpleapp-archetype[simpleapp archetype]. -It is intended as a starting point for developing your own applications. - -== Quick start - -Build using: - -[source,bash] ----- -mvn clean install ----- - -Run using: - -[source,bash] ----- -mvn -pl webapp jetty:run ----- - -Login using: - -* username: `sven` -* password: `pass` - -The app runs with HSQLDB running in-memory, with sample data set up using link:https://isis.apache.org/guides/ugtst.html#_ugtst_fixture-scripts[fixture scripts]. - - - -== Application Structure - -The following table explains the contents of each of the directories: - -[width="100%",options="header,footer", cols="2a,4a"] -|==================== -|Directory -|Description - -|`application` -|Defines application-level classes such as menus and the ``AppManifest`` (which defines the modules that make up the application). -It also holds application-wide integration tests/BDD specs. - -|`module-simple` -|Holds the "simple" module, consisting of the `SimpleObject` entity and supporting repository, along with module-specific unit- and integration tests. -Also runs `isis:validate` goal for the domain objects within the module. + - -[TIP] -==== -Larger applications should consist of multiple modules; each such module can be copied from this starter module. -==== - -|`webapp` -|Assembles the application into a webapp (comprising both the Wicket viewer and Restful Objects viewer) and also as a docker image, and runs the `isis:swagger` goal. - -|`_checks` -|Checkstyle and PMD rule sets for static analysis. - -[TIP] -==== -Extend/adapt these according to your own standards. -==== - - -|==================== - -== More advanced use cases - -* To enhance all JDO entities prior to running: + -+ -[source,bash] ----- -mvn -f pom-jdo-enhance-all.xml datanucleus:enhance ----- - -* To also generate the link:https://github.com/eirbjo/jetty-console[Jetty console], allowing the application to run as a standalone JAR: + -+ -[source,bash] ----- -mvn install -Dmavenmixin-jettyconsole ----- -+ -This can then be run using: + -+ -[source,bash] ----- -cd webapp/target && java -jar simpleapp-webapp-xxx-jetty-console.war ----- -+ -Add additional arguments ``--headless`` or ``--port 9999``, if required. -+ -It can also be run using: + -+ -[source,bash] ----- -mvn -pl webapp && mvn antrun:run -Dmavenmixin-jettyconsole ----- -+ -or to specify arguments: -+ -[source,bash] ----- -mvn -pl webapp && mvn antrun:run -Dmavenmixin-jettyconsole \ - -Dmaven-antrun-plugin.jettyconsole.args="--headless --port 9090" ----- - - -* To also generate source and javadoc JARs: -+ -[source,bash] ----- -mvn clean package -Dmavenmixin-sourceandjavadoc ----- -+ -[NOTE] -==== -This is configured only for the `module-simple` module. -==== - -* To create the website (for the `module-simple` module) with source/javadoc and static analysis: -+ -[source,bash] ----- -mvn -pl module-simple site -Dmavenmixin-sourceandjavadoc -Dmavenmixin-staticanalysis ----- -+ -[NOTE] -==== -This is intended to run only for the `module-simple` module, and will generate a website under`target/site/index.html`. -==== - - -* To disable the running of unit tests: + -+ -[source,bash] ----- -mvn -DskipUTs ----- -+ -[TIP] -==== -By default, output of unit tests are in `target/surefire-unittest-reports` (in the ``module-simple`` modules). -==== - -* To disable the running of integration tests: + -+ -[source,bash] ----- -mvn -DskipITs ----- -+ -[TIP] -==== -By default, output of integration tests are in `target/surefire-integtest-reports` (in the ``application`` and ``module-simple`` modules). -==== - -* To disable the running of BDD specs: + -+ -[source,bash] ----- -mvn -DskipBSs ----- -+ -[TIP] -==== -By default, output of integration tests are in `target/surefire-integbddspecs-reports` (in the ``application`` module). -==== - -* To disable the running of all tests and BDD specs: + -+ -[source,bash] ----- -mvn -DskipTests ----- - -* To disable the running of the `isis:validate` goal: + -+ -[source,bash] ----- -mvn -Dskip.mavenmixin-isisvalidate ----- - - -* To disable the generation of cucumber reports: + -+ -[source,bash] ----- -mvn -Dskip.mavenmixin-cucumberreporting ----- -+ -[TIP] -==== -By default, cucumber reports are generated at `target/cucumber-html-reports/overview-features.html` (in the ``application`` module). -==== - -* To disable the running of the `isis:swagger` goal: -+ -[source,bash] ----- -mvn -Dskip.mavenmixin-isisswagger ----- -+ -[TIP] -==== -By default, Swagger schema definition files are generated at `target/generated-resources/isis-swagger` (in the ``webapp`` module). -==== - -* To package up the application as a docker image: + -+ -[source,bash] ----- -mvn install -Dmavenmixin-docker ----- -+ -This assumes that the `${docker-plugin.imageName}` property has been defined in the `webapp` module. -Alternatively it can be specified on the command line using a system property, eg: -+ -[source,bash] ----- -mvn install -Dmavenmixin-docker -Ddocker-plugin.imageName=mycompany/myapp ----- -+ -The packaged image can be viewed using `docker images`. - -* To run a docker image previously packaged: + -+ -[source,bash] ----- -docker container run -d -p 8080:8080 mycompany/myapp ----- -+ -This can then be accessed at link:http://localhost:8080[localhost:8080]. -+ -See link:https://github.com/danhaywood/java-mavenmixin-docker#how-to-consume[mavenmixin-docker] for further details on how to run docker images. - -* To upload the application as a docker image to link:https://hub.docker.com[docker hub] (or some other docker registry): + -+ -[source,bash] ----- -mvn -pl webapp deploy -Dmavenmixin-docker ----- -+ -This assumes that the `${docker-plugin.imageName}` property has been defined, _and_ also that docker registry credentials have been specified in `~/.m2/settings.xml`. -See link:https://github.com/danhaywood/java-mavenmixin-docker#how-to-configure[mavenmixin-docker] for further details. - http://git-wip-us.apache.org/repos/asf/isis/blob/f349adea/example/archetype/simpleapp/src/main/resources/archetype-resources/_checks/checkstyle.xml ---------------------------------------------------------------------- diff --git a/example/archetype/simpleapp/src/main/resources/archetype-resources/_checks/checkstyle.xml b/example/archetype/simpleapp/src/main/resources/archetype-resources/_checks/checkstyle.xml deleted file mode 100644 index 1d57a99..0000000 --- a/example/archetype/simpleapp/src/main/resources/archetype-resources/_checks/checkstyle.xml +++ /dev/null @@ -1,290 +0,0 @@ -#set( $symbol_pound = '#' ) -#set( $symbol_dollar = '$' ) -#set( $symbol_escape = '\' ) -<?xml version="1.0"?> -<!-- - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. ---> -<!DOCTYPE module PUBLIC - "-//Puppy Crawl//DTD Check Configuration 1.1//EN" - "http://www.puppycrawl.com/dtds/configuration_1_1.dtd"> - -<!-- - - Checkstyle configuration that checks the sun coding conventions from: - - - the Java Language Specification at - http://java.sun.com/docs/books/jls/second_edition/html/index.html - - - the Sun Code Conventions at http://java.sun.com/docs/codeconv/ - - - the Javadoc guidelines at - http://java.sun.com/j2se/javadoc/writingdoccomments/index.html - - - the JDK Api documentation http://java.sun.com/j2se/docs/api/index.html - - - some best practices - - Checkstyle is very configurable. Be sure to read the documentation at - http://checkstyle.sf.net (or in your downloaded distribution). - - Most Checks are configurable, be sure to consult the documentation. - - To completely disable a check, just comment it out or delete it from the file. - - Finally, it is worth reading the documentation. - ---> - -<module name="Checker"> - - <!-- Checks that a package.html file exists for each package. --> - <!-- See http://checkstyle.sf.net/config_javadoc.html${symbol_pound}PackageHtml --> - <module name="JavadocPackage"/> - <!-- - --> - - <!-- Checks whether files end with a new line. --> - <!-- See http://checkstyle.sf.net/config_misc.html${symbol_pound}NewlineAtEndOfFile --> - <!-- - <module name="NewlineAtEndOfFile"/> - --> - - <!-- Checks that property files contain the same keys. --> - <!-- See http://checkstyle.sf.net/config_misc.html${symbol_pound}Translation --> - <module name="Translation"/> - - <!-- - eg: - //CHECKSTYLE.OFF: IllegalCatch - Much more readable than catching 7 exceptions - catch (Exception e) - //CHECKSTYLE.ON: IllegalCatch - --> - <module name="SuppressionCommentFilter"> - <property name="offCommentFormat" value="CHECKSTYLE.OFF${symbol_escape}: ([${symbol_escape}w${symbol_escape}|]+)"/> - <property name="onCommentFormat" value="CHECKSTYLE.ON${symbol_escape}: ([${symbol_escape}w${symbol_escape}|]+)"/> - <property name="checkFormat" value="${symbol_dollar}1"/> - </module> - - <!-- - eg: - // CHECKSTYLE IGNORE check FOR NEXT 1 LINES - public void onClick(View view) { ... } --> - <module name="SuppressWithNearbyCommentFilter"> - <property name="commentFormat" value="CHECKSTYLE.IGNORE (${symbol_escape}w+) FOR NEXT (${symbol_escape}d+) LINES"/> - <property name="checkFormat" value="${symbol_dollar}1"/> - <property name="influenceFormat" value="${symbol_dollar}2"/> - </module> - - <module name="TreeWalker"> - - <property name="cacheFile" value="${symbol_dollar}{checkstyle.cache.file}"/> - - <!-- not available in eclipse-cs - <module name="JavadocDeprecated"/> - --> - <module name="MissingOverride"/> - - <!-- ************************************************************** --> - <!-- Checks that are different from the sun coding conventions ones --> - <!-- ************************************************************** --> - <property name="tabWidth" value="4"/> - <module name="LeftCurly"> - <property name="option" value="eol"/> - </module> - <module name="RightCurly"> - <property name="option" value="same"/> - </module> - <module name="MemberName"> - <property name="format" value="^[a-z]([a-zA-Z0-9])*${symbol_dollar}"/> - </module> - <module name="StaticVariableName"> - <property name="format" value="^[A-Z](_?[A-Z0-9])*${symbol_dollar}"/> - </module> - <module name="MethodName"> - <property name="format" value="[a-z](_?[a-zA-Z0-9]+)*${symbol_dollar}"/> - </module> - <module name="ParameterName"> - <property name="format" value="[a-z]([a-zA-Z0-9]+)*${symbol_dollar}"/> - </module> - <module name="LocalVariableName"> - <property name="format" value="[a-z]([a-zA-Z0-9]+)*${symbol_dollar}"/> - </module> - - <!-- ************************************************************** --> - <!-- Default Sun coding conventions checks --> - <!-- ************************************************************** --> - - <!-- Checks for Javadoc comments. --> - <!-- See http://checkstyle.sf.net/config_javadoc.html --> - - <!-- TODO: instate at some point (though only for public methods - <module name="JavadocType"/> - --> - <!-- - <module name="JavadocMethod"/> - <module name="JavadocVariable"/> - --> - - - <!-- Checks for Naming Conventions. --> - <!-- See http://checkstyle.sf.net/config_naming.html --> - <module name="ConstantName"/> - <module name="PackageName"/> - <module name="TypeName"/> - <module name="LocalFinalVariableName"/> - - - <!-- Checks for Headers --> - <!-- See http://checkstyle.sf.net/config_header.html --> - <!-- - <module name="Header"> - --> - <!-- The follow property value demonstrates the ability --> - <!-- to have access to ANT properties. In this case it uses --> - <!-- the ${symbol_dollar}{basedir} property to allow Checkstyle to be run --> - <!-- from any directory within a project. --> - <!-- - <property name="headerFile" value="${symbol_dollar}{checkstyle.header.file}"/> - </module> - --> - - <!-- Following interprets the header file as regular expressions. --> - <!-- <module name="RegexpHeader"/> --> - - - <!-- Checks for imports --> - <!-- See http://checkstyle.sf.net/config_import.html --> - <module name="AvoidStarImport"/> - <module name="IllegalImport"/> - <module name="RedundantImport"/> - <module name="UnusedImports"/> - - - <!-- Checks for blocks. You know, those {}'s --> - <!-- See http://checkstyle.sf.net/config_blocks.html --> - <module name="EmptyBlock"/> - <module name="NeedBraces"/> - <!-- - <module name="AvoidNestedBlocks"/> - --> - - - <!-- Checks for common coding problems --> - <!-- See http://checkstyle.sf.net/config_coding.html --> - <module name="EmptyStatement"/> - <module name="MagicNumber"/> - <module name="MissingSwitchDefault"/> - <module name="RedundantThrows"/> - <module name="SimplifyBooleanExpression"/> - <module name="SimplifyBooleanReturn"/> - - <!-- not supported in maven - <module name="DoubleCheckedLocking"/> - --> - <!-- - <module name="AvoidInlineConditionals"/> - <module name="EqualsHashCode"/> - <module name="HiddenField"/> - <module name="IllegalInstantiation"/> - <module name="InnerAssignment"/> - --> - - <!-- Checks for class design --> - <!-- See http://checkstyle.sf.net/config_design.html --> - <!-- - - <module name="VisibilityModifier"/> - --> - <!-- too many violations... - <module name="DesignForExtension"/> - --> - <module name="FinalClass"/> - <module name="HideUtilityClassConstructor"/> - <module name="InterfaceIsType"/> - - - <module name="CyclomaticComplexity"> - <property name="max" value="12"/> - </module> - <module name="NPathComplexity"> - <property name="max" value="160"/> - </module> - - <!-- Miscellaneous other checks. --> - <!-- See http://checkstyle.sf.net/config_misc.html --> - <!-- - <module name="ArrayTypeStyle"/> - <module name="GenericIllegalRegexp"> - <property name="format" value="${symbol_escape}s+${symbol_dollar}"/> - <property name="message" value="Line has trailing spaces."/> - </module> - --> - <!-- removed; we detect these in other ways. - <module name="TodoComment"/> - --> - <module name="UpperEll"/> - <module name="FinalParameters"/> - - <!-- Checks for whitespace --> - <!-- See http://checkstyle.sf.net/config_whitespace.html --> - <!-- - <module name="NoWhitespaceAfter"/> - <module name="NoWhitespaceBefore"/> - <module name="OperatorWrap"/> - <module name="ParenPad"/> - <module name="WhitespaceAfter"/> - <module name="WhitespaceAround"/> - <module name="TabCharacter"/> - --> - <module name="EmptyForIteratorPad"/> - - - <!-- Modifier Checks --> - <!-- See http://checkstyle.sf.net/config_modifiers.html --> - <!-- - <module name="ModifierOrder"/> - <module name="RedundantModifier"/> - --> - - <!-- Checks for Size Violations. --> - <!-- See http://checkstyle.sf.net/config_sizes.html --> - <module name="LineLength"> - <property name="max" value="120"/> - </module> - <module name="MethodLength"> - <property name="max" value="30"/> - </module> - <module name="ParameterNumber"> - <property name="max" value="6"/> - </module> - - </module> - - - - <module name="FileLength"> - <property name="max" value="1500"/> - </module> - - <module name="FileTabCharacter"> - <property name="eachLine" value="true"/> - <property name="fileExtensions" value="java,xml"/> - </module> - -</module> http://git-wip-us.apache.org/repos/asf/isis/blob/f349adea/example/archetype/simpleapp/src/main/resources/archetype-resources/_checks/pmd.xml ---------------------------------------------------------------------- diff --git a/example/archetype/simpleapp/src/main/resources/archetype-resources/_checks/pmd.xml b/example/archetype/simpleapp/src/main/resources/archetype-resources/_checks/pmd.xml deleted file mode 100644 index 7f2e381..0000000 --- a/example/archetype/simpleapp/src/main/resources/archetype-resources/_checks/pmd.xml +++ /dev/null @@ -1,49 +0,0 @@ -#set( $symbol_pound = '#' ) -#set( $symbol_dollar = '$' ) -#set( $symbol_escape = '\' ) -<?xml version="1.0" encoding="UTF-8"?> -<!-- - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. ---> -<ruleset name="Maven Ruleset" - xmlns="http://pmd.sf.net/ruleset/1.0.0" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd" - xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd"> - - <!-- - Customized PMD ruleset for Maven, see [0] for more information - [0] http://pmd.sourceforge.net/howtomakearuleset.html - --> - - <description> - This ruleset checks the code for discouraged programming constructs. - </description> - - <rule ref="rulesets/java/basic.xml"> - <exclude name="EmptyCatchBlock"/> - </rule> - <rule ref="rulesets/java/basic.xml/EmptyCatchBlock"> - <properties> - <property name="allowCommentedBlocks" value="true"/> - </properties> - </rule> - - <rule ref="rulesets/java/unusedcode.xml"/> - <rule ref="rulesets/java/imports.xml"/> -</ruleset> http://git-wip-us.apache.org/repos/asf/isis/blob/f349adea/example/archetype/simpleapp/src/main/resources/archetype-resources/application/lib/.gitignore ---------------------------------------------------------------------- diff --git a/example/archetype/simpleapp/src/main/resources/archetype-resources/application/lib/.gitignore b/example/archetype/simpleapp/src/main/resources/archetype-resources/application/lib/.gitignore deleted file mode 100644 index 70eee7e..0000000 --- a/example/archetype/simpleapp/src/main/resources/archetype-resources/application/lib/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -# -# explicitly ignoring Microsoft JDBC4 jar -# (cannot redistribute, licensing) -# -sqljdbc4.jar http://git-wip-us.apache.org/repos/asf/isis/blob/f349adea/example/archetype/simpleapp/src/main/resources/archetype-resources/application/logging-integtest.properties ---------------------------------------------------------------------- diff --git a/example/archetype/simpleapp/src/main/resources/archetype-resources/application/logging-integtest.properties b/example/archetype/simpleapp/src/main/resources/archetype-resources/application/logging-integtest.properties deleted file mode 100644 index 088bbe4..0000000 --- a/example/archetype/simpleapp/src/main/resources/archetype-resources/application/logging-integtest.properties +++ /dev/null @@ -1,114 +0,0 @@ -#set( $symbol_pound = '#' ) -#set( $symbol_dollar = '$' ) -#set( $symbol_escape = '\' ) -${symbol_pound} Licensed to the Apache Software Foundation (ASF) under one -${symbol_pound} or more contributor license agreements. See the NOTICE file -${symbol_pound} distributed with this work for additional information -${symbol_pound} regarding copyright ownership. The ASF licenses this file -${symbol_pound} to you under the Apache License, Version 2.0 (the -${symbol_pound} "License"); you may not use this file except in compliance -${symbol_pound} with the License. You may obtain a copy of the License at -${symbol_pound} -${symbol_pound} http://www.apache.org/licenses/LICENSE-2.0 -${symbol_pound} -${symbol_pound} Unless required by applicable law or agreed to in writing, -${symbol_pound} software distributed under the License is distributed on an -${symbol_pound} "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -${symbol_pound} KIND, either express or implied. See the License for the -${symbol_pound} specific language governing permissions and limitations -${symbol_pound} under the License. - - -${symbol_pound} -${symbol_pound} Isis uses log4j is used to provide system logging -${symbol_pound} -log4j.rootCategory=INFO, Console - -${symbol_pound} The console appender -log4j.appender.Console=org.apache.log4j.ConsoleAppender -log4j.appender.Console.target=System.out -log4j.appender.Console.layout=org.apache.log4j.PatternLayout -log4j.appender.Console.layout.ConversionPattern=%d{ABSOLUTE} [%-20c{1} %-10t %-5p] %m%n - -log4j.appender.File=org.apache.log4j.RollingFileAppender -log4j.appender.File.file=isis.log -log4j.appender.File.append=false -log4j.appender.File.layout=org.apache.log4j.PatternLayout -log4j.appender.File.layout.ConversionPattern=%d [%-20c{1} %-10t %-5p] %m%n - -log4j.appender.translations-po=org.apache.log4j.FileAppender -log4j.appender.translations-po.File=./translations.pot -log4j.appender.translations-po.Append=false -log4j.appender.translations-po.layout=org.apache.log4j.PatternLayout -log4j.appender.translations-po.layout.ConversionPattern=%m%n - -! turn on the internal log4j debugging flag so we can see what it is doing -${symbol_pound}log4j.debug=true - - -${symbol_pound} DataNucleus -${symbol_pound} the first two log the DML and DDL (if set to DEBUG) -log4j.logger.DataNucleus.Datastore.Native=WARN, Console -log4j.logger.DataNucleus.Datastore.Schema=DEBUG, Console -${symbol_pound} the remainder can probably be left to WARN -log4j.logger.DataNucleus.Persistence=WARN, Console -log4j.logger.DataNucleus.Transaction=WARN, Console -log4j.logger.DataNucleus.Connection=WARN, Console -log4j.logger.DataNucleus.Query=WARN, Console -log4j.logger.DataNucleus.Cache=WARN, Console -log4j.logger.DataNucleus.MetaData=WARN, Console -log4j.logger.DataNucleus.Datastore=WARN, Console -log4j.logger.DataNucleus.Datastore.Persist=WARN, Console -log4j.logger.DataNucleus.Datastore.Retrieve=WARN, Console -log4j.logger.DataNucleus.General=WARN, Console -log4j.logger.DataNucleus.Lifecycle=WARN, Console -log4j.logger.DataNucleus.ValueGeneration=WARN, Console -log4j.logger.DataNucleus.Enhancer=WARN, Console -log4j.logger.DataNucleus.SchemaTool=ERROR, Console -log4j.logger.DataNucleus.JDO=WARN, Console -log4j.logger.DataNucleus.JPA=ERROR, Console -log4j.logger.DataNucleus.JCA=WARN, Console -log4j.logger.DataNucleus.IDE=ERROR, Console - -log4j.additivity.DataNucleus.Datastore.Native=false -log4j.additivity.DataNucleus.Datastore.Schema=false -log4j.additivity.DataNucleus.Datastore.Persistence=false -log4j.additivity.DataNucleus.Datastore.Transaction=false -log4j.additivity.DataNucleus.Datastore.Connection=false -log4j.additivity.DataNucleus.Datastore.Query=false -log4j.additivity.DataNucleus.Datastore.Cache=false -log4j.additivity.DataNucleus.Datastore.MetaData=false -log4j.additivity.DataNucleus.Datastore.Datastore=false -log4j.additivity.DataNucleus.Datastore.Datastore.Persist=false -log4j.additivity.DataNucleus.Datastore.Datastore.Retrieve=false -log4j.additivity.DataNucleus.Datastore.General=false -log4j.additivity.DataNucleus.Datastore.Lifecycle=false -log4j.additivity.DataNucleus.Datastore.ValueGeneration=false -log4j.additivity.DataNucleus.Datastore.Enhancer=false -log4j.additivity.DataNucleus.Datastore.SchemaTool=false -log4j.additivity.DataNucleus.Datastore.JDO=false -log4j.additivity.DataNucleus.Datastore.JPA=false -log4j.additivity.DataNucleus.Datastore.JCA=false -log4j.additivity.DataNucleus.Datastore.IDE=false - - - - -${symbol_pound} if using log4jdbc-remix as JDBC driver -${symbol_pound}log4j.logger.jdbc.sqlonly=DEBUG, sql, Console -${symbol_pound}log4j.additivity.jdbc.sqlonly=false -${symbol_pound}log4j.logger.jdbc.resultsettable=DEBUG, jdbc, Console -${symbol_pound}log4j.additivity.jdbc.resultsettable=false - -${symbol_pound}log4j.logger.jdbc.audit=WARN,jdbc, Console -${symbol_pound}log4j.additivity.jdbc.audit=false -${symbol_pound}log4j.logger.jdbc.resultset=WARN,jdbc -${symbol_pound}log4j.additivity.jdbc.resultset=false -${symbol_pound}log4j.logger.jdbc.sqltiming=WARN,sqltiming -${symbol_pound}log4j.additivity.jdbc.sqltiming=false -${symbol_pound}log4j.logger.jdbc.connection=FATAL,connection -${symbol_pound}log4j.additivity.jdbc.connection=false - - -log4j.logger.org.apache.isis.core.runtime.services.i18n.po.PoWriter=INFO,translations-po -log4j.additivity.org.apache.isis.core.runtime.services.i18n.po.PoWriter=false http://git-wip-us.apache.org/repos/asf/isis/blob/f349adea/example/archetype/simpleapp/src/main/resources/archetype-resources/application/pom.xml ---------------------------------------------------------------------- diff --git a/example/archetype/simpleapp/src/main/resources/archetype-resources/application/pom.xml b/example/archetype/simpleapp/src/main/resources/archetype-resources/application/pom.xml deleted file mode 100644 index 816324c..0000000 --- a/example/archetype/simpleapp/src/main/resources/archetype-resources/application/pom.xml +++ /dev/null @@ -1,128 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. ---><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> - - <parent> - <groupId>${groupId}</groupId> - <artifactId>${rootArtifactId}</artifactId> - <version>${version}</version> - </parent> - - <artifactId>${artifactId}</artifactId> - <name>SimpleApp Application</name> - - <description>This defines the application (manifest) and runs application-level fixtures and integration (smoke) tests</description> - - <packaging>jar</packaging> - - <build> - <resources> - <resource> - <directory>src/main/resources</directory> - </resource> - <resource> - <directory>src/main/java</directory> - <includes> - <include>**</include> - </includes> - <excludes> - <exclude>**/*.java</exclude> - </excludes> - </resource> - </resources> - <testResources> - <testResource> - <directory>src/test/resources</directory> - </testResource> - <testResource> - <directory>src/test/java</directory> - <includes> - <include>**</include> - </includes> - <excludes> - <exclude>**/*.java</exclude> - </excludes> - </testResource> - </testResources> - <plugins> - <plugin> - <groupId>com.github.odavid.maven.plugins</groupId> - <artifactId>mixin-maven-plugin</artifactId> - <version>0.1-alpha-39</version> - <extensions>true</extensions> - <configuration> - <mixins> - <mixin> - <groupId>com.danhaywood.mavenmixin</groupId> - <artifactId>standard</artifactId> - <version>${mavenmixin-standard.version}</version> - </mixin> - <mixin> - <groupId>com.danhaywood.mavenmixin</groupId> - <artifactId>enforcerrelaxed</artifactId> - <version>${mavenmixin-enforcerrelaxed.version}</version> - </mixin> - <mixin> - <groupId>com.danhaywood.mavenmixin</groupId> - <artifactId>surefire</artifactId> - <version>${mavenmixin-surefire.version}</version> - </mixin> - <mixin> - <groupId>com.danhaywood.mavenmixin</groupId> - <artifactId>cucumberreporting</artifactId> - <version>${mavenmixin-cucumberreporting.version}</version> - </mixin> - </mixins> - </configuration> - </plugin> - </plugins> - </build> - - <dependencies> - - <!-- this app --> - <dependency> - <groupId>${project.groupId}</groupId> - <artifactId>${rootArtifactId}-module-simple</artifactId> - </dependency> - <dependency> - <groupId>${project.groupId}</groupId> - <artifactId>${rootArtifactId}-module-simple</artifactId> - <type>test-jar</type> - <scope>test</scope> - </dependency> - - <!-- isis --> - <dependency> - <groupId>org.apache.isis.core</groupId> - <artifactId>isis-core-wrapper</artifactId> - </dependency> - - <dependency> - <groupId>com.danhaywood.mavendeps</groupId> - <artifactId>isistesting</artifactId> - <version>${mavendeps-isistesting.version}</version> - <type>pom</type> - <scope>test</scope> - </dependency> - - </dependencies> - -</project> http://git-wip-us.apache.org/repos/asf/isis/blob/f349adea/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/main/java/domainapp/application/fixture/DomainAppApplicationModuleFixtureSubmodule.java ---------------------------------------------------------------------- diff --git a/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/main/java/domainapp/application/fixture/DomainAppApplicationModuleFixtureSubmodule.java b/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/main/java/domainapp/application/fixture/DomainAppApplicationModuleFixtureSubmodule.java deleted file mode 100644 index 10a5446..0000000 --- a/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/main/java/domainapp/application/fixture/DomainAppApplicationModuleFixtureSubmodule.java +++ /dev/null @@ -1,26 +0,0 @@ -#set( $symbol_pound = '#' ) -#set( $symbol_dollar = '$' ) -#set( $symbol_escape = '\' ) -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package domainapp.application.fixture; - -public final class DomainAppApplicationModuleFixtureSubmodule { - private DomainAppApplicationModuleFixtureSubmodule(){} -} http://git-wip-us.apache.org/repos/asf/isis/blob/f349adea/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/main/java/domainapp/application/fixture/DomainAppFixtureScriptsSpecificationProvider.java ---------------------------------------------------------------------- diff --git a/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/main/java/domainapp/application/fixture/DomainAppFixtureScriptsSpecificationProvider.java b/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/main/java/domainapp/application/fixture/DomainAppFixtureScriptsSpecificationProvider.java deleted file mode 100644 index 68db9e9..0000000 --- a/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/main/java/domainapp/application/fixture/DomainAppFixtureScriptsSpecificationProvider.java +++ /dev/null @@ -1,49 +0,0 @@ -#set( $symbol_pound = '#' ) -#set( $symbol_dollar = '$' ) -#set( $symbol_escape = '\' ) -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package domainapp.application.fixture; - -import org.apache.isis.applib.annotation.DomainService; -import org.apache.isis.applib.annotation.NatureOfService; -import org.apache.isis.applib.fixturescripts.FixtureScripts; -import org.apache.isis.applib.services.fixturespec.FixtureScriptsSpecification; -import org.apache.isis.applib.services.fixturespec.FixtureScriptsSpecificationProvider; - -import domainapp.application.fixture.scenarios.DomainAppDemo; - -/** - * Specifies where to find fixtures, and other settings. - */ -@DomainService( - nature = NatureOfService.DOMAIN -) -public class DomainAppFixtureScriptsSpecificationProvider implements FixtureScriptsSpecificationProvider { - @Override - public FixtureScriptsSpecification getSpecification() { - return FixtureScriptsSpecification - .builder(DomainAppFixtureScriptsSpecificationProvider.class) - .with(FixtureScripts.MultipleExecutionStrategy.EXECUTE) - .withRunScriptDefault(DomainAppDemo.class) - .withRunScriptDropDown(FixtureScriptsSpecification.DropDownPolicy.CHOICES) - .withRecreate(DomainAppDemo.class) - .build(); - } -} http://git-wip-us.apache.org/repos/asf/isis/blob/f349adea/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/main/java/domainapp/application/fixture/scenarios/DomainAppDemo.java ---------------------------------------------------------------------- diff --git a/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/main/java/domainapp/application/fixture/scenarios/DomainAppDemo.java b/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/main/java/domainapp/application/fixture/scenarios/DomainAppDemo.java deleted file mode 100644 index ecf258d..0000000 --- a/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/main/java/domainapp/application/fixture/scenarios/DomainAppDemo.java +++ /dev/null @@ -1,51 +0,0 @@ -#set( $symbol_pound = '#' ) -#set( $symbol_dollar = '$' ) -#set( $symbol_escape = '\' ) -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package domainapp.application.fixture.scenarios; - -import javax.annotation.Nullable; - -import org.apache.isis.applib.fixturescripts.FixtureScript; - -import domainapp.application.fixture.teardown.DomainAppTearDown; -import domainapp.modules.simple.fixture.scenario.CreateSimpleObjects; -import lombok.Getter; -import lombok.Setter; - -public class DomainAppDemo extends FixtureScript { - - public DomainAppDemo() { - withDiscoverability(Discoverability.DISCOVERABLE); - } - - @Nullable - @Getter @Setter - private Integer number; - - @Override - protected void execute(final ExecutionContext ec) { - - // execute - ec.executeChild(this, new DomainAppTearDown()); - ec.executeChild(this, new CreateSimpleObjects().setNumber(number)); - - } -} http://git-wip-us.apache.org/repos/asf/isis/blob/f349adea/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/main/java/domainapp/application/fixture/teardown/DomainAppTearDown.java ---------------------------------------------------------------------- diff --git a/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/main/java/domainapp/application/fixture/teardown/DomainAppTearDown.java b/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/main/java/domainapp/application/fixture/teardown/DomainAppTearDown.java deleted file mode 100644 index 4f9e450..0000000 --- a/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/main/java/domainapp/application/fixture/teardown/DomainAppTearDown.java +++ /dev/null @@ -1,35 +0,0 @@ -#set( $symbol_pound = '#' ) -#set( $symbol_dollar = '$' ) -#set( $symbol_escape = '\' ) -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package domainapp.application.fixture.teardown; - -import org.apache.isis.applib.fixturescripts.FixtureScript; - -import domainapp.modules.simple.fixture.teardown.SimpleModuleTearDown; - -public class DomainAppTearDown extends FixtureScript { - - @Override - protected void execute(ExecutionContext executionContext) { - executionContext.executeChild(this, new SimpleModuleTearDown()); - } - -} http://git-wip-us.apache.org/repos/asf/isis/blob/f349adea/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/main/java/domainapp/application/manifest/DomainAppAppManifest.java ---------------------------------------------------------------------- diff --git a/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/main/java/domainapp/application/manifest/DomainAppAppManifest.java b/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/main/java/domainapp/application/manifest/DomainAppAppManifest.java deleted file mode 100644 index 6070f20..0000000 --- a/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/main/java/domainapp/application/manifest/DomainAppAppManifest.java +++ /dev/null @@ -1,154 +0,0 @@ -#set( $symbol_pound = '#' ) -#set( $symbol_dollar = '$' ) -#set( $symbol_escape = '\' ) -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package domainapp.application.manifest; - -import java.io.IOException; -import java.io.InputStream; -import java.util.Arrays; -import java.util.Collections; -import java.util.List; -import java.util.Map; -import java.util.Properties; - -import com.google.common.collect.Lists; -import com.google.common.collect.Maps; - -import org.apache.isis.applib.AppManifest; -import org.apache.isis.applib.fixturescripts.FixtureScript; - -import domainapp.application.fixture.DomainAppApplicationModuleFixtureSubmodule; -import domainapp.application.services.DomainAppApplicationModuleServicesSubmodule; -import domainapp.modules.simple.dom.SimpleModuleDomSubmodule; - -/** - * Bootstrap the application. - */ -public class DomainAppAppManifest implements AppManifest { - - private final List<Class<? extends FixtureScript>> fixtureScripts; - private final String authMechanism; - private final List<Class<?>> additionalModules; - - public DomainAppAppManifest() { - this( - Collections.<Class<? extends FixtureScript>>emptyList(), - null, - Collections.<Class<?>>emptyList() - ); - } - - public DomainAppAppManifest( - final List<Class<? extends FixtureScript>> fixtureScripts, - final String authMechanism, - final List<Class<?>> additionalModules) { - this.fixtureScripts = elseEmptyIfNull(fixtureScripts); - this.authMechanism = authMechanism != null ? authMechanism : "shiro"; - this.additionalModules = elseEmptyIfNull(additionalModules); - } - - private static <T> List<T> elseEmptyIfNull(final List<T> list) { - return list == null ? Collections.<T>emptyList() : list; - } - - /** - * Load all services and entities found in (the packages and subpackages within) these modules - */ - @Override - public List<Class<?>> getModules() { - List<Class<?>> modules = Lists.newArrayList(); - modules.addAll(Arrays.asList( - SimpleModuleDomSubmodule.class, - DomainAppApplicationModuleFixtureSubmodule.class, - DomainAppApplicationModuleServicesSubmodule.class - )); - modules.addAll(additionalModules); - return modules; - } - - /** - * No additional services. - */ - @Override - public List<Class<?>> getAdditionalServices() { - return Collections.emptyList(); - } - - /** - * Use shiro for authentication. - */ - @Override - public String getAuthenticationMechanism() { - return authMechanism; - } - - /** - * Use shiro for authorization. - */ - @Override - public String getAuthorizationMechanism() { - return authMechanism; - } - - /** - * No fixtures. - */ - @Override - public List<Class<? extends FixtureScript>> getFixtures() { - return fixtureScripts; - } - - /** - * No overrides. - */ - @Override - public Map<String, String> getConfigurationProperties() { - final Map<String, String> props = Maps.newHashMap(); - - loadPropsInto(props, "isis.properties"); - - if(!fixtureScripts.isEmpty()) { - props.put("isis.persistor.datanucleus.install-fixtures", "true"); - } - - return props; - } - - static void loadPropsInto(final Map<String, String> props, final String propertiesFile) { - final Properties properties = new Properties(); - try { - try (final InputStream stream = - DomainAppAppManifest.class.getResourceAsStream(propertiesFile)) { - properties.load(stream); - for (Object key : properties.keySet()) { - final Object value = properties.get(key); - if(key instanceof String && value instanceof String) { - props.put((String)key, (String)value); - } - } - } - } catch (IOException e) { - throw new RuntimeException( - String.format("Failed to load '%s' file ", propertiesFile), e); - } - } - -} http://git-wip-us.apache.org/repos/asf/isis/blob/f349adea/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/main/java/domainapp/application/manifest/DomainAppAppManifestBypassSecurity.java ---------------------------------------------------------------------- diff --git a/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/main/java/domainapp/application/manifest/DomainAppAppManifestBypassSecurity.java b/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/main/java/domainapp/application/manifest/DomainAppAppManifestBypassSecurity.java deleted file mode 100644 index 0c04b98..0000000 --- a/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/main/java/domainapp/application/manifest/DomainAppAppManifestBypassSecurity.java +++ /dev/null @@ -1,32 +0,0 @@ -#set( $symbol_pound = '#' ) -#set( $symbol_dollar = '$' ) -#set( $symbol_escape = '\' ) -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package domainapp.application.manifest; - -/** - * Bypasses security, meaning any user/password combination can be used to login. - */ -public class DomainAppAppManifestBypassSecurity extends DomainAppAppManifest { - - public DomainAppAppManifestBypassSecurity() { - super(null, "bypass", null); - } -} http://git-wip-us.apache.org/repos/asf/isis/blob/f349adea/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/main/java/domainapp/application/manifest/DomainAppAppManifestWithFixtures.java ---------------------------------------------------------------------- diff --git a/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/main/java/domainapp/application/manifest/DomainAppAppManifestWithFixtures.java b/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/main/java/domainapp/application/manifest/DomainAppAppManifestWithFixtures.java deleted file mode 100644 index 4289d82..0000000 --- a/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/main/java/domainapp/application/manifest/DomainAppAppManifestWithFixtures.java +++ /dev/null @@ -1,43 +0,0 @@ -#set( $symbol_pound = '#' ) -#set( $symbol_dollar = '$' ) -#set( $symbol_escape = '\' ) -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package domainapp.application.manifest; - -import java.util.List; - -import com.google.common.collect.Lists; - -import domainapp.modules.simple.fixture.scenario.CreateSimpleObjects; - -/** - * Run the app but without setting up any fixtures. - */ -public class DomainAppAppManifestWithFixtures extends DomainAppAppManifest { - - public DomainAppAppManifestWithFixtures() { - this(null); - } - - public DomainAppAppManifestWithFixtures(final String authMechanism) { - super((List)Lists.newArrayList(CreateSimpleObjects.class), authMechanism, null); - } - -} http://git-wip-us.apache.org/repos/asf/isis/blob/f349adea/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/main/java/domainapp/application/manifest/DomainAppAppManifestWithFixturesBypassSecurity.java ---------------------------------------------------------------------- diff --git a/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/main/java/domainapp/application/manifest/DomainAppAppManifestWithFixturesBypassSecurity.java b/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/main/java/domainapp/application/manifest/DomainAppAppManifestWithFixturesBypassSecurity.java deleted file mode 100644 index 30805c4..0000000 --- a/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/main/java/domainapp/application/manifest/DomainAppAppManifestWithFixturesBypassSecurity.java +++ /dev/null @@ -1,32 +0,0 @@ -#set( $symbol_pound = '#' ) -#set( $symbol_dollar = '$' ) -#set( $symbol_escape = '\' ) -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package domainapp.application.manifest; - -/** - * Bypasses security, meaning any user/password combination can be used to login. - */ -public class DomainAppAppManifestWithFixturesBypassSecurity extends DomainAppAppManifestWithFixtures { - - public DomainAppAppManifestWithFixturesBypassSecurity() { - super("bypass"); - } -} http://git-wip-us.apache.org/repos/asf/isis/blob/f349adea/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/main/java/domainapp/application/services/DomainAppApplicationModuleServicesSubmodule.java ---------------------------------------------------------------------- diff --git a/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/main/java/domainapp/application/services/DomainAppApplicationModuleServicesSubmodule.java b/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/main/java/domainapp/application/services/DomainAppApplicationModuleServicesSubmodule.java deleted file mode 100644 index 61feb63..0000000 --- a/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/main/java/domainapp/application/services/DomainAppApplicationModuleServicesSubmodule.java +++ /dev/null @@ -1,26 +0,0 @@ -#set( $symbol_pound = '#' ) -#set( $symbol_dollar = '$' ) -#set( $symbol_escape = '\' ) -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package domainapp.application.services; - -public final class DomainAppApplicationModuleServicesSubmodule { - private DomainAppApplicationModuleServicesSubmodule(){} -} http://git-wip-us.apache.org/repos/asf/isis/blob/f349adea/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/main/java/domainapp/application/services/dbmanager/HsqlDbManagerMenu.java ---------------------------------------------------------------------- diff --git a/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/main/java/domainapp/application/services/dbmanager/HsqlDbManagerMenu.java b/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/main/java/domainapp/application/services/dbmanager/HsqlDbManagerMenu.java deleted file mode 100644 index 9187dd9..0000000 --- a/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/main/java/domainapp/application/services/dbmanager/HsqlDbManagerMenu.java +++ /dev/null @@ -1,77 +0,0 @@ -#set( $symbol_pound = '#' ) -#set( $symbol_dollar = '$' ) -#set( $symbol_escape = '\' ) -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package domainapp.application.services.dbmanager; - -import java.util.Map; - -import javax.annotation.PostConstruct; - -import com.google.common.base.Strings; - -import org.hsqldb.util.DatabaseManagerSwing; - -import org.apache.isis.applib.annotation.Action; -import org.apache.isis.applib.annotation.ActionLayout; -import org.apache.isis.applib.annotation.DomainService; -import org.apache.isis.applib.annotation.DomainServiceLayout; -import org.apache.isis.applib.annotation.NatureOfService; -import org.apache.isis.applib.annotation.RestrictTo; -import org.apache.isis.applib.annotation.SemanticsOf; - -@DomainService( - nature = NatureOfService.VIEW_MENU_ONLY, - objectType = "prototyping.HsqlDbManagerMenu" -) -@DomainServiceLayout( - named = "Prototyping", - menuOrder = "999", - menuBar = DomainServiceLayout.MenuBar.SECONDARY -) -public class HsqlDbManagerMenu { - - - private String url; - - @PostConstruct - public void init(Map<String,String> properties) { - this.url = properties.get("isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionURL"); - } - - - @Action( - semantics = SemanticsOf.SAFE, - restrictTo = RestrictTo.PROTOTYPING - ) - @ActionLayout( - named = "HSQL DB Manager", - cssClassFa = "database" - ) - public void hsqlDbManager() { - String[] args = {"--url", url, "--noexit" }; - DatabaseManagerSwing.main(args); - } - public boolean hideHsqlDbManager() { - return Strings.isNullOrEmpty(url) || !url.contains("hsqldb:mem"); - } - - -} http://git-wip-us.apache.org/repos/asf/isis/blob/f349adea/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/main/java/domainapp/application/services/homepage/HomePageService.java ---------------------------------------------------------------------- diff --git a/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/main/java/domainapp/application/services/homepage/HomePageService.java b/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/main/java/domainapp/application/services/homepage/HomePageService.java deleted file mode 100644 index 07efddb..0000000 --- a/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/main/java/domainapp/application/services/homepage/HomePageService.java +++ /dev/null @@ -1,46 +0,0 @@ -#set( $symbol_pound = '#' ) -#set( $symbol_dollar = '$' ) -#set( $symbol_escape = '\' ) -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package domainapp.application.services.homepage; - -import org.apache.isis.applib.annotation.Action; -import org.apache.isis.applib.annotation.DomainService; -import org.apache.isis.applib.annotation.HomePage; -import org.apache.isis.applib.annotation.NatureOfService; -import org.apache.isis.applib.annotation.SemanticsOf; -import org.apache.isis.applib.services.factory.FactoryService; - -@DomainService( - nature = NatureOfService.DOMAIN, // trick to suppress the actions from the top-level menu - objectType = "homepage.HomePageService" -) -public class HomePageService { - - @Action(semantics = SemanticsOf.SAFE) - @HomePage - public HomePageViewModel homePage() { - return factoryService.instantiate(HomePageViewModel.class); - } - - - @javax.inject.Inject - FactoryService factoryService; -} http://git-wip-us.apache.org/repos/asf/isis/blob/f349adea/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/main/java/domainapp/application/services/homepage/HomePageViewModel.java ---------------------------------------------------------------------- diff --git a/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/main/java/domainapp/application/services/homepage/HomePageViewModel.java b/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/main/java/domainapp/application/services/homepage/HomePageViewModel.java deleted file mode 100644 index b9d101a..0000000 --- a/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/main/java/domainapp/application/services/homepage/HomePageViewModel.java +++ /dev/null @@ -1,49 +0,0 @@ -#set( $symbol_pound = '#' ) -#set( $symbol_dollar = '$' ) -#set( $symbol_escape = '\' ) -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package domainapp.application.services.homepage; - -import java.util.List; - -import org.apache.isis.applib.annotation.DomainObject; -import org.apache.isis.applib.annotation.Nature; -import org.apache.isis.applib.services.i18n.TranslatableString; - -import domainapp.modules.simple.dom.impl.SimpleObject; -import domainapp.modules.simple.dom.impl.SimpleObjectRepository; - -@DomainObject( - nature = Nature.VIEW_MODEL, - objectType = "homepage.HomePageViewModel" -) -public class HomePageViewModel { - - public TranslatableString title() { - return TranslatableString.tr("{num} objects", "num", getObjects().size()); - } - - public List<SimpleObject> getObjects() { - return simpleObjectRepository.listAll(); - } - - @javax.inject.Inject - SimpleObjectRepository simpleObjectRepository; -}
