keycloak-aplcache

Recovered as7 dist

11/16/2013 10:04:10 AM

Changes

dist/pom.xml 6(+0 -6)

dist-as7/build.xml 37(+37 -0)

dist-as7/pom.xml 118(+118 -0)

pom.xml 2(+2 -0)

Details

dist/pom.xml 6(+0 -6)

diff --git a/dist/pom.xml b/dist/pom.xml
index 2876183..23e0a71 100644
--- a/dist/pom.xml
+++ b/dist/pom.xml
@@ -20,12 +20,6 @@
     <profiles>
         <profile>
             <id>release</id>
-            <activation>
-                <property>
-                    <name>release</name>
-                    <value>true</value>
-                </property>
-            </activation>
 
             <dependencies>
                 <dependency>
diff --git a/dist-as7/assembly.xml b/dist-as7/assembly.xml
new file mode 100644
index 0000000..62241e2
--- /dev/null
+++ b/dist-as7/assembly.xml
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<assembly xmlns="urn:maven:assembly:1.1.0-SNAPSHOT">
+    <id>distro</id>
+
+    <formats>
+        <format>zip</format>
+        <format>tar.gz</format>
+    </formats>
+
+    <includeBaseDirectory>false</includeBaseDirectory>
+
+    <fileSets>
+        <fileSet>
+            <directory>${build.target.dir}</directory>
+            <outputDirectory>keycloak-${project.version}</outputDirectory>
+            <excludes>
+                <exclude>**/*.sh</exclude>
+                <exclude>domain/tmp/auth</exclude>
+                <exclude>standalone/tmp/auth</exclude>
+                <exclude>**/*-users.properties</exclude>
+            </excludes>
+        </fileSet>
+        <fileSet>
+            <directory>${build.target.dir}</directory>
+            <outputDirectory>keycloak-${project.version}</outputDirectory>
+            <includes>
+                <include>**/*.sh</include>
+            </includes>
+            <fileMode>0755</fileMode>
+        </fileSet>
+        <fileSet>
+            <directory>${build.target.dir}</directory>
+            <outputDirectory>keycloak-${project.version}</outputDirectory>
+            <includes>
+                <include>**/*-users.properties</include>
+            </includes>
+            <fileMode>0600</fileMode>
+        </fileSet>
+        <fileSet>
+            <directory>${build.target.dir}</directory>
+            <outputDirectory>keycloak-${project.version}</outputDirectory>
+            <includes>
+                <include>domain/tmp/auth</include>
+                <include>standalone/tmp/auth</include>
+            </includes>
+            <directoryMode>0700</directoryMode>
+        </fileSet>
+    </fileSets>
+
+</assembly>

dist-as7/build.xml 37(+37 -0)

diff --git a/dist-as7/build.xml b/dist-as7/build.xml
new file mode 100644
index 0000000..c9bfd95
--- /dev/null
+++ b/dist-as7/build.xml
@@ -0,0 +1,37 @@
+<project name="keycloak-dist" basedir=".">
+    <target name="jboss">
+        <unzip src="${org.jboss.as:jboss-as-dist:zip}" dest="${project.build.directory}"/>
+        <chmod perm="755">
+            <fileset dir="${project.build.directory}/jboss-as-${jboss.version}/bin">
+                <include name="**/*.sh"/>
+            </fileset>
+        </chmod>
+        <move todir="${build.target.dir}" overwrite="true">
+            <fileset dir="${project.build.directory}/jboss-as-${jboss.version}">
+                <include name="**/*"/>
+            </fileset>
+        </move>
+        <delete dir="${project.build.directory}/jboss-as-${jboss.version}"/>
+    </target>
+
+    <target name="resteasy-modules">
+        <get src="http://sourceforge.net/projects/resteasy/files/Resteasy%20JAX-RS/${resteasy.version}/resteasy-jaxrs-${resteasy.version}-all.zip"
+             dest="${project.build.directory}" skipexisting="true"/>
+        <unzip src="${project.build.directory}/resteasy-jaxrs-${resteasy.version}-all.zip"
+               dest="${project.build.directory}">
+            <patternset>
+                <include name="resteasy-jaxrs-${resteasy.version}/resteasy-jboss-modules-${resteasy.version}.zip"/>
+            </patternset>
+            <mapper type="flatten"/>
+        </unzip>
+        <unzip src="${project.build.directory}/resteasy-jboss-modules-${resteasy.version}.zip"
+               dest="${build.target.dir}/modules"/>
+    </target>
+
+    <target name="keycloak-server">
+        <copy file="${org.keycloak:keycloak-server:war}"
+              tofile="${build.target.dir}/standalone/deployments/auth-server.war" overwrite="true"/>
+    </target>
+
+    <target name="all" depends="jboss, resteasy-modules, keycloak-server"/>
+</project>

dist-as7/pom.xml 118(+118 -0)

diff --git a/dist-as7/pom.xml b/dist-as7/pom.xml
new file mode 100644
index 0000000..a3aa146
--- /dev/null
+++ b/dist-as7/pom.xml
@@ -0,0 +1,118 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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>
+        <groupId>org.keycloak</groupId>
+        <artifactId>keycloak-parent</artifactId>
+        <version>1.0-alpha-1</version>
+    </parent>
+
+    <artifactId>keycloak-dist-as7</artifactId>
+    <name>Keycloak Dist AS7</name>
+    <packaging>pom</packaging>
+
+    <properties>
+        <build.target.dir>${project.build.directory}/keycloak-${project.version}</build.target.dir>
+    </properties>
+
+    <profiles>
+        <profile>
+            <id>release-as7</id>
+
+            <dependencies>
+                <dependency>
+                    <groupId>org.keycloak</groupId>
+                    <artifactId>keycloak-server</artifactId>
+                    <version>1.0-alpha-1</version>
+                    <type>war</type>
+                </dependency>
+                <dependency>
+                    <groupId>org.jboss.as</groupId>
+                    <artifactId>jboss-as-dist</artifactId>
+                    <version>${jboss.version}</version>
+                    <type>zip</type>
+                </dependency>
+            </dependencies>
+
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>org.apache.maven.plugins</groupId>
+                        <artifactId>maven-antrun-plugin</artifactId>
+                        <version>1.7</version>
+                        <executions>
+                            <execution>
+                                <id>build</id>
+                                <phase>compile</phase>
+                                <configuration>
+                                    <target>
+                                        <ant antfile="build.xml" inheritRefs="false">
+                                            <target name="all"/>
+                                        </ant>
+                                    </target>
+                                </configuration>
+                                <goals>
+                                    <goal>run</goal>
+                                </goals>
+                            </execution>
+                        </executions>
+                    </plugin>
+
+                    <plugin>
+                        <groupId>org.codehaus.mojo</groupId>
+                        <artifactId>xml-maven-plugin</artifactId>
+                        <version>1.0</version>
+                        <executions>
+                            <execution>
+                                <id>generate-resources</id>
+                                <phase>package</phase>
+                                <goals>
+                                    <goal>transform</goal>
+                                </goals>
+                                <configuration>
+                                    <transformationSets>
+                                        <transformationSet>
+                                            <dir>${build.target.dir}/standalone/configuration</dir>
+                                            <stylesheet>src/main/xslt/standalone.xsl</stylesheet>
+                                            <includes>
+                                                <include>standalone*.xml</include>
+                                            </includes>
+                                            <outputDir>${build.target.dir}/standalone/configuration</outputDir>
+                                        </transformationSet>
+                                    </transformationSets>
+                                    <targetDirectory>${project.build.directory}</targetDirectory>
+                                </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>
+                                    <finalName>keycloak-${project.version}</finalName>
+                                    <appendAssemblyId>false</appendAssemblyId>
+                                    <outputDirectory>target/</outputDirectory>
+                                    <workDirectory>target/assembly/work</workDirectory>
+                                    <tarLongFileMode>gnu</tarLongFileMode>
+                                </configuration>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+    </profiles>
+</project>
diff --git a/dist-as7/src/main/xslt/standalone.xsl b/dist-as7/src/main/xslt/standalone.xsl
new file mode 100644
index 0000000..711b71f
--- /dev/null
+++ b/dist-as7/src/main/xslt/standalone.xsl
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:xalan="http://xml.apache.org/xalan"
+                xmlns:j="urn:jboss:domain:1.3"
+                version="2.0"
+                exclude-result-prefixes="xalan j">
+
+    <xsl:param name="config"/>
+
+    <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes" xalan:indent-amount="4" standalone="no"/>
+    <xsl:strip-space elements="*"/>
+
+    <xsl:template match="node()[name(.)='datasources']">
+        <xsl:copy>
+            <xsl:apply-templates select="node()|@*"/>
+            <datasource jndi-name="java:jboss/datasources/KeycloakDS" pool-name="KeycloakDS" enabled="true" use-java-context="true">
+                <connection-url>jdbc:h2:${jboss.server.data.dir}/keycloak;DB_CLOSE_DELAY=-1</connection-url>
+                <driver>h2</driver>
+                <security>
+                    <user-name>sa</user-name>
+                    <password>sa</password>
+                </security>
+            </datasource>
+        </xsl:copy>
+    </xsl:template>
+
+    <xsl:template match="@*|node()">
+        <xsl:copy>
+            <xsl:apply-templates select="@*|node()" />
+        </xsl:copy>
+    </xsl:template>
+
+</xsl:stylesheet>
\ No newline at end of file

pom.xml 2(+2 -0)

diff --git a/pom.xml b/pom.xml
index 8155a68..e3d08f5 100755
--- a/pom.xml
+++ b/pom.xml
@@ -20,6 +20,7 @@
         <dom4j.version>1.6.1</dom4j.version>
         <mysql.version>5.1.25</mysql.version>
         <slf4j.version>1.6.1</slf4j.version>
+        <jboss.version>7.1.1.Final</jboss.version>
         <wildfly.version>8.0.0.Beta1</wildfly.version>
     </properties>
 
@@ -75,6 +76,7 @@
         <module>testsuite</module>
         <module>server</module>
         <module>dist</module>
+        <module>dist-as7</module>    
     </modules>
 
     <dependencyManagement>