Hi
I have a maven project that is in charge of create the tomcat distribution
for keycloak.
Until version 1.2.0-Beta1 we have used keycloak-server.war , but when I try
to migrate to keycloak 1.3.1-Final , this dependency apparently does not
exist any more.
<artifactItem>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-server</artifactId>
<version>$1.3.1-Final</version>
<type>war</type>
<outputDirectory>${outputDirectoryForWar}</outputDirectory>
</artifactItem>
Someone could help me with this issue ?
where I could find the server war now or what is the new name for this
dependency?
Thanks and regards.
Pablo Gore
Here is my pom.xml
<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.keycloak</groupId>
<artifactId>keycloak-parent</artifactId>
<version>1.3.1-Final</version>
</parent>
<artifactId>keycloak-tomcat-dist</artifactId>
<packaging>pom</packaging>
<name>Tomcat 8 with Keycloack</name>
<version>${project.parent.version}-1.0.4</version>
<description/>
<properties>
<!-- Versions -->
<tomcat.version>8.0.20</tomcat.version>
<jax.version>2.3.7.Final</jax.version>
<jackson.version>1.9.9</jackson.version>
<hibernate.version>4.2.7.SP1</hibernate.version>
<!-- Locations -->
<outputDirectory>${project.build.directory}/unpacked</outputDirectory>
<outputDirectoryConf>${outputDirectory}/apache-tomcat-${tomcat.version}/conf</outputDirectoryConf>
<outputDirectoryForWar>${outputDirectory}/apache-tomcat-${tomcat.version}/webapps/keycloak
</outputDirectoryForWar>
<outputDirectoryForLibs>${outputDirectory}/apache-tomcat-${tomcat.version}/lib</outputDirectoryForLibs>
<configFile>${outputDirectoryForWar}/WEB-INF/classes/META-INF/keycloak-server.json</configFile>
</properties>
<dependencies/>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<!-- Get Tomcat -->
<execution>
<id>unpack</id>
<phase>prepare-package</phase>
<goals>
<goal>unpack</goal>
</goals>
<configuration>
<!--useJvmChmod>false</useJvmChmod-->
<artifactItems>
<artifactItem>
<groupId>org.apache.tomcat</groupId>
<artifactId>tomcat</artifactId>
<version>${tomcat.version}</version>
<type>tar.gz</type>
<outputDirectory>${outputDirectory}</outputDirectory>
</artifactItem>
</artifactItems>
</configuration>
</execution>
<!-- Get keycloak -->
<execution>
<id>get-keycloak</id>
<phase>prepare-package</phase>
<goals>
<goal>unpack</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-server</artifactId>
<version>${project.parent.version}</version>
<type>war</type>
<outputDirectory>${outputDirectoryForWar}</outputDirectory>
</artifactItem>
</artifactItems>
</configuration>
</execution>
<!-- Get dependencies -->
<execution>
<id>mimic-jboss-6.2</id>
<phase>prepare-package</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<artifactItems>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.2.6</version>
<type>jar</type>
<outputDirectory>${outputDirectoryForLibs}</outputDirectory>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpcore</artifactId>
<version>4.2.5</version>
<type>jar</type>
<outputDirectory>${outputDirectoryForLibs}</outputDirectory>
</dependency>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.1.1</version>
<type>jar</type>
<outputDirectory>${outputDirectoryForLibs}</outputDirectory>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.1</version>
<type>jar</type>
<outputDirectory>${outputDirectoryForLibs}</outputDirectory>
</dependency>
<!-- Mimic JBoss 6.2 -->
<artifactItem>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-jaxrs</artifactId>
<version>${jax.version}</version>
<type>jar</type>
<outputDirectory>${outputDirectoryForLibs}</outputDirectory>
</artifactItem>
<artifactItem>
<groupId>org.jboss.resteasy</groupId>
<artifactId>async-http-servlet-3.0</artifactId>
<version>${jax.version}</version>
<type>jar</type>
<outputDirectory>${outputDirectoryForLibs}</outputDirectory>
</artifactItem>
<artifactItem>
<groupId>org.jboss.resteasy</groupId>
<artifactId>jaxrs-api</artifactId>
<version>${jax.version}</version>
<type>jar</type>
<outputDirectory>${outputDirectoryForLibs}</outputDirectory>
</artifactItem>
<artifactItem>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-jaxb-provider</artifactId>
<version>${jax.version}</version>
<type>jar</type>
<outputDirectory>${outputDirectoryForLibs}</outputDirectory>
</artifactItem>
<artifactItem>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-jackson-provider</artifactId>
<version>${jax.version}</version>
<type>jar</type>
<outputDirectory>${outputDirectoryForLibs}</outputDirectory>
</artifactItem>
<artifactItem>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-multipart-provider</artifactId>
<version>${jax.version}</version>
<type>jar</type>
<outputDirectory>${outputDirectoryForLibs}</outputDirectory>
</artifactItem>
<!-- This needs Bouncycastle
<artifactItem>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-crypto</artifactId>
<version>${jax.version}</version>
<type>jar</type>
<outputDirectory>${outputDirectoryForLibs}</outputDirectory>
</artifactItem>
-->
<artifactItem>
<groupId>org.jboss.resteasy</groupId>
<artifactId>tjws</artifactId>
<version>${jax.version}</version>
<type>jar</type>
<outputDirectory>${outputDirectoryForLibs}</outputDirectory>
</artifactItem>
<artifactItem>
<groupId>org.scannotation</groupId>
<artifactId>scannotation</artifactId>
<version>1.0.3</version>
<type>jar</type>
<outputDirectory>${outputDirectoryForLibs}</outputDirectory>
</artifactItem>
<artifactItem>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-mapper-asl</artifactId>
<version>${jackson.version}</version>
<type>jar</type>
<outputDirectory>${outputDirectoryForLibs}</outputDirectory>
</artifactItem>
<artifactItem>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-core-asl</artifactId>
<version>${jackson.version}</version>
<type>jar</type>
<outputDirectory>${outputDirectoryForLibs}</outputDirectory>
</artifactItem>
<artifactItem>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-jaxrs</artifactId>
<version>${jackson.version}</version>
<type>jar</type>
<outputDirectory>${outputDirectoryForLibs}</outputDirectory>
</artifactItem>
<artifactItem>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-xc</artifactId>
<version>${jackson.version}</version>
<type>jar</type>
<outputDirectory>${outputDirectoryForLibs}</outputDirectory>
</artifactItem>
<artifactItem>
<groupId>org.infinispan</groupId>
<artifactId>infinispan-core</artifactId>
<version>5.2.7.Final</version>
<type>jar</type>
<outputDirectory>${outputDirectoryForLibs}</outputDirectory>
</artifactItem>
<artifactItem>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>${hibernate.version}</version>
<type>jar</type>
<outputDirectory>${outputDirectoryForLibs}</outputDirectory>
</artifactItem>
<artifactItem>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
<version>${hibernate.version}</version>
<type>jar</type>
<outputDirectory>${outputDirectoryForLibs}</outputDirectory>
</artifactItem>
<artifactItem>
<groupId>org.hibernate.javax.persistence</groupId>
<artifactId>hibernate-jpa-2.0-api</artifactId>
<version>1.0.1.Final</version>
<type>jar</type>
<outputDirectory>${outputDirectoryForLibs}</outputDirectory>
</artifactItem>
<artifactItem>
<groupId>org.jboss.logging</groupId>
<artifactId>jboss-logging</artifactId>
<version>3.1.2.GA</version>
<type>jar</type>
<outputDirectory>${outputDirectoryForLibs}</outputDirectory>
</artifactItem>
<artifactItem>
<groupId>org.jboss.spec.javax.transaction</groupId>
<artifactId>jboss-transaction-api_1.1_spec</artifactId>
<version>1.0.1.Final</version>
<type>jar</type>
<outputDirectory>${outputDirectoryForLibs}</outputDirectory>
</artifactItem>
<artifactItem>
<groupId>dom4j</groupId>
<artifactId>dom4j</artifactId>
<version>1.6.1</version>
<type>jar</type>
<outputDirectory>${outputDirectoryForLibs}</outputDirectory>
</artifactItem>
<artifactItem>
<groupId>org.hibernate.common</groupId>
<artifactId>hibernate-commons-annotations</artifactId>
<version>4.0.1.Final</version>
<type>jar</type>
<outputDirectory>${outputDirectoryForLibs}</outputDirectory>
</artifactItem>
<artifactItem>
<groupId>org.javassist</groupId>
<artifactId>javassist</artifactId>
<version>3.18.1-GA</version>
<type>jar</type>
<outputDirectory>${outputDirectoryForLibs}</outputDirectory>
</artifactItem>
<artifactItem>
<groupId>antlr</groupId>
<artifactId>antlr</artifactId>
<version>2.7.7</version>
<type>jar</type>
<outputDirectory>${outputDirectoryForLibs}</outputDirectory>
</artifactItem>
<artifactItem>
<groupId>javax.mail</groupId>
<artifactId>mail</artifactId>
<version>1.4.5</version>
<type>jar</type>
<outputDirectory>${outputDirectoryForLibs}</outputDirectory>
</artifactItem>
<artifactItem>
<groupId>com.google.zxing</groupId>
<artifactId>core</artifactId>
<type>jar</type>
<outputDirectory>${outputDirectoryForLibs}</outputDirectory>
</artifactItem>
<artifactItem>
<groupId>com.google.zxing</groupId>
<artifactId>javase</artifactId>
<type>jar</type>
<outputDirectory>${outputDirectoryForLibs}</outputDirectory>
</artifactItem>
<artifactItem>
<groupId>com.icegreen</groupId>
<artifactId>greenmail</artifactId>
<type>jar</type>
<outputDirectory>${outputDirectoryForLibs}</outputDirectory>
</artifactItem>
<artifactItem>
<groupId>de.idyl</groupId>
<artifactId>winzipaes</artifactId>
<type>jar</type>
<outputDirectory>${outputDirectoryForLibs}</outputDirectory>
</artifactItem>
<artifactItem>
<groupId>xml-apis</groupId>
<artifactId>xml-apis</artifactId>
<type>jar</type>
<outputDirectory>${outputDirectoryForLibs}</outputDirectory>
</artifactItem>
<artifactItem>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<type>jar</type>
<outputDirectory>${outputDirectoryForLibs}</outputDirectory>
</artifactItem>
<artifactItem>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<type>jar</type>
<outputDirectory>${outputDirectoryForLibs}</outputDirectory>
</artifactItem>
</artifactItems>
</configuration>
</execution>
<!-- Get PostgreSQL driver -->
<execution>
<id>get-postgresql-jdbc-driver</id>
<phase>prepare-package</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<artifactItems>
mysql:mysql-connector-java
<artifactItem>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.34</version>
<type>jar</type>
<outputDirectory>${outputDirectoryForLibs}</outputDirectory>
</artifactItem>
<artifactItem>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>9.4-1200-jdbc41</version>
<type>jar</type>
<outputDirectory>${outputDirectoryForLibs}</outputDirectory>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>
<!-- Setup data-source -->
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>2.7</version>
<executions>
<execution>
<id>setup-data-source</id>
<phase>package</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${outputDirectoryConf}</outputDirectory>
<encoding>UTF-8</encoding>
<resources>
<resource>
<directory>.</directory>
<includes>
<include>context.xml</include>
</includes>
<filtering>false</filtering>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<!-- Fix keyclock-configuration -->
<plugin>
<groupId>com.google.code.maven-replacer-plugin</groupId>
<artifactId>replacer</artifactId>
<version>1.5.3</version>
<executions>
<execution>
<id>fix-data-source</id>
<phase>package</phase>
<goals>
<goal>replace</goal>
</goals>
</execution>
</executions>
<configuration>
<file>${configFile}</file>
<replacements>
<!-- fix-data-source -->
<replacement>
<token>java:jboss/datasources/KeycloakDS</token>
<value>java:/comp/env/jdbc/KeycloakDS</value>
</replacement>
<!-- Set Tomcat configuration-dir -->
<replacement>
<token>jboss.server.config.dir}</token>
<value>catalina.home}/conf</value>
</replacement>
</replacements>
</configuration>
</plugin>
<!-- Repackage filled-Tomcat into tag.gz -->
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.4</version>
<executions>
<execution>
<id>assemble</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<tarLongFileMode>gnu</tarLongFileMode>
<descriptors>
<descriptor>assembly.xml</descriptor>
</descriptors>
<outputDirectory>target</outputDirectory>
<workDirectory>target/assembly/work</workDirectory>
<appendAssemblyId>false</appendAssemblyId>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>