openam-jp / openam

Other
32 stars 15 forks source link

styles-admin.less fails to compile because codemirror.css cannot be found #255

Closed tsujiguchitky closed 2 years ago

tsujiguchitky commented 2 years ago

Description

Try to build openam and dependent libraries with no maven cache, then styles-admin.less will fail to compile.

Looking at the log, codemirror.css is missing.

[INFO] ------------------------------------------------------------------------
[INFO] Building OpenAM RIA Web UI 15.0.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
...
[INFO] Running "less:compile" (less) task
[INFO] >> target/XUI/css/styles-admin.less: [L34:C0] 'codemirror/lib/codemirror.css' wasn't found. Tried - target/XUI/css/codemirror/lib/codemirror.css,target/XUI/css/codemirror/lib/codemirror.css,npm://codemirror/lib/codemirror.css,codemirror/lib/codemirror.css
[INFO] Warning: Error compiling target/XUI/css/styles-admin.less Use --force to continue.
[INFO] 
[INFO] Aborted due to warnings.
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] OpenAM Project ..................................... SUCCESS [  2.888 s]
[INFO] OpenAM Audit ....................................... SUCCESS [  0.020 s]
[INFO] OpenAM Audit Context ............................... SUCCESS [  2.317 s]
[INFO] OpenAM Shared ...................................... SUCCESS [  6.911 s]
[INFO] OpenAM Tools ....................................... SUCCESS [  0.019 s]
[INFO] OpenAM License Core ................................ SUCCESS [  1.150 s]
[INFO] OpenAM ServletContext License Locator .............. SUCCESS [  0.920 s]
[INFO] OpenAM Audit Core .................................. SUCCESS [  2.512 s]
[INFO] OpenAM Core Token .................................. SUCCESS [  0.050 s]
[INFO] OpenAM Schemata .................................... SUCCESS [  0.016 s]
[INFO] OpenAM Identity Services Schema .................... SUCCESS [  5.840 s]
[INFO] OpenAM External Libraries .......................... SUCCESS [  2.021 s]
[INFO] OpenAM MIB Schema .................................. SUCCESS [  3.331 s]
[INFO] OpenAM XACML3 Schema ............................... SUCCESS [  0.164 s]
[INFO] OpenAM LDAP Utilities .............................. SUCCESS [  1.121 s]
[INFO] OpenAM Annotations ................................. SUCCESS [  0.057 s]
[INFO] OpenAM CLI License Manager ......................... SUCCESS [  0.848 s]
[INFO] openam-tokens ...................................... SUCCESS [  0.765 s]
[INFO] OpenAM Core ........................................ SUCCESS [01:05 min]
[INFO] OpenAM HTTP ........................................ SUCCESS [  1.445 s]
[INFO] OpenAM User Data Store ............................. SUCCESS [  9.279 s]
[INFO] OpenAM HTTP client ................................. SUCCESS [  3.150 s]
[INFO] OpenAM slf4j binding ............................... SUCCESS [  0.082 s]
[INFO] OpenAM Restlet ..................................... SUCCESS [ 40.194 s]
[INFO] OpenAM Audit Configuration ......................... SUCCESS [  4.740 s]
[INFO] OpenAM Rest ........................................ SUCCESS [ 10.800 s]
[INFO] OpenAM CLI Base .................................... SUCCESS [  0.010 s]
[INFO] OpenAM CLI Definitions ............................. SUCCESS [  0.052 s]
[INFO] OpenAM Build Helper Maven Plugin ................... SUCCESS [  9.049 s]
[INFO] OpenAM Scripting ................................... SUCCESS [ 37.715 s]
[INFO] OpenAM Entitlements ................................ SUCCESS [  9.172 s]
[INFO] OpenAM Authentication .............................. SUCCESS [  0.019 s]
[INFO] OpenAM Auth Common ................................. SUCCESS [  1.246 s]
[INFO] OpenAM Auth LDAP ................................... SUCCESS [  0.323 s]
[INFO] OpenAM Auth AD ..................................... SUCCESS [  0.293 s]
[INFO] OpenAM Auth Anonymous .............................. SUCCESS [  0.283 s]
[INFO] OpenAM Auth Adaptive ............................... SUCCESS [  1.653 s]
[INFO] OpenAM Auth Application ............................ SUCCESS [  0.294 s]
[INFO] openam-certs ....................................... SUCCESS [  0.072 s]
[INFO] OpenAM Auth Cert ................................... SUCCESS [  0.304 s]
[INFO] OpenAM Auth Datastore .............................. SUCCESS [  0.285 s]
[INFO] OpenAM Auth HOTP ................................... SUCCESS [  0.312 s]
[INFO] OpenAM Auth HttpBasic .............................. SUCCESS [  0.283 s]
[INFO] OpenAM Auth JDBC ................................... SUCCESS [  0.291 s]
[INFO] OpenAM Auth Membership ............................. SUCCESS [  0.300 s]
[INFO] OpenAM Auth MSISDN ................................. SUCCESS [  0.291 s]
[INFO] OpenAM Auth NT ..................................... SUCCESS [  0.285 s]
[INFO] OpenAM Auth OATH ................................... SUCCESS [  0.312 s]
[INFO] OpenAM Dashboard ................................... SUCCESS [  0.272 s]
[INFO] OpenAM Core REST ................................... SUCCESS [  5.131 s]
[INFO] OpenAM Auth OATH ................................... SUCCESS [  2.423 s]
[INFO] OpenAM AuthN OpenId Connect ........................ SUCCESS [  1.501 s]
[INFO] OpenAM Auth OAUTH2 ................................. SUCCESS [  0.336 s]
[INFO] OpenAM RADIUS ...................................... SUCCESS [  0.905 s]
[INFO] OpenAM RADIUS common library. ...................... SUCCESS [  0.730 s]
[INFO] OpenAM Auth Radius ................................. SUCCESS [  0.298 s]
[INFO] OpenAM Push Notification ........................... SUCCESS [  4.574 s]
[INFO] OpenAM Auth AuthenticatorPush ...................... SUCCESS [  2.080 s]
[INFO] OpenAM Auth WindowsDesktopSSO ...................... SUCCESS [  0.300 s]
[INFO] OpenAM Auth Persistent Cookie ...................... SUCCESS [  1.898 s]
[INFO] OpenAM Auth Scripted ............................... SUCCESS [  0.374 s]
[INFO] OpenAM Auth Device Id .............................. SUCCESS [  1.875 s]
[INFO] OpenAM SAML2 Schema ................................ SUCCESS [  1.225 s]
[INFO] OpenAM WS Federation Schema ........................ SUCCESS [  2.668 s]
[INFO] OpenAM Liberty Schema .............................. SUCCESS [  3.270 s]
[INFO] OpenAM Federation .................................. SUCCESS [  0.010 s]
[INFO] OpenAM IdP Discovery ............................... SUCCESS [  0.067 s]
[INFO] OpenAM Federation Library .......................... SUCCESS [  6.309 s]
[INFO] OpenAM Auth SAML2 .................................. SUCCESS [  1.889 s]
[INFO] OpenAM Auth WebAuthn ............................... SUCCESS [  6.321 s]
[INFO] OpenAM JAXRPC Schema ............................... SUCCESS [  5.988 s]
[INFO] OpenAM Diagnostics Schema .......................... SUCCESS [  0.242 s]
[INFO] OpenAM DTD Schema .................................. SUCCESS [  0.045 s]
[INFO] OpenAM Plugins ..................................... SUCCESS [  0.009 s]
[INFO] OpenAM PostAuthN plugins ........................... SUCCESS [  0.504 s]
[INFO] OpenFM ............................................. SUCCESS [  1.137 s]
[INFO] OpenAM OAuth2 ...................................... SUCCESS [  7.843 s]
[INFO] OpenAM Admin Console ............................... SUCCESS [  7.527 s]
[INFO] OpenAM CLI Implementation .......................... SUCCESS [  0.768 s]
[INFO] OpenAM Fedlet un-configured web application ........ SUCCESS [  2.483 s]
[INFO] OpenAM IdP Discovery WAR ........................... SUCCESS [  0.280 s]
[INFO] OpenAM UMA ......................................... SUCCESS [  4.607 s]
[INFO] OpenAM Common Auth UI .............................. SUCCESS [  0.103 s]
[INFO] OpenAM Server Auth UI .............................. SUCCESS [  0.127 s]
[INFO] OpenAM UI Parent ................................... SUCCESS [  0.009 s]
[INFO] OpenAM RIA Web UI .................................. FAILURE [ 14.364 s]
[INFO] OpenAM RADIUS Server ............................... SKIPPED
[INFO] OpenAM Audit REST .................................. SKIPPED
[INFO] OpenAM Self Service ................................ SKIPPED
[INFO] OpenAM OAuth2 SAML2 Grant Flow ..................... SKIPPED
[INFO] OpenAM STS ......................................... SKIPPED
[INFO] OpenAM STS Client Classes .......................... SKIPPED
[INFO] OpenAM STS Common .................................. SKIPPED
[INFO] OpenAM REST STS .................................... SKIPPED
[INFO] OpenAM STS Publish Service ......................... SKIPPED
[INFO] OpenAM STS Token Service ........................... SKIPPED
[INFO] OpenAM Build Tools ................................. SKIPPED
[INFO] OpenAM Upgrade ..................................... SKIPPED
[INFO] OpenAM Server Only ................................. SKIPPED
[INFO] OpenAM Server ...................................... SKIPPED
[INFO] OpenAM Installer Utils ............................. SKIPPED
[INFO] OpenAM Configurator Tool ........................... SKIPPED
[INFO] OpenAM Install Tools Launcher ...................... SKIPPED
[INFO] OpenAM Install Tools ............................... SKIPPED
[INFO] OpenAM Diagnostics ................................. SKIPPED
[INFO] OpenAM Diagnostics Base ............................ SKIPPED
[INFO] OpenAM Diagnostics Plugins ......................... SKIPPED
[INFO] OpenAM Upgrade Tool ................................ SKIPPED
[INFO] OpenAM Client SDK .................................. SKIPPED
[INFO] OpenAM Documentation ............................... SKIPPED
[INFO] OpenAM Log Message Reference ....................... SKIPPED
[INFO] OpenAM ssoadm Reference ............................ SKIPPED
[INFO] OpenAM Distribution Packaging ...................... SKIPPED
[INFO] OpenAM Distribution Fedlet UnConfigured ............ SKIPPED
[INFO] OpenAM Distribution ssoAdminTools .................. SKIPPED
[INFO] OpenAM Distribution ssoConfiguratorTools ........... SKIPPED
[INFO] OpenAM Example Projects ............................ SKIPPED
[INFO] OpenAM Example ClientSDK CLI ....................... SKIPPED
[INFO] OpenAM Example ClientSDK WAR ....................... SKIPPED
[INFO] OpenAM Distribution Kit ............................ SKIPPED
[INFO] OpenAM Distribution Diagnostics .................... SKIPPED
[INFO] OpenAM Soap STS .................................... SKIPPED
[INFO] OpenAM SOAP STS Server ............................. SKIPPED
[INFO] OpenAM SOAP STS Client ............................. SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 05:26 min
[INFO] Finished at: 2022-07-06T00:11:23+00:00
[INFO] Final Memory: 431M/5407M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:0.0.28:npm (npm-build) on project openam-ui-ria: Failed to run task: 'npm run build:production -- --target-version=15.0.0-SNAPSHOT' failed. (error code 6) -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR] 
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <goals> -rf :openam-ui-ria

Steps to reproduce

Try to build openam and dependent libraries with no maven cache.

Enviroment

tsujiguchitky commented 2 years ago

forgerock-ui-external-libs has a process to download CodeMirror and install it in the Maven local repository. And the cause is that the downloaded file has changed.

In developing version 6, it seems that the CodeMirror repository has been moved in order to treat up to version 5 as legacy (codemirror -> codemirror5).

Old CodeMirror archive

$ sha1sum ~/.m2/repository/jp/openam/commons/ui/libs/CodeMirror/4.10.0/CodeMirror-4.10.0.zip 
cf4de17bed277745f0562ab3719dfb979c57adda  /home/builduser/.m2/repository/jp/openam/commons/ui/libs/CodeMirror/4.10.0/CodeMirror-4.10.0.zip

$ jar -tf  ~/.m2/repository/jp/openam/commons/ui/libs/CodeMirror/4.10.0/CodeMirror-4.10.0.zip
CodeMirror-4.10.0/
CodeMirror-4.10.0/.gitattributes
CodeMirror-4.10.0/.gitignore
CodeMirror-4.10.0/.travis.yml
CodeMirror-4.10.0/AUTHORS
CodeMirror-4.10.0/CONTRIBUTING.md
CodeMirror-4.10.0/LICENSE
CodeMirror-4.10.0/README.md
...

New CodeMirror archive

$ sha1sum ~/.m2/repository/jp/openam/commons/ui/libs/CodeMirror/4.10.0/CodeMirror-4.10.0.zip 
fa2d1d5ad4c02b238bfbf17406a62308c81cdd6a  /home/builduser/.m2/repository/jp/openam/commons/ui/libs/CodeMirror/4.10.0/CodeMirror-4.10.0.zip

$ jar -tf  ~/.m2/repository/jp/openam/commons/ui/libs/CodeMirror/4.10.0/CodeMirror-4.10.0.zip
codemirror5-4.10.0/
codemirror5-4.10.0/.gitattributes
codemirror5-4.10.0/.gitignore
codemirror5-4.10.0/.travis.yml
codemirror5-4.10.0/AUTHORS
codemirror5-4.10.0/CONTRIBUTING.md
codemirror5-4.10.0/LICENSE
codemirror5-4.10.0/README.md
...