Problem building from source

Hello,

I need some help. I tried to build Keycloak from source but failed. I followed the instruction from here
https://github.com/keycloak/keycloak/blob/main/docs/building.mdand. I ran ‘mvn clean install’ and got an error:
ProfileTest.configWithPropertiesFile:182 » FileSystem C:\Users\alexh\AppData\Local\Temp\jboss-config12543250120213670787\profile.properties: The process cannot access the file because it is being used by another process.

Did I miss anything?

Thank you very much for your help.
Alex

Hi Alex,
I encountered the same issue. I bypass this error by making the following changes to src/test/java/org/keycloak/org/keycloak/common/ProfileTest.java

In the function → public void enablePreviewWithPropertiesFile() throws IOException
I put the delete file/directory statements in a try catch statement
eg.
try { Files.delete(profileProperties); } catch (Exception e3) {};
try { Files.delete(tempDirectory); } catch (Exception e4) {};

In the function → public void configWithPropertiesFile() throws IOException
I also put the delete file/directory statements in a try catch statement
eg.
try { Files.delete(profileProperties); } catch (Exception e1) {};
try { Files.delete(tempDirectory); } catch (Exception e2) {};

And then I run ‘mvn clean install’.
This time error stops at " Failed to execute goal org.asciidoctor:asciidoctor-maven-plugin:1.5.5:process-asciidoc (server-asciidoc-to-html) on project keycloak-guides" which I am troubleshooting now.

Hope the above information is useful for you.

cheers,
Josiah