<div dir="ltr">Another plus with KeycloakServer is no need to run Maven, just let your IDE build classes for you in the background</div><div class="gmail_extra"><br><div class="gmail_quote">On 6 October 2015 at 21:36, Marek Posolda <span dir="ltr">&lt;<a href="mailto:mposolda@redhat.com" target="_blank">mposolda@redhat.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div text="#000000" bgcolor="#FFFFFF">
    <div>Thanks for sharing.<br>
      <br>
      Some of my tips: Whenever possible, I am using KeycloakServer from
      testsuite for development. This uses Keycloak on embedded Undertow
      instead of Wildfly/EAP. This is not possible just when I need to
      develop/test something, which really requires &quot;real&quot; Wildfly/EAP6
      environment (examples, subsystems, doublecheck that modules.xml
      are not broken etc)<br>
      <br>
      In addition, when I add system property &quot;-Dresources&quot;, the UI
      development is super-easy because:<br>
      - Caching headers are disabled on server side for theme files, so
      browser caching is effectively disabled<br>
      - Themes use local filesystem<br>
      <br>
      In other words, when I do some change in HTML or JS file, there is
      no need to restart server. It&#39;s sufficient to logout/login to see
      all your changes<br>
      <br>
      Also I am using Mongo for development when possible. This has
      advantage that data are persistent among restarts and
      KeycloakServer restart took me around 2 seconds.<br>
      <br>
      Marek<div><div class="h5"><br>
      <br>
      <br>
      On 06/10/15 20:47, Stan Silvert wrote:<br>
    </div></div></div>
    <blockquote type="cite"><div><div class="h5">
      
      In talking with Marko, I shared some of my hacking tips to aid
      with i18n/l10n development.  But they are generally handy for
      easing all Keycloak development.  Others might have other ways to
      improve on this stuff and make our lives easier?<br>
      <br>
      Here are mine:<br>
      <br>
      <b>Build server-dist without artifacts<br>
      </b>I think Bill gets the credit for making this possible in
      WildFly.  You can build it such that jars are not copied to the
      server.  Instead, they are retrieved from your local maven repo. 
      For Keycloak, you go to
      /distribution/server-dist/server-provisioning.xml and set
      copy-module-artifacts=&quot;false&quot;.<br>
      <br>
      Now when you compile any of Keycloak&#39;s java modules you just
      restart the server and see your changes.<br>
      <br>
      It would be nice if we could use a system property for this, but
      it looks like server-provisioning.xml doesn&#39;t support props for
      that attribute.  Some day I&#39;ll fix it and submit a patch.<br>
      <br>
      Anyway, doing that and running mvn compile instead of mvn install
      brings the build time from 3 minutes to about 6 seconds.  Only 6
      seconds to build the whole server!<br>
      <br>
      I use Windows and Cygwin to do this automatically in a batch file:<br>
      <br>
      cd c:\GitHub\keycloak\distribution\server-dist<br>
      call mvn clean<br>
      sed -i
      &#39;s/copy-module-artifacts=&quot;true&quot;/copy-module-artifacts=&quot;false&quot;/&#39;
      server-provisioning.xml<br>
      call mvn compile<br>
      sed -i
      &#39;s/copy-module-artifacts=&quot;false&quot;/copy-module-artifacts=&quot;true&quot;/&#39;
      server-provisioning.xml<br>
      <br>
      <b>Let the the default theme point to your maven clone instead of
        /standalone/configuration/themes<br>
      </b>You can tell Keycloak to load the default theme from your
      development environment.  This is especially handy when you are
      working on HTML or JS files for Keycloak Admin Console.  To do
      this, edit keycloak-server.json.  Here is the batch file code I
      use to automate it:<br>
      <br>
      cd
c:\GitHub\keycloak\distribution\server-dist\target\keycloak*\standalone\configuration<br>
      sed -i &#39;s,&quot;dir&quot;: &quot;${jboss.server.config.dir}/themes&quot;,&quot;dir&quot;:
      &quot;/GitHub/keycloak/forms/common-themes/src/main/resources/theme&quot;,&#39;
      keycloak-server.json<br>
      <br>
      Note: I had to use a comma for my sed delimiter instead of forward
      slash /<br>
      <br>
      <b>Turn off caching in your browser.<br>
      </b>You need to turn off caching to see your HTML and JS changes
      as soon as you edit them.  But it can be a pain to turn caching on
      and off.  I found a nifty FireFox extension called &quot;Cache
      Disabler&quot; that puts a little button in my toolbar to
      enable/disable all caching.<br>
      <br>
      <br>
      <fieldset></fieldset>
      <br>
      </div></div><pre>_______________________________________________
keycloak-dev mailing list
<a href="mailto:keycloak-dev@lists.jboss.org" target="_blank">keycloak-dev@lists.jboss.org</a>
<a href="https://lists.jboss.org/mailman/listinfo/keycloak-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/keycloak-dev</a></pre>
    </blockquote>
    <br>
  </div>

<br>_______________________________________________<br>
keycloak-dev mailing list<br>
<a href="mailto:keycloak-dev@lists.jboss.org">keycloak-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/keycloak-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/keycloak-dev</a><br></blockquote></div><br></div>