1
0

Use a local maven repository to handle jasmin dependency

Cf. https://stackoverflow.com/a/36602256
This commit is contained in:
Thibaud Gasser 2018-10-23 21:19:18 +02:00
parent 11f227e203
commit 97935e0b36
11 changed files with 84 additions and 0 deletions

View File

@ -11,3 +11,29 @@ Summary of tools used :
Test cases are available [here](src/master/compiler/src/test/test-resources/examples) Test cases are available [here](src/master/compiler/src/test/test-resources/examples)
From [this playlist](https://www.youtube.com/watch?v=2uvKTmfPNzE&list=PLOfFbVTfT2vbJ9qiw_6fWwBAmJAYV4iUm). From [this playlist](https://www.youtube.com/watch?v=2uvKTmfPNzE&list=PLOfFbVTfT2vbJ9qiw_6fWwBAmJAYV4iUm).
## [Installing third-party jars in maven](https://stackoverflow.com/a/36602256)
Define a local maven repository in folder `lib/` in pom.xml :
```xml
<repositories>
<repository>
<id>local-maven-repo</id>
<url>file:./lib</url>
</repository>
</repositories>
```
For each external jar you want to install run :
```bash
mvn deploy:deploy-file \
-DgroupId=com.example \
-DartifactId=example \
-Dversion=1.0 \
-Durl=file:./lib/ \
-DrepositoryId=local-maven-repo \
-DupdateReleaseInfo=true \
-Dfile=/path/to/file.jar
```

View File

@ -0,0 +1 @@
ce04ccd442e778812cfe4cdc0c730e9b

View File

@ -0,0 +1 @@
c61f93bc746eff2378d0ab68d089f9ed09f257b9

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>net.jasmin</groupId>
<artifactId>jasmin</artifactId>
<version>2.4</version>
</project>

View File

@ -0,0 +1 @@
620c4f9571ddea3add17d3448a2f9cb5

View File

@ -0,0 +1 @@
a61805d8249ca32acf5f4536e8ff2b642bdc20f4

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<metadata>
<groupId>net.jasmin</groupId>
<artifactId>jasmin</artifactId>
<versioning>
<release>2.4</release>
<versions>
<version>2.4</version>
</versions>
<lastUpdated>20181023190639</lastUpdated>
</versioning>
</metadata>

View File

@ -0,0 +1 @@
724baa85c2239c0dd3d97fb913d44c00

View File

@ -0,0 +1 @@
906195980677661d2880101f87b7ea8a43b4e324

10
mvn-deploy-jasmin.sh Normal file
View File

@ -0,0 +1,10 @@
#! /bin/bash
mvn deploy:deploy-file \
-DgroupId=net.jasmin \
-DartifactId=jasmin \
-Dversion=2.4 \
-Durl=file:./lib/ \
-DrepositoryId=local-maven-repo \
-DupdateReleaseInfo=true \
-Dfile=./lib/jasmin.jar

22
pom.xml
View File

@ -17,6 +17,14 @@
<module>parser</module> <module>parser</module>
<module>compiler</module> <module>compiler</module>
</modules> </modules>
<!-- https://stackoverflow.com/a/36602256 -->
<repositories>
<repository>
<id>local-maven-repo</id>
<url>file:./lib/</url>
</repository>
</repositories>
<dependencies> <dependencies>
<!-- https://mvnrepository.com/artifact/org.antlr/antlr4 --> <!-- https://mvnrepository.com/artifact/org.antlr/antlr4 -->
@ -25,6 +33,20 @@
<artifactId>antlr4</artifactId> <artifactId>antlr4</artifactId>
<version>4.7.1</version> <version>4.7.1</version>
</dependency> </dependency>
<!-- https://mvnrepository.com/artifact/org.testng/testng -->
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>6.14.3</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>net.jasmin</groupId>
<artifactId>jasmin</artifactId>
<version>2.4</version>
</dependency>
</dependencies> </dependencies>
</project> </project>