Compiling Exported plugin as Maven project
Overview
Once a plugin project is exported from a workspace, it becomes a standalone plugin project that can be compiled/built, and/or updated to newer version of SDK without having to import it back to an active SDK workspace.
If exported plugin project is getting compiled with maven goals in different system where smartview sdk is not installed then compile.bat needs to run as pre-requisite.
If plugin project need to use different version, then execute following :
Compile the plugin project
Batch file
compile.bat
Argument options
| Argument | What to provide | Example | It is |
|---|---|---|---|
| --version | VERSION_NUMBER | 25.4.0 | Mandatory |
| --installFromMvnRepo | ARTIFACTORY_URL | https://artifactory.yourcompany.net/artifactory/opentext-artifacts | Optional |
| --installFromFile | SV_SDK_ZIP_PATH | C:\code\sv-sdk\SV-SDK-25.4.0.zip | Optional |
Examples
Usecase #1:
Provide the SV version to use for plugin project and provide artifactory URL where d2sdk-maven-plugin-{version} is available.
compile.bat --version 25.4.0 --installFromMvnRepo https://artifactory.yourcompany.net/artifactory/opentext-artifacts
Usecase #2:
Provide the SV version to use for plugin project and provide downloaded SV SDK zip file path
compile.bat --version 25.4.0 --installFromFile "C:\code\sv-sdk\SV-SDK-25.4.0.zip"
Usecase #3:
Provide the SV version to use for plugin project. Assume, if Artifactory is already configured in .m2/settings.xml
compile.bat --version 25.4.0
Usecase #4:
Provide the SV version to use for plugin project. Assume, if this version is already executed successfully using this batch file.
compile.bat --version 25.4.0
Developer tools
Please ensure following developer tool is available to exported plugin project:
PowerShell
PowerShell is a task automation and configuration management program from Microsoft. By default, powershell is available in windows 7 onwards. See https://learn.microsoft.com/en-us/powershell.
Troubleshooting
if you encounter following error while running any maven goal for plugin project:
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[ERROR] Unresolveable build extension: Plugin com.opentext.d2.sdk:d2sdk-maven-plugin:{version} or one of its dependencies could not be resolved: The following artifacts could not be resolved: com.opentext.d2.sdk:d2sdk-maven-plugin:jar:{version} (absent): Could not find artifact com.opentext.d2.sdk:d2sdk-maven-plugin:jar:{version} in central (https://repo.maven.apache.org/maven2) @
This means Smartview SDK maven plugin is unavailable in your system. To install it, please run compile.bat with required version and specify downloaded SV SDK archive location (or) artifactory location that contains d2sdk-maven-plugin artifact.