Skip to content

Commit 5abb240

Browse files
committed
Initial commit
1 parent 5b97ef5 commit 5abb240

File tree

7 files changed

+1617
-2
lines changed

7 files changed

+1617
-2
lines changed

.gitignore

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
/target
2+
/.settings
3+
/.idea
4+
.project
5+
.classpath
6+
*.class
7+
*.jar
8+
*.war
9+
*.ear
10+
*.dar
11+
*.vmoapp
12+
*.iml
13+
workspace.xml
14+
Thumbs.db

LICENSE.LESSER

Lines changed: 165 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,165 @@
1+
GNU LESSER GENERAL PUBLIC LICENSE
2+
Version 3, 29 June 2007
3+
4+
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
5+
Everyone is permitted to copy and distribute verbatim copies
6+
of this license document, but changing it is not allowed.
7+
8+
9+
This version of the GNU Lesser General Public License incorporates
10+
the terms and conditions of version 3 of the GNU General Public
11+
License, supplemented by the additional permissions listed below.
12+
13+
0. Additional Definitions.
14+
15+
As used herein, "this License" refers to version 3 of the GNU Lesser
16+
General Public License, and the "GNU GPL" refers to version 3 of the GNU
17+
General Public License.
18+
19+
"The Library" refers to a covered work governed by this License,
20+
other than an Application or a Combined Work as defined below.
21+
22+
An "Application" is any work that makes use of an interface provided
23+
by the Library, but which is not otherwise based on the Library.
24+
Defining a subclass of a class defined by the Library is deemed a mode
25+
of using an interface provided by the Library.
26+
27+
A "Combined Work" is a work produced by combining or linking an
28+
Application with the Library. The particular version of the Library
29+
with which the Combined Work was made is also called the "Linked
30+
Version".
31+
32+
The "Minimal Corresponding Source" for a Combined Work means the
33+
Corresponding Source for the Combined Work, excluding any source code
34+
for portions of the Combined Work that, considered in isolation, are
35+
based on the Application, and not on the Linked Version.
36+
37+
The "Corresponding Application Code" for a Combined Work means the
38+
object code and/or source code for the Application, including any data
39+
and utility programs needed for reproducing the Combined Work from the
40+
Application, but excluding the System Libraries of the Combined Work.
41+
42+
1. Exception to Section 3 of the GNU GPL.
43+
44+
You may convey a covered work under sections 3 and 4 of this License
45+
without being bound by section 3 of the GNU GPL.
46+
47+
2. Conveying Modified Versions.
48+
49+
If you modify a copy of the Library, and, in your modifications, a
50+
facility refers to a function or data to be supplied by an Application
51+
that uses the facility (other than as an argument passed when the
52+
facility is invoked), then you may convey a copy of the modified
53+
version:
54+
55+
a) under this License, provided that you make a good faith effort to
56+
ensure that, in the event an Application does not supply the
57+
function or data, the facility still operates, and performs
58+
whatever part of its purpose remains meaningful, or
59+
60+
b) under the GNU GPL, with none of the additional permissions of
61+
this License applicable to that copy.
62+
63+
3. Object Code Incorporating Material from Library Header Files.
64+
65+
The object code form of an Application may incorporate material from
66+
a header file that is part of the Library. You may convey such object
67+
code under terms of your choice, provided that, if the incorporated
68+
material is not limited to numerical parameters, data structure
69+
layouts and accessors, or small macros, inline functions and templates
70+
(ten or fewer lines in length), you do both of the following:
71+
72+
a) Give prominent notice with each copy of the object code that the
73+
Library is used in it and that the Library and its use are
74+
covered by this License.
75+
76+
b) Accompany the object code with a copy of the GNU GPL and this license
77+
document.
78+
79+
4. Combined Works.
80+
81+
You may convey a Combined Work under terms of your choice that,
82+
taken together, effectively do not restrict modification of the
83+
portions of the Library contained in the Combined Work and reverse
84+
engineering for debugging such modifications, if you also do each of
85+
the following:
86+
87+
a) Give prominent notice with each copy of the Combined Work that
88+
the Library is used in it and that the Library and its use are
89+
covered by this License.
90+
91+
b) Accompany the Combined Work with a copy of the GNU GPL and this license
92+
document.
93+
94+
c) For a Combined Work that displays copyright notices during
95+
execution, include the copyright notice for the Library among
96+
these notices, as well as a reference directing the user to the
97+
copies of the GNU GPL and this license document.
98+
99+
d) Do one of the following:
100+
101+
0) Convey the Minimal Corresponding Source under the terms of this
102+
License, and the Corresponding Application Code in a form
103+
suitable for, and under terms that permit, the user to
104+
recombine or relink the Application with a modified version of
105+
the Linked Version to produce a modified Combined Work, in the
106+
manner specified by section 6 of the GNU GPL for conveying
107+
Corresponding Source.
108+
109+
1) Use a suitable shared library mechanism for linking with the
110+
Library. A suitable mechanism is one that (a) uses at run time
111+
a copy of the Library already present on the user's computer
112+
system, and (b) will operate properly with a modified version
113+
of the Library that is interface-compatible with the Linked
114+
Version.
115+
116+
e) Provide Installation Information, but only if you would otherwise
117+
be required to provide such information under section 6 of the
118+
GNU GPL, and only to the extent that such information is
119+
necessary to install and execute a modified version of the
120+
Combined Work produced by recombining or relinking the
121+
Application with a modified version of the Linked Version. (If
122+
you use option 4d0, the Installation Information must accompany
123+
the Minimal Corresponding Source and Corresponding Application
124+
Code. If you use option 4d1, you must provide the Installation
125+
Information in the manner specified by section 6 of the GNU GPL
126+
for conveying Corresponding Source.)
127+
128+
5. Combined Libraries.
129+
130+
You may place library facilities that are a work based on the
131+
Library side by side in a single library together with other library
132+
facilities that are not Applications and are not covered by this
133+
License, and convey such a combined library under terms of your
134+
choice, if you do both of the following:
135+
136+
a) Accompany the combined library with a copy of the same work based
137+
on the Library, uncombined with any other library facilities,
138+
conveyed under the terms of this License.
139+
140+
b) Give prominent notice with the combined library that part of it
141+
is a work based on the Library, and explaining where to find the
142+
accompanying uncombined form of the same work.
143+
144+
6. Revised Versions of the GNU Lesser General Public License.
145+
146+
The Free Software Foundation may publish revised and/or new versions
147+
of the GNU Lesser General Public License from time to time. Such new
148+
versions will be similar in spirit to the present version, but may
149+
differ in detail to address new problems or concerns.
150+
151+
Each version is given a distinguishing version number. If the
152+
Library as you received it specifies that a certain numbered version
153+
of the GNU Lesser General Public License "or any later version"
154+
applies to it, you have the option of following the terms and
155+
conditions either of that published version or of any later version
156+
published by the Free Software Foundation. If the Library as you
157+
received it does not specify a version number of the GNU Lesser
158+
General Public License, you may choose any version of the GNU Lesser
159+
General Public License ever published by the Free Software Foundation.
160+
161+
If the Library as you received it specifies that a proxy can decide
162+
whether future versions of the GNU Lesser General Public License shall
163+
apply, that proxy's public statement of acceptance of any version is
164+
permanent authorization for you to choose that version for the
165+
Library.

NOTICE

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
/* This file is part of project "o11n-deploy-maven-plugin", a computer software *
2+
* plugin for deploying Java plugins to VMware vRealize Orchestrator using *
3+
* Maven build management. *
4+
* *
5+
* *
6+
* Copyright (C) 2016-2017 Robert Ruf *
7+
* *
8+
* *
9+
* This program is free software: you can redistribute it and/or modify *
10+
* it under the terms of the GNU Lesser General Public License as published *
11+
* by the Free Software Foundation, either version 3 of the License, or *
12+
* (at your option) any later version. *
13+
* *
14+
* This program is distributed in the hope that it will be useful, *
15+
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
16+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
17+
* See the GNU Lesser General Public License for more details. *
18+
* *
19+
* You should have received a copy of the GNU Lesser General Public License *
20+
* along with this program. If not, see <http://www.gnu.org/licenses/>. */

README.md

Lines changed: 147 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,147 @@
1-
# o11n-deploy-maven-plugin
2-
A Maven plug-in that helps you develop Java plug-ins for VMware vRealize Orchestrator by automatically installing the compiled *.vmoapp or *.dar files on the configured vRealize Orchestrator server
1+
# O11n-deploy-maven-plugin
2+
3+
A Maven plug-in that helps you develop Java plug-ins for VMware vRealize Orchestrator by automatically installing the compiled *.vmoapp or *.dar files on the configured vRealize Orchestrator server.
4+
5+
[![Click here to see a short preview of the plug-in in action.](./misc/showcase_ph.png)](https://vimeo.com/201562030 "Using o11n-maven-deploy Mojo")
6+
7+
#### New in version 0.2.0
8+
- Added Orchestrator service restart option
9+
- Added better permission control
10+
- Maven debug mode will now provide verbose output
11+
- Replaced *Unirest* with *Jersey 2.0* and *JSON-P*
12+
13+
#### New in version 0.2.1
14+
- Added option to delete plug-in packages (thanks @gvart)
15+
- Minor formatting and spelling fixes
16+
17+
#### New in version 0.2.2
18+
- Minor Javadoc fixes
19+
- Added option to wait for pending configuration changes
20+
21+
## Install
22+
You may download this Mojo as a binary and add it to your local Maven repository for usage. In addition this Mojo is available in the public OSSRH repository hosted by Sonatype and will automatically be pulled from there when added to your project's Maven POM.
23+
If you have not yet added the Sonatype OSSRH you can do so by adding the following to your POM.
24+
25+
```xml
26+
<repositories>
27+
<repository>
28+
<id>sonatype-oss-public</id>
29+
<url>https://oss.sonatype.org/content/groups/public/</url>
30+
<releases>
31+
<enabled>true</enabled>
32+
</releases>
33+
</repository>
34+
</repositories>
35+
```
36+
37+
## Usage
38+
This Mojo should be configured within your *o11nplugin-**pluginname**/pom.xml* Maven module. It has a single goal **deployplugin** and usually you should run it in the **install** phase. The **deployplugin** goal has the following parameters.
39+
40+
41+
#### Mandatory Parameters
42+
- **o11nServer**: VMware Orchestrator server hostname or IP-address.
43+
- **o11nPluginServiceUser**: Username of a user with sufficient permissions to import Orchestrator plug-ins. *Note: when using integrated LDAP this will be `vcoadmin` and `root` has no permissions to use the plug-in service API by default.*
44+
- **o11nPluginServicePassword**: Password of the provided `o11nPluginServiceUser`.
45+
46+
#### Optional Parameters
47+
- **o11nServicePort**: VMware Orchestrator Plugin Service REST API Port. Defaults to `8281`.
48+
- **o11nConfigPort**: VMware Orchestrator Config Service REST API Port. Defaults to `8283`.
49+
- **o11nOverwrite**: If set to `true` this option will trigger a Orchestrator service restart after the plug-in was installed. Defaults to `true`.
50+
- **o11nPluginType**: The Orchestrator plug-in bundle format. Might be `DAR` or `VMOAPP`. Defaults to `VMOAPP`. *Note*: the value for this parameter is case-sensitive!
51+
- **o11nRestartService**: If set to `true` this option will trigger a Orchestrator service restart after the plug-in was installed.
52+
- **o11nConfigServiceUser**: Username of a user with sufficient permissions to restart Orchestrator services. **Required if `o11nRestartService` was set to `true`**. *Note: when using integrated LDAP this will be `root` and `vcoadmin` has no permissions to use the config service API by default.*
53+
- **o11nConfigServicePassword**: Password of the provided `o11nConfigServiceUser`. **Required if `o11nRestartService` was set to `true`**.
54+
- **o11nDeletePackage**: If set to `true` this option will delete all of the plug-ins packages before installing the new plug-in. *Note*: any changes done to the plug-in workflows and not synced with the packages in the plug-in bundle will be lost! The Orchestrator API option `deletePackageKeepingShared` is used internally for safety.
55+
- **o11nPackageName**: The package name of the plug-in package to be deleted. **Required if `o11nDeletePackage` was set to `true`**. *Note*: this is the package name as specified in the `pkg-name` attribute of the `dunes-meta-inf.xml` file. If the package is not found on the server the goal execution will continue but a warning will be logged.
56+
- **o11nWaitForPendingChanges**: If set to `true` this option will make this Mojo wait up to 240 seconds till the pending configuration changes have been applied. Note*: this option will only be processed if `o11nRestartService` is set to `true`.
57+
- **o11nPluginFilePath**: Path to the plug-in file that should be installed. Defaults to `${project.build.directory}`. The filename will be taken from the configured *o11nPluginFileName*.
58+
- **o11nPluginFileName**: The plug-in filename of the plug-in that should be installed omitting any file extension. Defaults to `${project.build.finalName}`. The extension will be taken from the configured *o11nPluginType*.
59+
60+
#### Parameter Formatting
61+
All parameters are provided as Strings inside your POM file and will be converted into the required format internally. A simple `mvn install` will then trigger the upload of the compiled plugin if the execution goal has been set, see [example configuration](#example-configuration).
62+
63+
### Example configuration
64+
A example that uses all currently available parameters. Note that for illustration purpose we also configured the optional parameters which would use the documented default values if omitted.
65+
66+
```xml
67+
<plugin>
68+
<groupId>com.github.omniproc</groupId>
69+
<artifactId>o11n-deploy-maven-plugin</artifactId>
70+
<version>0.2.2</version>
71+
<executions>
72+
<execution>
73+
<phase>install</phase>
74+
<goals>
75+
<goal>deployplugin</goal>
76+
</goals>
77+
</execution>
78+
</executions>
79+
<configuration>
80+
<o11nServer>localhost</o11nServer>
81+
<o11nServicePort>8281</o11nServicePort>
82+
<o11nConfigPort>8283</o11nConfigPort>
83+
<o11nPluginServiceUser>vcoadmin</o11nPluginServiceUser>
84+
<o11nPluginServicePassword>vcoadmin</o11nPluginServicePassword>
85+
<o11nConfigServiceUser>root</o11nConfigServiceUser>
86+
<o11nConfigServicePassword>RootP$$word</o11nConfigServicePassword>
87+
<o11nPluginType>VMOAPP</o11nPluginType>
88+
<o11nOverwrite>true</o11nOverwrite>
89+
<o11nRestartService>true</o11nRestartService>
90+
<o11nWaitForPendingChanges>true</o11nWaitForPendingChanges>
91+
<o11nDeletePackage>true</o11nDeletePackage>
92+
<o11nPackageName>com.example.packagename</o11nPackageName>
93+
<o11nPluginFilePath>${project.build.directory}<o11nPluginFilePath>
94+
<o11nPluginFileName>${project.build.finalName}</o11nPluginFileName>
95+
</configuration>
96+
</plugin>
97+
<!-- Optional, see 'install' section of this readme -->
98+
<repositories>
99+
<repository>
100+
<id>sonatype-oss-public</id>
101+
<url>https://oss.sonatype.org/content/groups/public/</url>
102+
<releases>
103+
<enabled>true</enabled>
104+
</releases>
105+
</repository>
106+
</repositories>
107+
```
108+
109+
110+
### Example execution
111+
An example output of a successfull run may look like this:
112+
```bash
113+
...
114+
[INFO] --- o11n-deploy-maven-plugin:0.2.1:deployplugin (default) @ o11nplugin-pluginname ---
115+
[INFO] Package deletion was requested.
116+
[INFO] Deleting plug-in package 'com.example.packagename.'...
117+
[INFO] Finished plug-in package deletion.
118+
[INFO] Starting Plug-in '/workspace/pluginname/o11nplugin-pluginname/target/o11nplugin-pluginname-0.1.vmoapp' upload...
119+
[INFO] Finished plug-in upload.
120+
[INFO] Service restart was requested.
121+
[INFO] Restarting Orchestrator service...
122+
[INFO] Wait for pending changes was requested.
123+
[INFO] Configuration changes are still pending. Waiting...
124+
[INFO] Configuration changes are still pending. Waiting...
125+
[INFO] Configuration changes are still pending. Waiting...
126+
[INFO] Configuration changes are still pending. Waiting...
127+
[INFO] Pending configuration changes have been applied. All done.
128+
[INFO] Finished Orchestrator service restart.
129+
[INFO] Successfully updated plug-in in VMware Orchestrator.
130+
...
131+
```
132+
133+
## Licensing & Legal
134+
O11n-deploy-maven-plugin – from now on “this project”, “this program” or “this software” – is an open source project.
135+
136+
*This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.*
137+
138+
*This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.*
139+
140+
*You should have received a copy of the GNU Lesser General Public License along with this program. If not, see http://www.gnu.org/licenses/.*
141+
142+
143+
This software may include *“Open Source Software”*, which means various open source software components licensed under the terms of applicable open source license agreements included in the materials relating to such software. Open Source Software is composed of individual software components, each of which has its own copyright and its own applicable license conditions. Information about the used Open Source Software and their licenses can be found in the *pom.xml* file. The Product may also include other components, which may contain additional open source software packages. One or more such *license* files may therefore accompany this Product.
144+
145+
It is your responsibility to ensure that your use and/or transfer does not violate applicable laws.
146+
147+
All product and company names are trademarks ™ or registered ® trademarks of their respective holders. Use of them does not imply any affiliation with or endorsement by them.

misc/showcase_ph.png

182 KB
Loading

0 commit comments

Comments
 (0)