Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump maven version, add env file #259

Merged
merged 1 commit into from
Dec 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
MAVEN3_VERSION=3.9.9
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
*~
*.log
node_modules/
apache_maven/
apache*maven*
java/moParser.jar
package-lock.json
modelica-json.log
Expand Down
12 changes: 8 additions & 4 deletions InstallOnWindows.bat
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,14 @@
:: Setup Maven
::*******************************************************************
:: Download maven
echo ----------- Downloading Apache Maven -----------
set MVNLink=https://archive.apache.org/dist/maven/maven-3/3.8.6/binaries/apache-maven-3.8.6-bin.zip
setlocal
FOR /F "tokens=*" %%i in ('type .env') do SET %%i
java -Dsetting1=%setting1% ...
echo ----------- Downloading Apache Maven -----------
set MVNLink=https://archive.apache.org/dist/maven/maven-3/%MAVEN3_VERSION%/binaries/apache-maven-%MAVEN3_VERSION%-bin.zip
set MVNZip=%CD%\apache_maven.zip
bitsadmin /transfer "Downloading MVN" %MVNLink% %MVNZip%
bitsadmin /transfer "Downloading Apache Maven v%MAVEN3_VERSION%" %MVNLink% %MVNZip%
endlocal

:: Unpack Maven
set MVNFolder=apache_maven
Expand All @@ -34,7 +38,7 @@ del /f %MVNZip%
set JAVA_HOME=C:\Program Files\Java\jdk-13.0.2

:: Compile jave to produce jar
echo ----------- Compiling jave to produce jar -----------
echo ----------- Compiling jave to produce jar -----------
cd java
CALL ..\apache_maven\bin\mvn package
CALL move parser\target\parser-1.0-SNAPSHOT.jar moParser.jar
Expand Down
8 changes: 6 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,19 +1,23 @@
##########################################
# Makefile to build and test the project
#########################################
include .env
export

ifeq ($(wildcard ./apache_maven/bin/mvn),)
MVN = mvn # Use maven from system installation
else
MVN = ../apache_maven/bin/mvn
endif

MVN_LINK = https://archive.apache.org/dist/maven/maven-3/$(MAVEN3_VERSION)/binaries/apache-maven-$(MAVEN3_VERSION)-bin.tar.gz

.PHONY: install-maven install-node-packages install compile test run compile-java generate-reference-output clean-node-packages clean-maven clean-installation

# download maven source file to current directory and change its name
install-maven:
@echo "Installing maven"
curl https://archive.apache.org/dist/maven/maven-3/3.8.6/binaries/apache-maven-3.8.6-bin.tar.gz > apache-maven.tar.gz
@echo "Installing Maven v$(MAVEN3_VERSION)"
curl $(MVN_LINK) > apache-maven.tar.gz
mkdir -p apache_maven
tar xzf apache-maven.tar.gz -C apache_maven --strip-components 1
rm -rf apache-maven.tar.gz
Expand Down