... EQUIVALENT FUNCTIONALITY IS NOW INCORPORATED INTO APACHE ISIS v1.13.0
This module, intended for use with Apache Isis, provides a number of development-time utilities, mostly related to accessing/interacting with the Isis metamodel. These are visible in the UI either as menu actions or as contributed actions.
The following screenshots show an example app's usage of the module with some sample fixture data:
The module contributes the download layouts
action:
... which downloads a JSON file:
... that contains a .layout.json
corresponding to the current Isis metamodel (as specified by any annotations etc).
The developer can copy the JSON file into the correct location (alongside the .java
class file) and update as required.
The JSON files takes precedence over any annotations.
If there are many (or all) entities that require a .layout.json
file, then a zip of all the layouts can be downloaded:
To support code reviews and adhoc analysis of the code base, the metamodel can be downloaded as a CSV file:
... which can then be opened in a spreadsheet or other tool:
The prerequisite software is:
- Java JDK 8 (>= 1.9.0) or Java JDK 7 (<= 1.8.0) ** note that the compile source and target remains at JDK 7
- maven 3 (3.2.x is recommended).
To build the demo app:
git clone https://github.com/isisaddons/isis-module-devutils.git
mvn clean install
To run the demo app:
mvn antrun:run -P self-host
Then log on using user: sven
, password: pass
Isis Core 1.6.0 included the org.apache.isis.module:isis-module-devutils:1.6.0
Maven artifact. This module is a
direct copy of that code, with the following changes:
- package names have been altered from
org.apache.isis
toorg.isisaddons.module.devutils
- for simplicity, the applib and impl submodules have been combined into a single module
- the
DeveloperUtilitiesServiceDefault
is now annotated with@DomainService
so does not need explicitly registering inisis.properties
.
Otherwise the functionality is identical; warts and all!
Isis 1.7.0 no longer ships with org.apache.isis.module:isis-module-devutils
;
use this addon module instead.
You can either use this module "out-of-the-box", or you can fork this repo and extend to your own requirements.
To use "out-of-the-box":
- update your classpath by adding this dependency in your dom project's
pom.xml
:
<dependency> <groupId>org.isisaddons.module.devutils</groupId> <artifactId>isis-module-devutils-dom</artifactId> <version>1.13.0</version> </dependency>
-
if using
AppManifest
, then update itsgetModules()
method:@Override public List<Class<?>> getModules() { return Arrays.asList( ... org.isisaddons.module.devutils.DevUtilsModule.class, ); }
-
otherwise, update your
WEB-INF/isis.properties
.
isis.services.ServicesInstallerFromAnnotation.packagePrefix=\ ...\ org.isisaddons.module.devutils,\ ...
If you want to use the current -SNAPSHOT
, then the steps are the same as above, except:
- when updating the classpath, specify the appropriate -SNAPSHOT version:
<version>1.14.0-SNAPSHOT</version>
- add the repository definition to pick up the most recent snapshot (we use the Cloudbees continuous integration service). We suggest defining the repository in a
<profile>
:
<profile> <id>cloudbees-snapshots</id> <activation> <activeByDefault>true</activeByDefault> </activation> <repositories> <repository> <id>snapshots-repo</id> <url>http://repository-estatio.forge.cloudbees.com/snapshot/</url> <releases> <enabled>false</enabled> </releases> <snapshots> <enabled>true</enabled> </snapshots> </repository> </repositories> </profile>
If instead you want to extend this module's functionality, then we recommend that you fork this repo. The repo is structured as follows:
pom.xml
- parent pomdom
- the module implementation, depends on Isis applibfixture
- fixtures, holding a sample domain objects and fixture scripts; depends ondom
integtests
- integration tests for the module; depends onfixture
webapp
- demo webapp (see above screenshots); depends ondom
andfixture
Only the dom
project is released to Check for versions available in the
Maven Central Repo. The versions of the other modules
are purposely left at 0.0.1-SNAPSHOT
because they are not intended to be released.
The Isis Addons Security Module also exposes aspects of the
Isis metamodel (in its ApplicationFeatures
service and ApplicationFeature
class). In the future this functionality
within the security module may move into this devutils module.
- (no release in Isis 1.13.0; the module's functionality now part of the Apache Isis framework)
1.12.0
- released against Isis 1.12.01.11.0
- released against Isis 1.11.01.10.0
- released against Isis 1.10.01.9.0
- released against Isis 1.9.01.8.0
- released against Isis 1.8.0, support new @XxxLayout annotations; domain events for actions.1.7.0
- released against Isis 1.7.01.6.1
- closes issue#1.1.6.0
- re-released as part of isisaddons, with classes under packageorg.isisaddons.module.devutils
Copyright 2014-2016 Dan Haywood
Licensed 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.
There are no third-party dependencies.
Only the dom
module is deployed, and is done so using Sonatype's OSS support (see
user guide).
To deploy a snapshot, use:
pushd dom
mvn clean deploy
popd
The artifacts should be available in Sonatype's Snapshot Repo.
The release.sh
script automates the release process. It performs the following:
- performs a sanity check (
mvn clean install -o
) that everything builds ok - bumps the
pom.xml
to a specified release version, and tag - performs a double check (
mvn clean install -o
) that everything still builds ok - releases the code using
mvn clean deploy
- bumps the
pom.xml
to a specified release version
For example:
sh release.sh 1.13.0 \
1.14.0-SNAPSHOT \
dan@haywood-associates.co.uk \
"this is not really my passphrase"
where
$1
is the release version$2
is the snapshot version$3
is the email of the secret key (~/.gnupg/secring.gpg
) to use for signing$4
is the corresponding passphrase for that secret key.
Other ways of specifying the key and passphrase are available, see the pgp-maven-plugin
's
documentation).
If the script completes successfully, then push changes:
git push origin master
git push origin 1.13.0
If the script fails to complete, then identify the cause, perform a git reset --hard
to start over and fix the issue
before trying again. Note that in the dom
's pom.xml
the nexus-staging-maven-plugin
has the
autoReleaseAfterClose
setting set to true
(to automatically stage, close and the release the repo). You may want
to set this to false
if debugging an issue.
According to Sonatype's guide, it takes about 10 minutes to sync, but up to 2 hours to update search.