Skip to content

Commit

Permalink
Take the subsystems.xml and template.xml unchanged or transformed from
Browse files Browse the repository at this point in the history
the dependency feature packs
  • Loading branch information
ppalaga committed Feb 27, 2016
1 parent fd754cd commit c4d8075
Show file tree
Hide file tree
Showing 11 changed files with 356 additions and 240 deletions.
10 changes: 5 additions & 5 deletions feature-pack/feature-pack-build.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2015 Red Hat, Inc. and/or its affiliates
Copyright 2015-2016 Red Hat, Inc. and/or its affiliates
and other contributors as indicated by the @author tags.
Licensed under the Apache License, Version 2.0 (the "License");
Expand All @@ -25,14 +25,14 @@
</dependencies>

<config>
<standalone template="configuration/standalone/template.xml" subsystems="configuration/standalone/subsystems.xml"
<standalone template="configuration/standalone/hawkular-accounts-template.xml" subsystems="configuration/standalone/hawkular-accounts-subsystems.xml"
output-file="standalone/configuration/standalone.xml" />
</config>

<copy-artifacts>
<copy-artifact artifact="org.hawkular.accounts:hawkular-accounts" to-location="modules/org/hawkular/nest/main/deployments/hawkular-accounts.war" />
<copy-artifact artifact="org.hawkular.accounts:hawkular-accounts-events-backend" to-location="modules/org/hawkular/nest/main/deployments/hawkular-accounts-events-backend.war" />
<copy-artifact artifact="org.keycloak.secretstore:secret-store" to-location="modules/org/hawkular/nest/main/deployments/secret-store.war" />
<copy-artifact artifact="org.hawkular.accounts:hawkular-accounts" to-location="modules/system/layers/hawkular/org/hawkular/nest/main/deployments/hawkular-accounts.war" />
<copy-artifact artifact="org.hawkular.accounts:hawkular-accounts-events-backend" to-location="modules/system/layers/hawkular/org/hawkular/nest/main/deployments/hawkular-accounts-events-backend.war" />
<copy-artifact artifact="org.keycloak.secretstore:secret-store" to-location="modules/system/layers/hawkular/org/hawkular/nest/main/deployments/secret-store.war" />
</copy-artifacts>

</build>
206 changes: 155 additions & 51 deletions feature-pack/pom.xml
Expand Up @@ -94,7 +94,6 @@
<dependency>
<groupId>org.hawkular.commons</groupId>
<artifactId>hawkular-nest-feature-pack</artifactId>
<version>${version.org.hawkular.commons}</version>
<type>zip</type>
<exclusions>
<exclusion>
Expand All @@ -107,7 +106,6 @@
<dependency>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-server-feature-pack</artifactId>
<version>${version.org.keycloak}</version>
<type>zip</type>
<exclusions>
<exclusion>
Expand All @@ -120,7 +118,6 @@
<dependency>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-adapter-feature-pack</artifactId>
<version>${version.org.keycloak}</version>
<type>zip</type>
<exclusions>
<exclusion>
Expand All @@ -135,44 +132,6 @@
<build>
<plugins>

<plugin>
<groupId>org.wildfly.build</groupId>
<artifactId>wildfly-feature-pack-build-maven-plugin</artifactId>
<executions>
<execution>
<id>feature-pack-build</id>
<phase>compile</phase>
<goals>
<goal>build</goal>
</goals>
<configuration>
<config-file>feature-pack-build.xml</config-file>
</configuration>
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<id>assemble</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<descriptors>
<descriptor>assembly.xml</descriptor>
</descriptors>
<appendAssemblyId>false</appendAssemblyId>
<tarLongFileMode>gnu</tarLongFileMode>
</configuration>
</execution>
</executions>
</plugin>

<!-- Unpack the upstream artifacts that host standalone*.xml stubs that we want to adapt in the next steps -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand All @@ -185,50 +144,134 @@
<goal>unpack</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/upstream-subsystem-templates</outputDirectory>
<includes>subsystem-templates/*.xml</includes>
<artifactItems>
<artifactItem>
<groupId>org.hawkular.commons</groupId>
<artifactId>hawkular-nest-feature-pack</artifactId>
<type>zip</type>
<includes>**/*.xml</includes>
<outputDirectory>${project.build.directory}/feature-pack-resources-hawkular-nest</outputDirectory>
</artifactItem>
<artifactItem>
<groupId>org.hawkular.commons</groupId>
<artifactId>hawkular-nest-feature-pack</artifactId>
<type>zip</type>
<includes>subsystem-templates/*.xml</includes>
<!-- It is probably a bug in the WF provisioning plugin that we need to unpack nest.xml
and effectivelly repack it in our FP. WF provisioning plugin should take care to
look for feature-pack-resources/*.xml also in FPs that the primary FP depends on -->
<outputDirectory>${project.build.directory}/feature-pack-resources</outputDirectory>
</artifactItem>
<artifactItem>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-server-feature-pack</artifactId>
<type>zip</type>
<includes>**/*.xml</includes>
<outputDirectory>${project.build.directory}/feature-pack-resources-keycloak-server</outputDirectory>
</artifactItem>
<artifactItem>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-adapter-feature-pack</artifactId>
<type>zip</type>
<includes>**/*.xml</includes>
<outputDirectory>${project.build.directory}/feature-pack-resources-keycloak-adapter</outputDirectory>
</artifactItem>

<artifactItem>
<groupId>org.wildfly</groupId>
<artifactId>wildfly-ejb3</artifactId>
<type>jar</type>
<version>${version.org.wildfly}</version>
<includes>subsystem-templates/*.xml</includes>
<outputDirectory>${project.build.directory}/upstream-subsystem-templates</outputDirectory>
</artifactItem>
<artifactItem>
<groupId>org.wildfly</groupId>
<artifactId>wildfly-messaging-activemq</artifactId>
<version>${version.org.wildfly}</version>
<includes>subsystem-templates/*.xml</includes>
<outputDirectory>${project.build.directory}/upstream-subsystem-templates</outputDirectory>
</artifactItem>
<artifactItem>
<groupId>org.wildfly</groupId>
<artifactId>wildfly-security</artifactId>
<version>${version.org.wildfly}</version>
<includes>subsystem-templates/*.xml</includes>
<outputDirectory>${project.build.directory}/upstream-subsystem-templates</outputDirectory>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>

<!-- Generate the standalone*.xml stubs from the upstream originals using XSL transformations -->
<!-- Enhance various *.xml files taken from our dependencies using XSL transformations -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>xml-maven-plugin</artifactId>
<executions>
<execution>
<id>transform-standalone-xml</id>
<phase>prepare-package</phase>
<id>transform-xmls</id>
<phase>generate-resources</phase>
<goals>
<goal>transform</goal>
</goals>
<configuration>
<transformationSets>
<transformationSet>
<dir>${project.build.directory}/feature-pack-resources-hawkular-nest</dir>
<stylesheet>${basedir}/src/main/xsl/configuration/standalone/hawkular-accounts-subsystems.xsl</stylesheet>
<parameters>
<parameter>
<name>kc-adapter-subsystems-path</name>
<value>${project.build.directory}/feature-pack-resources-keycloak-adapter/configuration/standalone/subsystems.xml</value>
</parameter>
<parameter>
<name>kc-server-subsystems-path</name>
<value>${project.build.directory}/feature-pack-resources-keycloak-server/configuration/standalone/subsystems.xml</value>
</parameter>
</parameters>
<includes>
<include>configuration/standalone/hawkular-nest-subsystems.xml</include>
</includes>
<outputDir>${project.build.directory}/feature-pack-resources</outputDir>
<fileMappers>
<fileMapper implementation="org.codehaus.plexus.components.io.filemappers.RegExpFileMapper">
<pattern>^.*$</pattern>
<replacement>configuration/standalone/hawkular-accounts-subsystems.xml</replacement>
</fileMapper>
</fileMappers>
</transformationSet>
<transformationSet>
<dir>${project.build.directory}/feature-pack-resources-hawkular-nest</dir>
<stylesheet>${basedir}/src/main/xsl/configuration/standalone/hawkular-accounts-template.xsl</stylesheet>
<parameters>
<parameter>
<name>kc-adapter-template-path</name>
<value>${project.build.directory}/feature-pack-resources-keycloak-adapter/configuration/standalone/template.xml</value>
</parameter>
<parameter>
<name>kc-server-template-path</name>
<value>${project.build.directory}/feature-pack-resources-keycloak-server/configuration/standalone/template.xml</value>
</parameter>
</parameters>
<includes>
<include>configuration/standalone/hawkular-nest-template.xml</include>
</includes>
<outputDir>${project.build.directory}/feature-pack-resources</outputDir>
<fileMappers>
<fileMapper implementation="org.codehaus.plexus.components.io.filemappers.RegExpFileMapper">
<pattern>^.*$</pattern>
<replacement>configuration/standalone/hawkular-accounts-template.xml</replacement>
</fileMapper>
</fileMappers>
</transformationSet>

<transformationSet>
<dir>${project.build.directory}/upstream-subsystem-templates</dir>
<stylesheet>${basedir}/src/main/xsl/subsystem-templates/hawkular-accounts-ejb3.xsl</stylesheet>
<includes>
<include>subsystem-templates/ejb3.xml</include>
</includes>
<outputDir>${project.build.directory}/${project.artifactId}-${project.version}</outputDir>
<outputDir>${project.build.directory}/feature-pack-resources</outputDir>
<fileMappers>
<fileMapper implementation="org.codehaus.plexus.components.io.filemappers.RegExpFileMapper">
<pattern>^subsystem-templates/(.*)\.xml$</pattern>
Expand All @@ -242,7 +285,7 @@
<includes>
<include>subsystem-templates/messaging-activemq.xml</include>
</includes>
<outputDir>${project.build.directory}/${project.artifactId}-${project.version}</outputDir>
<outputDir>${project.build.directory}/feature-pack-resources</outputDir>
<fileMappers>
<fileMapper implementation="org.codehaus.plexus.components.io.filemappers.RegExpFileMapper">
<pattern>^subsystem-templates/(.*)\.xml$</pattern>
Expand All @@ -256,7 +299,7 @@
<includes>
<include>subsystem-templates/security.xml</include>
</includes>
<outputDir>${project.build.directory}/${project.artifactId}-${project.version}</outputDir>
<outputDir>${project.build.directory}/feature-pack-resources</outputDir>
<fileMappers>
<fileMapper implementation="org.codehaus.plexus.components.io.filemappers.RegExpFileMapper">
<pattern>^subsystem-templates/(.*)\.xml$</pattern>
Expand All @@ -269,6 +312,67 @@
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<executions>
<execution>
<id>copy-resources</id>
<phase>generate-resources</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/feature-pack-resources</outputDirectory>
<resources>
<resource>
<directory>${basedir}/src/main/resources</directory>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.wildfly.build</groupId>
<artifactId>wildfly-feature-pack-build-maven-plugin</artifactId>
<executions>
<execution>
<id>feature-pack-build</id>
<phase>compile</phase>
<goals>
<goal>build</goal>
</goals>
<configuration>
<resources-dir>target/feature-pack-resources</resources-dir>
</configuration>
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<id>assemble</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<descriptors>
<descriptor>assembly.xml</descriptor>
</descriptors>
<appendAssemblyId>false</appendAssemblyId>
<tarLongFileMode>gnu</tarLongFileMode>
</configuration>
</execution>
</executions>
</plugin>

</plugins>
</build>
</project>

This file was deleted.

This file was deleted.

0 comments on commit c4d8075

Please sign in to comment.