From a315919dfc3953f120199a8d7878a043ad4005a9 Mon Sep 17 00:00:00 2001 From: Pedro Igor Date: Wed, 2 Nov 2016 18:11:30 -0200 Subject: [PATCH] [KEYCLOAK-3555] - Filtering photoz authz config file to update project version. --- examples/authz/photoz/README.md | 4 +++- examples/authz/photoz/photoz-restful-api/pom.xml | 6 ++++++ .../main/resources}/photoz-restful-api-authz-service.json | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) rename examples/authz/photoz/{ => photoz-restful-api/src/main/resources}/photoz-restful-api-authz-service.json (99%) diff --git a/examples/authz/photoz/README.md b/examples/authz/photoz/README.md index c915a1ffc9..8ae6b7c95f 100644 --- a/examples/authz/photoz/README.md +++ b/examples/authz/photoz/README.md @@ -63,6 +63,8 @@ JBoss Drools, which require ``photoz-authz-policy`` artifact installed into your cd examples/authz/photoz mvn clean install + +> Please make sure you have the environment variable M2_HOME set. It should reference the path for your Maven installation. If not set, you will see some WARN messages in the logs when booting Keycloak. Now, let's import another configuration using the Administration Console in order to configure the client application ``photoz-restful-api`` as a resource server with all resources, scopes, permissions and policies. @@ -71,7 +73,7 @@ open the ``Client Details`` page. Once there, click on the `Authorization` tab. Click on the ``Select file`` button, which means you want to import a resource server configuration. Now select the file that is located at: - examples/authz/photoz/photoz-restful-api/photoz-restful-api-authz-config.json + examples/authz/photoz/photoz-restful-api/src/main/resources/photoz-restful-api-authz-service.json Now click ``Upload`` and the resource server will be updated accordingly. diff --git a/examples/authz/photoz/photoz-restful-api/pom.xml b/examples/authz/photoz/photoz-restful-api/pom.xml index 0059ae93dc..84665a215f 100755 --- a/examples/authz/photoz/photoz-restful-api/pom.xml +++ b/examples/authz/photoz/photoz-restful-api/pom.xml @@ -55,6 +55,12 @@ ${project.artifactId} + + + src/main/resources + true + + org.jboss.as.plugins diff --git a/examples/authz/photoz/photoz-restful-api-authz-service.json b/examples/authz/photoz/photoz-restful-api/src/main/resources/photoz-restful-api-authz-service.json similarity index 99% rename from examples/authz/photoz/photoz-restful-api-authz-service.json rename to examples/authz/photoz/photoz-restful-api/src/main/resources/photoz-restful-api-authz-service.json index 455948c493..a87aa0a445 100644 --- a/examples/authz/photoz/photoz-restful-api-authz-service.json +++ b/examples/authz/photoz/photoz-restful-api/src/main/resources/photoz-restful-api-authz-service.json @@ -47,7 +47,7 @@ "logic": "POSITIVE", "decisionStrategy": "UNANIMOUS", "config": { - "mavenArtifactVersion": "2.1.0-SNAPSHOT", + "mavenArtifactVersion": "${project.version}", "mavenArtifactId": "photoz-authz-policy", "sessionName": "MainOwnerSession", "mavenArtifactGroupId": "org.keycloak",