Skip to content

Commit

Permalink
Get rid of the feature-pack-resources and the module.xml definition.
Browse files Browse the repository at this point in the history
This can be simplified into a single module with the feature-pack-plugin
1.1.2 and newer (which we're now using).
  • Loading branch information
metlos committed Feb 4, 2016
1 parent 17960ac commit 3dfe856
Show file tree
Hide file tree
Showing 9 changed files with 103 additions and 193 deletions.
157 changes: 0 additions & 157 deletions feature-pack-resources/pom.xml

This file was deleted.

8 changes: 5 additions & 3 deletions feature-pack/assembly.xml
Original file line number Diff line number Diff line change
@@ -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 Down Expand Up @@ -29,16 +29,18 @@
<fileSet>
<directory>target/${project.artifactId}-${project.version}</directory>
<excludes>
<!-- hawkular-realm*json needs filtering -->
<!-- hawkular-realm*json and the adapter.xml need filtering -->
<exclude>**/hawkular-realm*json</exclude>
<exclude>**/hawkular-accounts-keycloak-adapter.xml</exclude>
</excludes>
<outputDirectory/>
</fileSet>
<fileSet>
<directory>target/${project.artifactId}-${project.version}</directory>
<includes>
<!-- hawkular-realm*json needs filtering -->
<!-- hawkular-realm*json and the adapter.xml need filtering -->
<include>**/hawkular-realm*json</include>
<include>**/hawkular-accounts-keycloak-adapter.xml</include>
</includes>
<filtered>true</filtered>
<outputDirectory/>
Expand Down
103 changes: 97 additions & 6 deletions feature-pack/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,6 @@
</exclusions>
</dependency>

<dependency>
<groupId>org.hawkular.accounts</groupId>
<artifactId>hawkular-accounts-feature-pack-resources</artifactId>
<version>2.0.19.Final-SNAPSHOT</version>
</dependency>

<dependency>
<groupId>org.hawkular.accounts</groupId>
<artifactId>hawkular-accounts-keycloak-event-listener-rest</artifactId>
Expand Down Expand Up @@ -178,6 +172,103 @@
</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>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>unpack-deps</id>
<phase>generate-resources</phase>
<goals>
<goal>unpack</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/upstream-subsystem-templates</outputDirectory>
<includes>subsystem-templates/*.xml</includes>
<artifactItems>
<artifactItem>
<groupId>org.wildfly</groupId>
<artifactId>wildfly-ejb3</artifactId>
<version>${version.org.wildfly}</version>
</artifactItem>
<artifactItem>
<groupId>org.wildfly</groupId>
<artifactId>wildfly-messaging-activemq</artifactId>
<version>${version.org.wildfly}</version>
</artifactItem>
<artifactItem>
<groupId>org.wildfly</groupId>
<artifactId>wildfly-security</artifactId>
<version>${version.org.wildfly}</version>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>

<!-- Generate the standalone*.xml stubs from the upstream originals 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>
<goals>
<goal>transform</goal>
</goals>
<configuration>
<transformationSets>
<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>
<fileMappers>
<fileMapper implementation="org.codehaus.plexus.components.io.filemappers.RegExpFileMapper">
<pattern>^subsystem-templates/(.*)\.xml$</pattern>
<replacement>subsystem-templates/hawkular-accounts-$1.xml</replacement>
</fileMapper>
</fileMappers>
</transformationSet>
<transformationSet>
<dir>${project.build.directory}/upstream-subsystem-templates</dir>
<stylesheet>${basedir}/src/main/xsl/subsystem-templates/hawkular-accounts-messaging-activemq.xsl</stylesheet>
<includes>
<include>subsystem-templates/messaging-activemq.xml</include>
</includes>
<outputDir>${project.build.directory}/${project.artifactId}-${project.version}</outputDir>
<fileMappers>
<fileMapper implementation="org.codehaus.plexus.components.io.filemappers.RegExpFileMapper">
<pattern>^subsystem-templates/(.*)\.xml$</pattern>
<replacement>subsystem-templates/hawkular-accounts-$1.xml</replacement>
</fileMapper>
</fileMappers>
</transformationSet>
<transformationSet>
<dir>${project.build.directory}/upstream-subsystem-templates</dir>
<stylesheet>${basedir}/src/main/xsl/subsystem-templates/hawkular-accounts-security.xsl</stylesheet>
<includes>
<include>subsystem-templates/security.xml</include>
</includes>
<outputDir>${project.build.directory}/${project.artifactId}-${project.version}</outputDir>
<fileMappers>
<fileMapper implementation="org.codehaus.plexus.components.io.filemappers.RegExpFileMapper">
<pattern>^subsystem-templates/(.*)\.xml$</pattern>
<replacement>subsystem-templates/hawkular-accounts-$1.xml</replacement>
</fileMapper>
</fileMappers>
</transformationSet>
</transformationSets>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

This file was deleted.

Original file line number Diff line number Diff line change
@@ -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 Down
1 change: 0 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
<module>keycloak-event-listener-rest</module>
<module>keycloak-event-listener-jms</module>
<module>keycloak-theme</module>
<module>feature-pack-resources</module>
<module>feature-pack</module>
<module>integration-tests</module>
<module>sample</module>
Expand Down

0 comments on commit 3dfe856

Please sign in to comment.