-
Notifications
You must be signed in to change notification settings - Fork 7
Using annotation processors
This document describes how to configure and use annotation processors in TG applications. For processor-specific details, refer respective wiki pages.
Development of TG applications involves the following processors:
Each processor page provides its own configuration instructions.
Combined together, a typical TG application should be configured by adding the following to pom.xml of a *-pojo-bl Maven module:
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<encoding>UTF-8</encoding>
<!-- to enable output of annotation processors -->
<showWarnings>true</showWarnings>
<generatedSourcesDirectory>${project.build.directory}/generated-sources/</generatedSourcesDirectory>
<annotationProcessorPaths>
<path>
<groupId>fielden</groupId>
<artifactId>platform-annotation-processors</artifactId>
<version>${platform.version}</version>
</path>
</annotationProcessorPaths>
<annotationProcessors>
<processor>ua.com.fielden.platform.processors.appdomain.ApplicationDomainProcessor</processor>
<processor>ua.com.fielden.platform.processors.verify.VerifyingProcessor</processor>
<processor>ua.com.fielden.platform.processors.metamodel.MetaModelProcessor</processor>
</annotationProcessors>
</configuration>
</plugin>
</plugins>The order of processors, specified by the <processor> tag, matters significantly.
-
ApplicationDomainProcessorgenerates theApplicationDomainclass. -
VerifyingProcessorverifies entity definitions. It must be aware of the generatedApplicationDomain, hence is placed after it. -
MetaModelProcessorgenerates meta-models. However, if verification fails, the verifying processor can prevent any subsequent processing from taking place, hence the meta-model processor is placed after it.NOTE: Currently, the meta-model processor can't be prevented from running by the verifying processor. Therefore, even if verification fails, meta-model generation will nevertheless be attempted.
To use annotations related to annotation processing, an additional compile-time dependency should be included in the same pom.xml file:
<dependency>
<groupId>fielden</groupId>
<artifactId>platform-annotation-processors</artifactId>
<version>${platform.version}</version>
<scope>compile</scope>
</dependency>Per aspera ad astra
- Web UI Design and Web API
- Safe Communication and User Authentication
- Gitworkflow
- JavaScript: Testing with Maven
- Java Application Profiling
-
TG Development Guidelines
- TG Releases
- TLS and HAProxy for development
- TG Development Checklist
- Entity
- Entities and their validation
- Entity Properties
- Entity Type Enhancement
- EQL
- Tooltip How To
- All about Matchers
- All about Fetch Models
- Streaming data
- Synthetic entities
- Activatable entities
- Jasper Reports
- Opening Compound Master from another Compound Master
- Window management test plan
- Multi Time Zone Environment
- GraphQL Web API
- Guice
- Maven
- RichText Data Migration
- Full Text Search
- Deployment recipes
- Application Configuration
- Observability
- JRebel Installation and Integration
- Compile-time mechanisms
- Work in progress