Skip to content

Commit 544a24b

Browse files
committed
Fix local dependency for fifth homework
1 parent 07843d5 commit 544a24b

2 files changed

Lines changed: 31 additions & 12 deletions

File tree

.github/workflows/maven.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,10 @@ jobs:
5656
with:
5757
java-version: 1.11
5858
- name: Build with Maven
59-
run: cd hw05-0036505387 && mvn -B package --file pom.xml
59+
run: |
60+
cd hw05-0036505387
61+
mvn -B install:install-file
62+
mvn -B package --file pom.xml
6063
6164
hw06:
6265
runs-on: ubuntu-latest
@@ -210,4 +213,4 @@ jobs:
210213
with:
211214
java-version: 1.11
212215
- name: Build with Maven
213-
run: cd zi-0036505387 && mvn -B package --file pom.xml
216+
run: cd zi-0036505387 && mvn -B package --file pom.xml

hw05-0036505387/pom.xml

Lines changed: 26 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,20 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<project xmlns="http://maven.apache.org/POM/4.0.0"
3-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4-
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5-
2+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
63
<modelVersion>4.0.0</modelVersion>
74
<groupId>hr.fer.zemris.java.jmbag0036505387</groupId>
85
<artifactId>hw05-0036505387</artifactId>
96
<version>1.0</version>
10-
7+
118
<!-- configuration of basic properties -->
129
<properties>
1310
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
1411
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
1512
<maven.compiler.source>11</maven.compiler.source>
1613
<maven.compiler.target>11</maven.compiler.target>
1714
<maven.compiler.showDeprecation>true</maven.compiler.showDeprecation>
18-
1915
<junit.jupiter.version>5.4.0</junit.jupiter.version>
2016
</properties>
21-
17+
2218
<dependencies>
2319
<dependency>
2420
<groupId>org.junit.jupiter</groupId>
@@ -38,22 +34,42 @@
3834
<version>${junit.jupiter.version}</version>
3935
<scope>test</scope>
4036
</dependency>
41-
4237
<dependency>
4338
<groupId>lsystems</groupId>
4439
<artifactId>lsystems</artifactId>
4540
<version>1</version>
4641
</dependency>
4742
</dependencies>
48-
43+
4944
<build>
5045
<plugins>
5146
<!-- JUnit 5 requires Surefire version 2.22.1 or higher -->
5247
<plugin>
5348
<artifactId>maven-surefire-plugin</artifactId>
5449
<version>2.22.1</version>
5550
</plugin>
51+
<plugin>
52+
<groupId>org.apache.maven.plugins</groupId>
53+
<artifactId>maven-install-plugin</artifactId>
54+
<version>2.5.1</version>
55+
<configuration>
56+
<groupId>lsystems</groupId>
57+
<artifactId>lsystems</artifactId>
58+
<version>1</version>
59+
<packaging>jar</packaging>
60+
<file>${basedir}/lib/lsystems.jar</file>
61+
<generatePom>true</generatePom>
62+
</configuration>
63+
<executions>
64+
<execution>
65+
<id>install-jar-lib</id>
66+
<goals>
67+
<goal>install-file</goal>
68+
</goals>
69+
<phase>install</phase>
70+
</execution>
71+
</executions>
72+
</plugin>
5673
</plugins>
5774
</build>
58-
5975
</project>

0 commit comments

Comments
 (0)