Skip to content

Commit a659d0e

Browse files
committed
added project-specific runtime dependencies
1 parent 7880c8f commit a659d0e

File tree

2 files changed

+15
-7
lines changed

2 files changed

+15
-7
lines changed

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,8 @@ Custom project-specific commands can be created to extend the functionality of t
8383
| *./root/webapp* | Static resources (e.g, files and folders including *html*, *css*, *js*, *jsp*, and *png*). |
8484
| *./root/webapp/WEB-INF/web.xml* | Deployment descriptor (e.g, servlet, filter, and listener mappings). |
8585
| *./root/webapp/WEB-INF/classes* | Contains compiled *.class* files. |
86-
| *./root/webapp/WEB-INF/lib* | Dependencies not provided by *WebCTRL* at runtime. |
86+
| *./root/webapp/WEB-INF/lib* | Contains dependencies **not** provided by *WebCTRL* at runtime. |
87+
| *./lib* | Contains project-specific dependencies provided by *WebCTRL* at runtime. |
8788
| *./ext* | Contains [extensions](#extensions) that provide additional commands. |
8889

8990
## Manual Deployment
@@ -106,7 +107,7 @@ Runtime dependencies are located in *./lib* relative to your local clone of this
106107
| [*webaccess-api-addon*](http://repo.alcshare.com/com/controlj/green/webaccess-api-addon/) | *./modules/webaccess* |
107108
| [*xdatabase-api-addon*](http://repo.alcshare.com/com/controlj/green/xdatabase-api-addon/) | *./modules/xdatabase* |
108109

109-
If you change the *WebCTRL* installation by manually editing *./config.txt* (relative to your local clone of this repository), then you should delete *./lib* to force dependency recollection. Feel free to browse your *WebCTRL* installation for dependencies that give access to other internal APIs if these defaults are insufficient.
110+
If you change the *WebCTRL* installation by manually editing *./config.txt* (relative to your local clone of this repository), then you should delete *./lib* to force dependency recollection. Feel free to browse your *WebCTRL* installation for dependencies that give access to other internal APIs if these defaults are insufficient. If you would like to add a *WebCTRL* API to one project folder without affecting any other projects, the *.jar* file should be placed in *./lib* relative to your project folder.
110111

111112
## Keystore Management
112113

Utility.bat

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
:: BSD 3-Clause License
66
::
7-
:: Copyright (c) 2021, Automatic Controls Equipment Systems, Inc.
7+
:: Copyright (c) 2022, Automatic Controls Equipment Systems, Inc.
88
:: All rights reserved.
99
::
1010
:: Redistribution and use in source and binary forms, with or without
@@ -46,7 +46,7 @@ if "%1" EQU "--goto" (
4646
setlocal EnableDelayedExpansion
4747

4848
:: Version control
49-
set "version=1.0.1"
49+
set "version=1.0.2"
5050
if "%1" EQU "--version" (
5151
echo %version%
5252
exit /b
@@ -446,6 +446,7 @@ exit /b
446446
echo.
447447
echo Runtime Dependencies:
448448
for /r "%globalLib%" %%i in (*.jar) do echo %%~ni
449+
for /r "%localLib%" %%i in (*.jar) do echo %%~ni
449450
echo.
450451
echo Packaged Dependencies:
451452
for /r "%lib%" %%i in (*.jar) do echo %%~ni
@@ -478,7 +479,7 @@ exit /b
478479
set "changes=1"
479480
rmdir /S /Q "%trackingClasses%\%%i" >nul 2>nul
480481
mkdir "%trackingClasses%\!newIndex!"
481-
"%JDKBin%\javac.exe" !compileArgs! -implicit:none -d "%trackingClasses%\!newIndex!" -cp "%src%;%globalLib%\*;%lib%\*" "%%k"
482+
"%JDKBin%\javac.exe" !compileArgs! -implicit:none -d "%trackingClasses%\!newIndex!" -cp "%src%;%globalLib%\*;%lib%\*;%localLib%\*" "%%k"
482483
if !ERRORLEVEL! NEQ 0 (
483484
rmdir /S /Q "%trackingClasses%\!newIndex!" >nul 2>nul
484485
set /a newIndex-=1
@@ -506,7 +507,7 @@ exit /b
506507
set "newFile[!newIndex!]=!file[%%i]!"
507508
if exist "%trackingClasses%\!newIndex!" rmdir /S /Q "%trackingClasses%\!newIndex!" >nul 2>nul
508509
mkdir "%trackingClasses%\!newIndex!"
509-
"%JDKBin%\javac.exe" !compileArgs! -implicit:none -d "%trackingClasses%\!newIndex!" -cp "%src%;%globalLib%\*;%lib%\*" "!file[%%i]!"
510+
"%JDKBin%\javac.exe" !compileArgs! -implicit:none -d "%trackingClasses%\!newIndex!" -cp "%src%;%globalLib%\*;%lib%\*;%localLib%\*" "!file[%%i]!"
510511
if !ERRORLEVEL! NEQ 0 (
511512
rmdir /S /Q "%trackingClasses%\!newIndex!" >nul 2>nul
512513
set /a newIndex-=1
@@ -622,6 +623,10 @@ exit /b
622623
set "lib=%root%\webapp\WEB-INF\lib"
623624
if not exist "%lib%" mkdir "%lib%"
624625

626+
:: Local runtime dependencies (not packaged into the addon)
627+
set "localLib=%workspace%\lib"
628+
if not exist "%localLib%" mkdir "%localLib%"
629+
625630
:: Dependency record
626631
set "depRecord=%workspace%\DEPENDENCIES"
627632

@@ -633,7 +638,8 @@ exit /b
633638
echo {
634639
echo "java.project.referencedLibraries": [
635640
echo "%globalLib:\=\\%\\**\\*.jar",
636-
echo "root\\webapp\\WEB-INF\\lib\\**\\*.jar"
641+
echo "root\\webapp\\WEB-INF\\lib\\**\\*.jar",
642+
echo "lib\\**\\*.jar"
637643
echo ]
638644
echo }
639645
) > "%vscodeSettings%"
@@ -718,6 +724,7 @@ exit /b
718724
echo root/LICENSE
719725
echo root/webapp/WEB-INF/classes
720726
echo root/webapp/WEB-INF/lib
727+
echo lib
721728
echo **/*.addon
722729
) > "%workspace%\.gitignore"
723730

0 commit comments

Comments
 (0)