KEYCLOAK-8955 adapter installation fails on windows - edit logging
This commit is contained in:
parent
1c46b8936f
commit
4b50fdb404
4 changed files with 188 additions and 169 deletions
|
@ -1,16 +1,22 @@
|
||||||
|
@echo off
|
||||||
|
|
||||||
set "NOPAUSE=true"
|
set "NOPAUSE=true"
|
||||||
set cli_file=%2
|
set cli_file=%2
|
||||||
set working_dir=%3
|
set working_dir=%3
|
||||||
|
|
||||||
cd %working_dir%
|
cd %working_dir%
|
||||||
|
echo working_dir: %cd%
|
||||||
|
|
||||||
if "%4"=="-Dserver.config" (
|
if "%4"=="-Dserver.config" (
|
||||||
set server_config=%5
|
set server_config=%5
|
||||||
) else (
|
) else (
|
||||||
set server_config=standalone.xml
|
set server_config=standalone.xml
|
||||||
)
|
)
|
||||||
|
echo server.config=%server_config%
|
||||||
|
echo cli_file=%cli_file%
|
||||||
|
|
||||||
if "%4"=="-Djboss.server.config.dir" (
|
if "%4"=="-Djboss.server.config.dir" (
|
||||||
|
echo jboss.server.config.dir=%5
|
||||||
jboss-cli.bat --file=%cli_file% -Dserver.config=%server_config% -Djboss.server.config.dir=%5
|
jboss-cli.bat --file=%cli_file% -Dserver.config=%server_config% -Djboss.server.config.dir=%5
|
||||||
) else (
|
) else (
|
||||||
jboss-cli.bat --file=%cli_file% -Dserver.config=%server_config%
|
jboss-cli.bat --file=%cli_file% -Dserver.config=%server_config%
|
||||||
|
|
|
@ -67,90 +67,6 @@
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
<plugins>
|
<plugins>
|
||||||
<plugin>
|
|
||||||
<artifactId>maven-enforcer-plugin</artifactId>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<id>enforce-auth-server-jboss-profile</id>
|
|
||||||
<goals>
|
|
||||||
<goal>enforce</goal>
|
|
||||||
</goals>
|
|
||||||
<configuration>
|
|
||||||
<rules>
|
|
||||||
<requireProperty>
|
|
||||||
<property>eap6.version</property>
|
|
||||||
</requireProperty>
|
|
||||||
<requireProperty>
|
|
||||||
<property>fuse63.version</property>
|
|
||||||
</requireProperty>
|
|
||||||
</rules>
|
|
||||||
</configuration>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<artifactId>maven-resources-plugin</artifactId>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<id>backup-configs-fuse</id>
|
|
||||||
<phase>generate-test-sources</phase>
|
|
||||||
<goals>
|
|
||||||
<goal>copy-resources</goal>
|
|
||||||
</goals>
|
|
||||||
<configuration>
|
|
||||||
<outputDirectory>${app.server.jboss.home}/standalone-default</outputDirectory>
|
|
||||||
<resources>
|
|
||||||
<resource>
|
|
||||||
<directory>${app.server.jboss.home}/standalone</directory>
|
|
||||||
</resource>
|
|
||||||
</resources>
|
|
||||||
</configuration>
|
|
||||||
</execution>
|
|
||||||
<execution>
|
|
||||||
<id>copy-hawtio-jsons</id>
|
|
||||||
<phase>generate-test-resources</phase>
|
|
||||||
<goals>
|
|
||||||
<goal>copy-resources</goal>
|
|
||||||
</goals>
|
|
||||||
<configuration>
|
|
||||||
<outputDirectory>${app.server.jboss.home}/standalone-fuse/configuration</outputDirectory>
|
|
||||||
<resources>
|
|
||||||
<resource>
|
|
||||||
<directory>${basedir}/src/main/resources/config/fuse</directory>
|
|
||||||
<includes>
|
|
||||||
<include>keycloak-hawtio.json</include>
|
|
||||||
<include>keycloak-hawtio-client.json</include>
|
|
||||||
</includes>
|
|
||||||
<filtering>true</filtering>
|
|
||||||
</resource>
|
|
||||||
</resources>
|
|
||||||
</configuration>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<artifactId>maven-dependency-plugin</artifactId>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<id>unpack-fuse-installer</id>
|
|
||||||
<phase>process-resources</phase>
|
|
||||||
<goals>
|
|
||||||
<goal>copy</goal>
|
|
||||||
</goals>
|
|
||||||
<configuration>
|
|
||||||
<artifactItems>
|
|
||||||
<artifactItem>
|
|
||||||
<groupId>${fuse.installer.groupId}</groupId>
|
|
||||||
<artifactId>${fuse.installer.artifactId}</artifactId>
|
|
||||||
<version>${fuse.installer.version}</version>
|
|
||||||
<type>jar</type>
|
|
||||||
<outputDirectory>${app.server.jboss.home}</outputDirectory>
|
|
||||||
</artifactItem>
|
|
||||||
</artifactItems>
|
|
||||||
</configuration>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.codehaus.mojo</groupId>
|
<groupId>org.codehaus.mojo</groupId>
|
||||||
<artifactId>exec-maven-plugin</artifactId>
|
<artifactId>exec-maven-plugin</artifactId>
|
||||||
|
@ -188,22 +104,6 @@
|
||||||
</environmentVariables>
|
</environmentVariables>
|
||||||
</configuration>
|
</configuration>
|
||||||
</execution>
|
</execution>
|
||||||
<execution>
|
|
||||||
<id>install-fuse</id>
|
|
||||||
<phase>generate-test-sources</phase>
|
|
||||||
<goals>
|
|
||||||
<goal>exec</goal>
|
|
||||||
</goals>
|
|
||||||
<configuration>
|
|
||||||
<executable>${basedir}/src/main/resources/config/fuse/install-fuse.${script.suffix}</executable>
|
|
||||||
<workingDirectory>${app.server.jboss.home}/standalone-fuse</workingDirectory>
|
|
||||||
<environmentVariables>
|
|
||||||
<JAVA_HOME>${app.server.java.home}</JAVA_HOME>
|
|
||||||
<JBOSS_HOME>${app.server.jboss.home}</JBOSS_HOME>
|
|
||||||
<FUSE_INSTALLER_NAME>${fuse.installer.artifactId}-${fuse.installer.version}.jar</FUSE_INSTALLER_NAME>
|
|
||||||
</environmentVariables>
|
|
||||||
</configuration>
|
|
||||||
</execution>
|
|
||||||
<execution>
|
<execution>
|
||||||
<id>add-secured-deployments-eap6</id>
|
<id>add-secured-deployments-eap6</id>
|
||||||
<phase>generate-test-sources</phase>
|
<phase>generate-test-sources</phase>
|
||||||
|
@ -222,65 +122,182 @@
|
||||||
</execution>
|
</execution>
|
||||||
</executions>
|
</executions>
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
|
||||||
<groupId>org.codehaus.mojo</groupId>
|
|
||||||
<artifactId>xml-maven-plugin</artifactId>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<id>add-hawtio-to-standalone-fuse</id>
|
|
||||||
<phase>process-test-resources</phase>
|
|
||||||
<goals>
|
|
||||||
<goal>transform</goal>
|
|
||||||
</goals>
|
|
||||||
<configuration>
|
|
||||||
<transformationSets>
|
|
||||||
<transformationSet>
|
|
||||||
<dir>${app.server.jboss.home}/standalone-fuse/configuration</dir>
|
|
||||||
<includes>
|
|
||||||
<include>standalone.xml</include>
|
|
||||||
</includes>
|
|
||||||
<stylesheet>${basedir}/src/main/resources/config/fuse/add-hawtio.xsl</stylesheet>
|
|
||||||
<outputDir>${app.server.jboss.home}/standalone-fuse/configuration</outputDir>
|
|
||||||
</transformationSet>
|
|
||||||
</transformationSets>
|
|
||||||
</configuration>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<artifactId>maven-antrun-plugin</artifactId>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<id>move-configs-fuse</id>
|
|
||||||
<phase>process-test-sources</phase>
|
|
||||||
<goals>
|
|
||||||
<goal>run</goal>
|
|
||||||
</goals>
|
|
||||||
<configuration>
|
|
||||||
<target>
|
|
||||||
<echo message="Rename ./standalone to ./standalone-fuse" />
|
|
||||||
<move file="${app.server.jboss.home}/standalone"
|
|
||||||
tofile="${app.server.jboss.home}/standalone-fuse" />
|
|
||||||
</target>
|
|
||||||
</configuration>
|
|
||||||
</execution>
|
|
||||||
<execution>
|
|
||||||
<id>restore-configs-after-fuse-installation</id>
|
|
||||||
<phase>process-test-sources</phase>
|
|
||||||
<goals>
|
|
||||||
<goal>run</goal>
|
|
||||||
</goals>
|
|
||||||
<configuration>
|
|
||||||
<target>
|
|
||||||
<echo message="Rename ./standalone-default to ./standalone" />
|
|
||||||
<move file="${app.server.jboss.home}/standalone-default"
|
|
||||||
tofile="${app.server.jboss.home}/standalone" />
|
|
||||||
</target>
|
|
||||||
</configuration>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
|
|
||||||
|
<profiles>
|
||||||
|
<profile>
|
||||||
|
<id>fuse-installer</id>
|
||||||
|
<activation>
|
||||||
|
<os>
|
||||||
|
<family>unix</family>
|
||||||
|
</os>
|
||||||
|
</activation>
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<artifactId>maven-enforcer-plugin</artifactId>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>enforce-fuse63-version</id>
|
||||||
|
<goals>
|
||||||
|
<goal>enforce</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<rules>
|
||||||
|
<requireProperty>
|
||||||
|
<property>fuse63.version</property>
|
||||||
|
</requireProperty>
|
||||||
|
</rules>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<artifactId>maven-resources-plugin</artifactId>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>backup-configs-fuse</id>
|
||||||
|
<phase>generate-test-sources</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>copy-resources</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<outputDirectory>${app.server.jboss.home}/standalone-default</outputDirectory>
|
||||||
|
<resources>
|
||||||
|
<resource>
|
||||||
|
<directory>${app.server.jboss.home}/standalone</directory>
|
||||||
|
</resource>
|
||||||
|
</resources>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
<execution>
|
||||||
|
<id>copy-hawtio-jsons</id>
|
||||||
|
<phase>generate-test-resources</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>copy-resources</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<outputDirectory>${app.server.jboss.home}/standalone-fuse/configuration</outputDirectory>
|
||||||
|
<resources>
|
||||||
|
<resource>
|
||||||
|
<directory>${basedir}/src/main/resources/config/fuse</directory>
|
||||||
|
<includes>
|
||||||
|
<include>keycloak-hawtio.json</include>
|
||||||
|
<include>keycloak-hawtio-client.json</include>
|
||||||
|
</includes>
|
||||||
|
<filtering>true</filtering>
|
||||||
|
</resource>
|
||||||
|
</resources>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<artifactId>maven-dependency-plugin</artifactId>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>unpack-fuse-installer</id>
|
||||||
|
<phase>process-resources</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>copy</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<artifactItems>
|
||||||
|
<artifactItem>
|
||||||
|
<groupId>${fuse.installer.groupId}</groupId>
|
||||||
|
<artifactId>${fuse.installer.artifactId}</artifactId>
|
||||||
|
<version>${fuse.installer.version}</version>
|
||||||
|
<type>jar</type>
|
||||||
|
<outputDirectory>${app.server.jboss.home}</outputDirectory>
|
||||||
|
</artifactItem>
|
||||||
|
</artifactItems>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.codehaus.mojo</groupId>
|
||||||
|
<artifactId>exec-maven-plugin</artifactId>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>install-fuse</id>
|
||||||
|
<phase>generate-test-sources</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>exec</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<executable>${basedir}/src/main/resources/config/fuse/install-fuse.${script.suffix}</executable>
|
||||||
|
<workingDirectory>${app.server.jboss.home}/standalone-fuse</workingDirectory>
|
||||||
|
<environmentVariables>
|
||||||
|
<JAVA_HOME>${app.server.java.home}</JAVA_HOME>
|
||||||
|
<JBOSS_HOME>${app.server.jboss.home}</JBOSS_HOME>
|
||||||
|
<FUSE_INSTALLER_NAME>${fuse.installer.artifactId}-${fuse.installer.version}.jar</FUSE_INSTALLER_NAME>
|
||||||
|
</environmentVariables>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.codehaus.mojo</groupId>
|
||||||
|
<artifactId>xml-maven-plugin</artifactId>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>add-hawtio-to-standalone-fuse</id>
|
||||||
|
<phase>process-test-resources</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>transform</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<transformationSets>
|
||||||
|
<transformationSet>
|
||||||
|
<dir>${app.server.jboss.home}/standalone-fuse/configuration</dir>
|
||||||
|
<includes>
|
||||||
|
<include>standalone.xml</include>
|
||||||
|
</includes>
|
||||||
|
<stylesheet>${basedir}/src/main/resources/config/fuse/add-hawtio.xsl</stylesheet>
|
||||||
|
<outputDir>${app.server.jboss.home}/standalone-fuse/configuration</outputDir>
|
||||||
|
</transformationSet>
|
||||||
|
</transformationSets>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<artifactId>maven-antrun-plugin</artifactId>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>move-configs-fuse</id>
|
||||||
|
<phase>process-test-sources</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>run</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<target>
|
||||||
|
<echo message="Rename ./standalone to ./standalone-fuse" />
|
||||||
|
<move file="${app.server.jboss.home}/standalone"
|
||||||
|
tofile="${app.server.jboss.home}/standalone-fuse" />
|
||||||
|
</target>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
<execution>
|
||||||
|
<id>restore-configs-after-fuse-installation</id>
|
||||||
|
<phase>process-test-sources</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>run</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<target>
|
||||||
|
<echo message="Rename ./standalone-default to ./standalone" />
|
||||||
|
<move file="${app.server.jboss.home}/standalone-default"
|
||||||
|
tofile="${app.server.jboss.home}/standalone" />
|
||||||
|
</target>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
</profile>
|
||||||
|
</profiles>
|
||||||
</project>
|
</project>
|
||||||
|
|
|
@ -1,11 +0,0 @@
|
||||||
set NOPAUSE=true
|
|
||||||
|
|
||||||
cd %JBOSS_HOME%
|
|
||||||
start javaw -jar %FUSE_INSTALLER_NAME%
|
|
||||||
ping 127.0.0.1 -n 40 > nul
|
|
||||||
del %FUSE_INSTALLER_NAME%
|
|
||||||
|
|
||||||
set JBOSS_HOME=%JBOSS_HOME:/=\%
|
|
||||||
ren %JBOSS_HOME%\standalone\deployments\hawtio*.war hawtio.war
|
|
||||||
|
|
||||||
exit 0
|
|
|
@ -28,7 +28,9 @@ import org.jboss.arquillian.drone.api.annotation.Drone;
|
||||||
import org.jboss.arquillian.graphene.page.Page;
|
import org.jboss.arquillian.graphene.page.Page;
|
||||||
import org.jboss.arquillian.test.api.ArquillianResource;
|
import org.jboss.arquillian.test.api.ArquillianResource;
|
||||||
import org.junit.After;
|
import org.junit.After;
|
||||||
|
import org.junit.Assume;
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
|
import org.junit.BeforeClass;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
import org.keycloak.representations.idm.RealmRepresentation;
|
import org.keycloak.representations.idm.RealmRepresentation;
|
||||||
|
@ -71,6 +73,11 @@ public class EAP6Fuse6HawtioAdapterTest extends AbstractExampleAdapterTest imple
|
||||||
testRealms.add(loadRealm("/adapter-test/hawtio-realm/demorealm.json"));
|
testRealms.add(loadRealm("/adapter-test/hawtio-realm/demorealm.json"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@BeforeClass
|
||||||
|
public static void enabled() {
|
||||||
|
Assume.assumeFalse(System.getProperty("os.name").startsWith("Windows"));
|
||||||
|
}
|
||||||
|
|
||||||
@Before
|
@Before
|
||||||
public void addJSDriver() {
|
public void addJSDriver() {
|
||||||
DroneUtils.addWebDriver(jsDriver);
|
DroneUtils.addWebDriver(jsDriver);
|
||||||
|
|
Loading…
Reference in a new issue