blob: 710ec8b0b88f9ee68b8af8a520d765d2426ca365 [file] [log] [blame]
@rem Licensed to the Apache Software Foundation (ASF) under one *
@rem or more contributor license agreements. See the NOTICE file *
@rem distributed with this work for additional information *
@rem regarding copyright ownership. The ASF licenses this file *
@rem to you under the Apache License, Version 2.0 (the *
@rem "License"); you may not use this file except in compliance *
@rem with the License. You may obtain a copy of the License at *
@rem *
@rem *
@rem *
@rem Unless required by applicable law or agreed to in writing, *
@rem software distributed under the License is distributed on an *
@rem KIND, either express or implied. See the License for the *
@rem specific language governing permissions and limitations *
@rem under the License. *
@echo off
rem This .bat file installs the etch-java-runtime jar file to the local maven
rem repository. It assumes either M2_HOME or MAVEN_HOME is set in the
rem environment to match the maven installation, or "mvn" command is in the
rem search path.
rem Define the etch home directory and artifact particulars
set ETCH_HOME=%~dp0..
set GROUP=etch.etch
set ARTIFACTS=etch-ant-plugin, etch-compiler, etch-csharp-compiler, etch-java-compiler, etch-java-runtime, etch-xml-compiler
set VERSION=@EtchVersion@
if "%M2_HOME%" == "" goto try_maven_home
set MVN=%M2_HOME%\bin\mvn.bat
if not exist "%MVN%" goto try_maven_home
goto run_mvn
if "%MAVEN_HOME%" == "" goto try_path
set MVN=%MAVEN_HOME%\bin\mvn.bat
if not exist "%MVN%" goto try_path
goto run_mvn
set MVN=mvn.bat
FOR %%A IN (%ARTIFACTS%) DO CALL "%MVN%" install:install-file "-Dfile=%ETCH_HOME%\lib\%%A-%VERSION%.jar" -DgroupId=%GROUP% -DartifactId=%%A -Dversion=%VERSION% -Dpackaging=jar
FOR %%A IN (%ARTIFACTS%) DO CALL "%MVN%" install:install-file "-Dfile=%ETCH_HOME%\lib\" -DgroupId=%GROUP% -DartifactId=%%A -Dversion=%VERSION% -Dpackaging=jar -Dclassifier=sources