-
Notifications
You must be signed in to change notification settings - Fork 0
New maven DCL compiler plugin #30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,74 @@ | ||
| # DCL Compiler Maven Plugin | ||
|
|
||
| Maven plugin for compiling DCL (Data Control Language) files into DCN (Data Control Notation) format for local | ||
| application [testing](/Authorization/Testing). | ||
|
|
||
| ## Installation | ||
|
|
||
| Add the plugin to your `pom.xml` (see also the [Testing guide](/Authorization/Testing#compiling-dcl-to-dcn) for full | ||
| integration examples): | ||
|
|
||
| ```xml | ||
| <build> | ||
| <plugins> | ||
| <plugin> | ||
| <groupId>com.sap.cloud.security.ams.dcl</groupId> | ||
| <artifactId>dcl-compiler-plugin</artifactId> | ||
| <version>${sap.cloud.security.ams.dcl-compiler.version}</version> | ||
| <executions> | ||
| <execution> | ||
| <goals> | ||
| <goal>compile</goal> | ||
| </goals> | ||
| </execution> | ||
| </executions> | ||
| </plugin> | ||
| </plugins> | ||
| </build> | ||
| ``` | ||
|
|
||
| The latest version can be found on [Maven Central](https://mvnrepository.com/artifact/com.sap.cloud.security.ams.dcl/dcl-compiler-plugin). | ||
|
|
||
| ## Goals | ||
|
|
||
| ### `dcl:compile` | ||
|
|
||
| Compiles DCL files to DCN format. Bound to the `generate-test-resources` phase by default. | ||
|
|
||
| ### `dcl:validate` | ||
|
|
||
| Validates DCL files without generating output. Bound to the `validate` phase by default. Useful for CI/CD pipelines. | ||
|
|
||
| ## Configuration | ||
|
|
||
| | Parameter | Default | Description | | ||
| |-----------|---------|-------------| | ||
| | `sourceDirectory` | `.../src/main/resources/ams/dcl` | Directory containing DCL source files | | ||
| | `outputDirectory` | `.../generated-test-resources/ams/dcn` | Output directory for compiled DCN files (compile only) | | ||
| | `skip` | `false` | Skip plugin execution | | ||
| | `verbose` | `false` | Enable verbose output | | ||
| | `failOn` | `error` | Failure threshold: `error`, `warning`, or `deprecation` | | ||
| | `readDcn` | `false` | Allow reading `.dcn` files as input | | ||
| | `timeout` | `60000` | CLI timeout in milliseconds | | ||
| | `additionalArguments` | - | Additional CLI arguments | | ||
|
|
||
| Parameters can be set in `<configuration>` or overridden via command line with `-Ddcl.<parameter>`, e.g. `mvn compile -Ddcl.verbose=true`. | ||
|
|
||
| ## Platform-Specific Binaries | ||
|
|
||
| The plugin bundles platform-specific AMS CLI binaries for: | ||
| - macOS (Intel and Apple Silicon) | ||
| - Linux (x86_64 and ARM64) | ||
| - Windows (x86_64) | ||
|
|
||
| The relevant binaries are automatically extracted and | ||
| cached in `~/.ams-cli/binaries/{version}/` on first use. | ||
|
|
||
| ## Troubleshooting | ||
|
|
||
| **Timeout errors** — Increase the timeout for large projects: `<timeout>120000</timeout>` | ||
|
|
||
| **Permission denied (Unix)** — The plugin sets executable permissions automatically. If this fails: | ||
| ```bash | ||
| chmod +x ~/.ams-cli/binaries/{version}/{os}-{arch}/ams | ||
| ``` |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.