summaryrefslogtreecommitdiffstats
path: root/appc-adapters/appc-rest-healthcheck-adapter/appc-rest-healthcheck-adapter-installer/pom.xml
blob: b01de16180dd4b5431f70d0848f080da6ffbbac0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
<?xml version="1.0" encoding="UTF-8"?>
<!--
  ============LICENSE_START=======================================================
  ONAP : APPC
  ================================================================================
  Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved.
  Copyright (C) 2017 Amdocs
  ================================================================================
  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.
  ============LICENSE_END=========================================================
  -->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <artifactId>appc-rest-healthcheck-adapter</artifactId>
        <groupId>org.onap.appc</groupId>
        <version>1.6.0-SNAPSHOT</version>
    </parent>
    <artifactId>appc-rest-healthcheck-adapter-installer</artifactId>
    <name>Rest Health Check Adapter - Karaf Installer</name>
    <packaging>pom</packaging>
    <properties>
        <application.name>appc-rest-healthcheck-adapter</application.name>
        <features.boot>appc-rest-healthcheck-adapter</features.boot>
        <features.repositories>mvn:org.onap.appc/appc-rest-healthcheck-adapter-features/${project.version}/xml/features</features.repositories>
        <include.transitive.dependencies>false</include.transitive.dependencies>
    </properties>
    <dependencies>
        <dependency>
            <groupId>org.onap.appc</groupId>
            <artifactId>appc-rest-healthcheck-adapter-features</artifactId>
            <classifier>features</classifier>
            <type>xml</type>
            <exclusions>
                <exclusion>
                    <groupId>*</groupId>
                    <artifactId>*</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.onap.appc</groupId>
            <artifactId>appc-rest-healthcheck-adapter-bundle</artifactId>
            <version>${project.version}</version>
        </dependency>
    </dependencies>
    <build>
        <plugins>
            <plugin>
                <artifactId>maven-assembly-plugin</artifactId>
                <executions>
                    <execution>
                        <id>maven-repo-zip</id>
                        <goals>
                            <goal>single</goal>
                        </goals>
                        <phase>package</phase>
                        <configuration>
                        	<appendAssemblyId>false</appendAssemblyId>
                            <attach>false</attach>
                            <finalName>stage/${application.name}-${project.version}</finalName>
                            <descriptors>
                                <descriptor>src/assembly/assemble_mvnrepo_zip.xml</descriptor>
                            </descriptors>
                        </configuration>
                    </execution>
                    <execution>
                        <id>installer-zip</id>
                        <goals>
                            <goal>single</goal>
                        </goals>
                        <phase>package</phase>
                        <configuration>
                        	<appendAssemblyId>false</appendAssemblyId>
                            <attach>true</attach>
                            <finalName>${application.name}-${project.version}</finalName>
                            <descriptors>
                                <descriptor>src/assembly/assemble_installer_zip.xml</descriptor>
                            </descriptors>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <executions>
                    <execution>
                        <id>copy-dependencies</id>
                        <goals>
                            <goal>copy-dependencies</goal>
                        </goals>
                        <phase>prepare-package</phase>
                        <configuration>
                            <transitive>false</transitive>
                            <outputDirectory>${project.build.directory}/assembly/system</outputDirectory>
                            <overWriteReleases>false</overWriteReleases>
                            <overWriteSnapshots>true</overWriteSnapshots>
                            <overWriteIfNewer>true</overWriteIfNewer>
                            <useRepositoryLayout>true</useRepositoryLayout>
                            <addParentPoms>false</addParentPoms>
                            <copyPom>false</copyPom>
                            <excludeGroupIds>org.opendaylight</excludeGroupIds>
                            <scope>provided</scope>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-resources-plugin</artifactId>
                <executions>
                    <execution>
                        <id>copy-version</id>
                        <goals>
                            <goal>copy-resources</goal>
                        </goals>
                        <!-- here the phase you need -->
                        <phase>validate</phase>
                        <configuration>
                            <outputDirectory>${basedir}/target/stage</outputDirectory>
                            <resources>
                                <resource>
                                    <directory>src/main/resources/scripts</directory>
                                    <includes>
                                        <include>install-feature.sh</include>
                                    </includes>
                                    <filtering>true</filtering>
                                </resource>
                            </resources>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
    <version>1.6.0-SNAPSHOT</version>
</project>
>indexOf('/api-docs') > 0) { url += window.location.pathname.substring(0, window.location.pathname.indexOf('/api-docs')) } url += "/api-docs/api.json"; log('API URL: ' + url); // Pre load translate... if(window.SwaggerTranslator) { window.SwaggerTranslator.translate(); } window.swaggerUi = new SwaggerUi({ url: url, dom_id: "swagger-ui-container", supportedSubmitMethods: ['get', 'post', 'put', 'delete', 'patch'], onComplete: function(swaggerApi, swaggerUi){ if(typeof initOAuth == "function") { initOAuth({ clientId: "your-client-id", clientSecret: "your-client-secret", realm: "your-realms", appName: "your-app-name", scopeSeparator: "," }); } if(window.SwaggerTranslator) { window.SwaggerTranslator.translate(); } $('pre code').each(function(i, e) { hljs.highlightBlock(e) }); }, onFailure: function(data) { log("Unable to Load SwaggerUI"); }, docExpansion: "none", apisSorter: "alpha", showRequestHeaders: false }); window.swaggerUi.load(); function log() { if ('console' in window) { console.log.apply(console, arguments); } } }); </script> <!-- Hide the swagger io --> <style> .footer a, .footer img{ display: none !important; } </style> </head> <body class="swagger-section"> <!--NCSO script--> <script> //SET TITLE - START function pollData() { if(!(document.querySelector('#api_info .info_title') && document.querySelector('#api_info .info_title').innerText)) { setTimeout(pollData, 50); } else { setData(); } } function setData() { document.querySelector('[data-uxf-point="main-title"]').innerText = document.querySelector('#api_info .info_title').innerText; document.querySelector('#api_info .info_title').innerText = ''; } pollData(); //SET TITLE - END var __LOGIN_REST_STATUS = {OPEN: 'OPEN', SEND: 'SEND'}; var __loginPath = '/auth/tokens', __isLoginInProcess, __xAuthToken; function isAuthanticationRest(path) { return path.endsWith(__loginPath); } //Proxy requests - START //Proxy Open Method (function() { var proxiedOpen = window.XMLHttpRequest.prototype.open; window.XMLHttpRequest.prototype.open = function(method, path) { if(isAuthanticationRest(path)) { __isLoginInProcess = true; } else { __isLoginInProcess = false; } return proxiedOpen.apply(this, Array.prototype.slice.call(arguments)); }; })(); //Proxy Send Method - X-AUTH-STUFF (function() { var proxiedSend = window.XMLHttpRequest.prototype.send; window.XMLHttpRequest.prototype.send = function() { if(__isLoginInProcess) { proxyAuthanticationCallback(this); } return proxiedSend.apply(this, Array.prototype.slice.call(arguments)); }; })(); //Proxy Authantication Callback Method - X-AUTH-STUFF function proxyAuthanticationCallback(xhrObject) { var proxy = xhrObject.onreadystatechange; xhrObject.onreadystatechange = function() { if (xhrObject.readyState == 4) { if(xhrObject.status == 200 || xhrObject.status == 401) { window.swaggerUi.api.clientAuthorizations.remove('X-AUTH-TOKEN'); if(xhrObject.status == 200) { var key = xhrObject.getResponseHeader('x-auth-token'); if(key && key.trim() != "") { var apiKeyAuth = new SwaggerClient.ApiKeyAuthorization("X-AUTH-TOKEN", key, "header"); window.swaggerUi.api.clientAuthorizations.add("X-AUTH-TOKEN", apiKeyAuth); console.log("added x-auth-key ", key); } } } } return proxy.apply(xhrObject, Array.prototype.slice.call(arguments)); } } //Proxy Send Method - CUSTOM HEADERS STUFF (function () { var proxiedSend = window.XMLHttpRequest.prototype.send; window.XMLHttpRequest.prototype.send = function () { var headerItems = document.querySelectorAll('.custom-headers .headers-list .header-item'); if (headerItems) { Array.prototype.forEach.call(headerItems, function (header) { var headerName = header.querySelector('.header-name').value; var headerValue = header.querySelector('.header-value').value; if (headerName && headerValue) { this.setRequestHeader(headerName, headerValue); } }, this); } return proxiedSend.apply(this, Array.prototype.slice.call(arguments)); }; })(); //Proxy requests - END </script> <div data-uxf-point="nfv-header" class="nfv-header"> <div class="header-content-wrapper"> <div data-uxf-point="nfv-logo" class="nfv-logo"><a href="../ncso/landingpage.html">VENDOR</a></div> <div data-uxf-point="header-title" class="header-title"> <div data-uxf-point="main-title" class="main-title"></div> <div data-uxf-point="version-controller" class="version-select"></div> <div data-uxf-point="sub-title" class="sub-title"></div> </div> </div> </div> <div class="custom-headers"> <style> .custom-headers { margin-left: 124px; width: 500px; border: 1px solid #419EF1; } .custom-headers .headers-title { background-color: #0F6AB4; height: 24px; color: white; text-align: center; font-size: 1.2em; } .custom-headers .headers-list .header-item { display: flex; justify-content: space-around; padding: 10px 5px 0 5px; } .custom-headers .headers-list .header-item.default-item .header-col.header-delete { visibility: hidden; } .custom-headers .headers-list .header-item.default-item .header-col.header-name { pointer-events: none; } .custom-headers .headers-list .header-item .header-col.header-delete { cursor: pointer; align-self: center; } .custom-headers .add-header { text-align: right; padding: 5px; border-top: 1px solid #0F6AB4; margin-top: 10px; background-color: #E7F6EC; } .custom-headers .add-header .add-header-button, .custom-headers .add-header .reset-header-button { text-decoration: none; color: white; display: inline-block; width: 50px; font-size: 0.9em; text-align: center; padding: 7px 0 4px; -moz-border-radius: 2px; -webkit-border-radius: 2px; -o-border-radius: 2px; -ms-border-radius: 2px; -khtml-border-radius: 2px; border-radius: 2px; background-color: #0f6ab4; cursor: pointer; } .custom-headers .add-header .reset-header-button { } </style> <div class="headers-title">Custom Headers</div> <div class="headers-list"> <!--Dynamically add headers using addHeaderItem function--> </div> <div class="add-header"> <span class="reset-header-button" onclick="resetHeaderItems();">Reset</span> <span class="add-header-button" onclick="addHeaderItem();">Add</span> </div> <script> function addHeaderItem(defaultName, defaultValue) { var headerItemName = document.createElement('input'); headerItemName.type = 'text'; headerItemName.value = defaultName || ''; headerItemName.classList.add('header-col', 'header-name'); var headerItemValue = document.createElement('input'); headerItemValue.type = 'text'; headerItemValue.value = defaultValue || ''; headerItemValue.classList.add('header-col', 'header-value'); var headerItemDelete = document.createElement('div'); headerItemDelete.innerHTML = '&#10006;'; headerItemDelete.classList.add('header-col', 'header-delete'); var headerItem = document.createElement('div'); headerItem.classList.add('header-item'); headerItem.appendChild(headerItemName); headerItem.appendChild(headerItemValue); headerItem.appendChild(headerItemDelete); headerItemDelete.onclick = function () { headersList.removeChild(headerItem); }; var headersList = document.querySelector('.custom-headers .headers-list'); headersList.appendChild(headerItem); return headerItem; } function resetHeaderItems() { var headersList = document.querySelector('.custom-headers .headers-list'); while (headersList.firstChild) { headersList.removeChild(headersList.firstChild); } var defaultHeaderItem = addHeaderItem('USER_ID'); defaultHeaderItem.classList.add('default-item'); } resetHeaderItems(); </script> </div> <div id="message-bar" class="swagger-ui-wrap" data-sw-translate>&nbsp;</div> <div id="swagger-ui-container" class="swagger-ui-wrap"></div> </body> </html>