Skip to content

Commit

Permalink
Fix that files in .m2 directory got locked (#89)
Browse files Browse the repository at this point in the history
  • Loading branch information
mhdirkse committed Apr 9, 2024
1 parent f14928d commit 4b28832
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 14 deletions.
2 changes: 1 addition & 1 deletion build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@
<property name="rhino.dir" value="build/rhino${rhino.version}"/>
<property name="maven.remark.line1" value="Maven will by default use 1.8 for source and target (independent of Java version being used to run Maven)"/>
<property name="maven.remark.line2" value="For example java 11 can be specified in the pom.xml of your project by adding property &lt;maven.compiler.release>11&lt;/maven.compiler.release>"/>
<property name="maven.version" value="3.9.5"/><!-- check whether remark above about 1.8 is still correct, see https://maven.apache.org/plugins/maven-compiler-plugin/ -->
<property name="maven.version" value="3.9.6"/><!-- check whether remark above about 1.8 is still correct, see https://maven.apache.org/plugins/maven-compiler-plugin/ -->
<property name="maven.base" value="apache-maven-${maven.version}-bin"/>
<property name="maven.zip" value="${maven.base}.zip"/>
<property name="maven.tar" value="${maven.base}.tar"/>
Expand Down
6 changes: 3 additions & 3 deletions cmd.bat
Original file line number Diff line number Diff line change
Expand Up @@ -79,13 +79,13 @@ if not exist "%JDK_11_DIR%" (
if not exist "%JDK_17_DIR%" (
set RUN_INSTALL=true
)
if not exist "%~dp0build\apache-maven-3.9.5" (
if not exist "%~dp0build\apache-maven-3.9.6" (
set RUN_INSTALL=true
)
set JAVA_HOME=%JDK_21_DIR%
set ANT_HOME=%~dp0build\apache-ant-1.10.10
if "%RUN_INSTALL%" == "true" (
call "%~dp0build\apache-ant-1.10.10\bin\ant" -emacs -buildfile "%~dp0build.xml" install
)
set PATH=%JAVA_HOME%\bin;%ANT_HOME%\bin;%~dp0build\apache-maven-3.9.5\bin;%PATH%
C:\Windows\System32\cmd.exe /k "echo JAVA : %JAVA_HOME%& echo ANT : %ANT_HOME%& echo MAVEN: %~dp0build\apache-maven-3.9.5"
set PATH=%JAVA_HOME%\bin;%ANT_HOME%\bin;%~dp0build\apache-maven-3.9.6\bin;%PATH%
C:\Windows\System32\cmd.exe /k "echo JAVA : %JAVA_HOME%& echo ANT : %ANT_HOME%& echo MAVEN: %~dp0build\apache-maven-3.9.6"
6 changes: 3 additions & 3 deletions env.bat
Original file line number Diff line number Diff line change
Expand Up @@ -79,16 +79,16 @@ if not exist "%JDK_11_DIR%" (
if not exist "%JDK_17_DIR%" (
set RUN_INSTALL=true
)
if not exist "%~dp0build\apache-maven-3.9.5" (
if not exist "%~dp0build\apache-maven-3.9.6" (
set RUN_INSTALL=true
)
set JAVA_HOME=%JDK_21_DIR%
set ANT_HOME=%~dp0build\apache-ant-1.10.10
if "%RUN_INSTALL%" == "true" (
call "%~dp0build\apache-ant-1.10.10\bin\ant" -emacs -buildfile "%~dp0build.xml" install
)
set PATH=%JAVA_HOME%\bin;%ANT_HOME%\bin;%~dp0build\apache-maven-3.9.5\bin;%PATH%
set PATH=%JAVA_HOME%\bin;%ANT_HOME%\bin;%~dp0build\apache-maven-3.9.6\bin;%PATH%
echo JAVA : %JAVA_HOME%
echo ANT : %ANT_HOME%
echo MAVEN: %~dp0build\apache-maven-3.9.5
echo MAVEN: %~dp0build\apache-maven-3.9.6
endlocal & SET JAVA_HOME=%JAVA_HOME% & SET ANT_HOME=%ANT_HOME% & SET PATH=%PATH%
6 changes: 3 additions & 3 deletions env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -107,15 +107,15 @@ fi
if [[ ! -d "${JDK_17_DIR}" ]]; then
RUN_INSTALL="true"
fi
if [[ ! -d "${FR_DIR}build/apache-maven-3.9.5" ]]; then
if [[ ! -d "${FR_DIR}build/apache-maven-3.9.6" ]]; then
RUN_INSTALL="true"
fi
export JAVA_HOME="${JDK_21_DIR}"
export ANT_HOME="${FR_DIR}build/apache-ant-1.10.10"
if [[ "$RUN_INSTALL" == "true" ]]; then
"${FR_DIR}build/apache-ant-1.10.10/bin/ant" -emacs -buildfile "${FR_DIR}build.xml" install
fi
export PATH="${JAVA_HOME}/bin:${ANT_HOME}/bin:${FR_DIR}build/apache-maven-3.9.5/bin:${PATH}"
export PATH="${JAVA_HOME}/bin:${ANT_HOME}/bin:${FR_DIR}build/apache-maven-3.9.6/bin:${PATH}"
echo "JAVA : ${JAVA_HOME}"
echo "ANT : ${ANT_HOME}"
echo "MAVEN: ${FR_DIR}build/apache-maven-3.9.5"
echo "MAVEN: ${FR_DIR}build/apache-maven-3.9.6"
4 changes: 2 additions & 2 deletions mvn.bat
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ if not exist "%JDK_11_DIR%" (
if not exist "%JDK_17_DIR%" (
set RUN_INSTALL=true
)
if not exist "%~dp0build\apache-maven-3.9.5" (
if not exist "%~dp0build\apache-maven-3.9.6" (
set RUN_INSTALL=true
)
rem Maven will by default use 1.8 for source and target (independent of Java version being used to run Maven)
Expand All @@ -89,7 +89,7 @@ set ANT_HOME=%~dp0build\apache-ant-1.10.10
if "%RUN_INSTALL%" == "true" (
call "%~dp0build\apache-ant-1.10.10\bin\ant" -emacs -buildfile "%~dp0build.xml" install
)
call "%~dp0build\apache-maven-3.9.5\bin\mvn.cmd" %*
call "%~dp0build\apache-maven-3.9.6\bin\mvn.cmd" %*
if %errorlevel% equ 0 goto end
:error
rem https://superuser.com/questions/527898/how-to-pause-only-if-executing-in-a-new-window
Expand Down
4 changes: 2 additions & 2 deletions mvn.sh
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ fi
if [[ ! -d "${JDK_17_DIR}" ]]; then
RUN_INSTALL="true"
fi
if [[ ! -d "${FR_DIR}build/apache-maven-3.9.5" ]]; then
if [[ ! -d "${FR_DIR}build/apache-maven-3.9.6" ]]; then
RUN_INSTALL="true"
fi
# Maven will by default use 1.8 for source and target (independent of Java version being used to run Maven)
Expand All @@ -117,4 +117,4 @@ export ANT_HOME="${FR_DIR}build/apache-ant-1.10.10"
if [[ "$RUN_INSTALL" == "true" ]]; then
"${FR_DIR}build/apache-ant-1.10.10/bin/ant" -emacs -buildfile "${FR_DIR}build.xml" install
fi
"${FR_DIR}build/apache-maven-3.9.5/bin/mvn" "$@"
"${FR_DIR}build/apache-maven-3.9.6/bin/mvn" "$@"
1 change: 1 addition & 0 deletions specials/iaf-webapp/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
<replace file="../../../${ff.dir}/console/frontend/src/main/frontend/angular.json" token="/target/frontend" value="/target/frank-runner/frontend" summary="true"/><!-- match with -Dbuild.dir=target/frank-runner from which <id>copy NPM dist to Maven build folder</id> in pom.xml will use -->
<exec executable="${mvn.exe}" dir="../../../${ff.dir}" vmlauncher="false" failonerror="true">
<arg value="${mvn.arg}" unless:blank="${mvn.arg}"/>
<arg value="-e" />
<arg value="clean" unless:true="${maven.skip.clean}"/>
<arg value="install"/>
<arg value="--projects" unless:blank="${maven.projects}"/>
Expand Down

0 comments on commit 4b28832

Please sign in to comment.