This repository has been archived by the owner on Jul 11, 2022. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[BZ 1313863] Add support for patching of EAP7 instances, clear some g…
…arbage
- Loading branch information
Michael Burman
authored and
Simeon Pinder
committed
Mar 29, 2016
1 parent
550c3f0
commit b2d9540
Showing
13 changed files
with
467 additions
and
52 deletions.
There are no files selected for viewing
This file contains 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 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
66 changes: 66 additions & 0 deletions
66
modules/common/wfly-patch-parser/src/main/java/org/rhq/common/wildfly/PatchProductType.java
This file contains 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,66 @@ | ||
/* | ||
* RHQ Management Platform | ||
* Copyright (C) 2005-2016 Red Hat, Inc. | ||
* All rights reserved. | ||
* | ||
* This program is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation version 2 of the License. | ||
* | ||
* 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 General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program; if not, write to the Free Software Foundation, Inc, | ||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA | ||
*/ | ||
package org.rhq.common.wildfly; | ||
|
||
/** | ||
* Simplified and combined version of JBossProductType as defined in the jboss-as-7 and wfly-10 agent plugins | ||
* | ||
* @author Michael Burman | ||
*/ | ||
public enum PatchProductType { | ||
|
||
EAP("EAP", "JBoss EAP 6", "JBoss Enterprise Application Platform 6", "EAP"), | ||
EAP7("EAP", "EAP 7", "JBoss Enterprise Application Platform 7", "JBoss EAP"), | ||
ISPN("ISPN", "Infinispan Server", "Infinispan Server", "Infinispan Server"), | ||
JDG("JDG", "JBoss JDG 6", "JBoss Data Grid 6", "Data Grid"), | ||
JPP("JPP", "JBoss JPP 6", "JBoss Portal Platform 6", "Portal Platform"), | ||
SOA("SOA-P", "JBoss SOA-P 6", "Red Hat JBoss Fuse Service Works", "Red Hat JBoss Fuse Service Works"), | ||
BRMS("BRMS", "JBoss BRMS", "Red Hat JBoss BRMS", "BRMS"), | ||
BPMS("BPM Suite", "JBoss BPM Suite", "Red Hat JBoss BPM Suite", "BPM Suite"), | ||
JDV("JDV", "Data Virt", "Red Hat JBoss Data Virtualization", "Red Hat JBoss Data Virtualization"), | ||
WILDFLY10("WildFly", "WildFly 10", "WildFly Application Server 10", "WildFly Full"); | ||
|
||
public final String SHORT_NAME; | ||
public final String NAME; | ||
public final String FULL_NAME; | ||
/** The value the server returns for the "product-name" attribute of the root resource. */ | ||
public final String PRODUCT_NAME; | ||
|
||
PatchProductType(String shortName, String name, String fullName, String productName) { | ||
this.SHORT_NAME = shortName; | ||
this.NAME = name; | ||
this.FULL_NAME = fullName; | ||
this.PRODUCT_NAME = productName; | ||
} | ||
|
||
public static PatchProductType getValueByProductName(String productName) { | ||
for (PatchProductType productType : PatchProductType.values()) { | ||
if (productType.PRODUCT_NAME.equals(productName)) { | ||
return productType; | ||
} | ||
} | ||
return null; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return this.NAME; | ||
} | ||
|
||
} |
This file contains 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
137 changes: 137 additions & 0 deletions
137
modules/enterprise/server/plugins/wfly-10-patch-bundle/pom.xml
This file contains 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,137 @@ | ||
<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/maven-v4_0_0.xsd"> | ||
|
||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<parent> | ||
<groupId>org.rhq</groupId> | ||
<artifactId>rhq-enterprise-server-plugins-parent</artifactId> | ||
<version>4.14.0-SNAPSHOT</version> | ||
</parent> | ||
|
||
<artifactId>rhq-serverplugin-wfly-10-patch-bundle</artifactId> | ||
<packaging>jar</packaging> | ||
|
||
<name>RHQ Wildfly 10 Patch Bundle Server Plugin</name> | ||
<description>Server side plugin that manages Wildfly 10 patch files and exposes them as RHQ bundles</description> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>org.rhq</groupId> | ||
<artifactId>rhq-wfly-patch-parser</artifactId> | ||
<version>${project.version}</version> | ||
</dependency> | ||
</dependencies> | ||
|
||
<build> | ||
<plugins> | ||
|
||
<plugin> | ||
<artifactId>maven-surefire-plugin</artifactId> | ||
<configuration> | ||
<excludedGroups>${rhq.testng.excludedGroups}</excludedGroups> | ||
</configuration> | ||
</plugin> | ||
|
||
<plugin> | ||
<artifactId>maven-dependency-plugin</artifactId> | ||
<executions> | ||
<execution> | ||
<id>copy-rhq-plugins</id> | ||
<phase>process-resources</phase> | ||
<goals> | ||
<goal>copy</goal> | ||
</goals> | ||
<configuration> | ||
<artifactItems> | ||
|
||
<artifactItem> | ||
<groupId>org.rhq</groupId> | ||
<artifactId>rhq-wfly-patch-parser</artifactId> | ||
<version>${project.version}</version> | ||
</artifactItem> | ||
</artifactItems> | ||
<outputDirectory>${project.build.outputDirectory}/lib</outputDirectory> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
|
||
<profiles> | ||
|
||
<profile> | ||
<id>dev</id> | ||
|
||
<properties> | ||
<rhq.rootDir>../../../../..</rhq.rootDir> | ||
<rhq.containerDir>${rhq.rootDir}/${rhq.devContainerServerPath}</rhq.containerDir> | ||
<rhq.deploymentDir>${rhq.containerDir}/${rhq.serverPluginDir}</rhq.deploymentDir> | ||
</properties> | ||
|
||
<build> | ||
<plugins> | ||
|
||
<plugin> | ||
<artifactId>maven-antrun-plugin</artifactId> | ||
<executions> | ||
|
||
<execution> | ||
<id>deploy</id> | ||
<phase>compile</phase> | ||
<configuration> | ||
<target> | ||
<mkdir dir="${rhq.deploymentDir}" /> | ||
<property name="deployment.file" location="${rhq.deploymentDir}/${project.build.finalName}.jar" /> | ||
<echo>*** Updating ${deployment.file}...</echo> | ||
<jar destfile="${deployment.file}" basedir="${project.build.outputDirectory}" /> | ||
</target> | ||
</configuration> | ||
<goals> | ||
<goal>run</goal> | ||
</goals> | ||
</execution> | ||
|
||
<execution> | ||
<id>undeploy</id> | ||
<phase>clean</phase> | ||
<configuration> | ||
<target> | ||
<property name="deployment.file" location="${rhq.deploymentDir}/${project.build.finalName}.jar" /> | ||
<echo>*** Deleting ${deployment.file}...</echo> | ||
<delete file="${deployment.file}" /> | ||
</target> | ||
</configuration> | ||
<goals> | ||
<goal>run</goal> | ||
</goals> | ||
</execution> | ||
|
||
<execution> | ||
<id>deploy-jar-meta-inf</id> | ||
<phase>package</phase> | ||
<configuration> | ||
<target> | ||
<property name="deployment.file" location="${rhq.deploymentDir}/${project.build.finalName}.jar" /> | ||
<echo>*** Updating META-INF dir in ${deployment.file}...</echo> | ||
<unjar src="${project.build.directory}/${project.build.finalName}.jar" dest="${project.build.outputDirectory}"> | ||
<patternset> | ||
<include name="META-INF/**" /> | ||
</patternset> | ||
</unjar> | ||
<jar destfile="${deployment.file}" manifest="${project.build.outputDirectory}/META-INF/MANIFEST.MF" update="true"> | ||
</jar> | ||
</target> | ||
</configuration> | ||
<goals> | ||
<goal>run</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</profile> | ||
</profiles> | ||
|
||
</project> |
Oops, something went wrong.