Skip to content

Commit f016635

Browse files
author
tohanov
committed
made maven create 2 separate jars, one for each type of server
1 parent 7e6c273 commit f016635

3 files changed

Lines changed: 95 additions & 7 deletions

File tree

.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
!.vscode/
44
!.vscode/launch.json
55
!.gitignore
6-
6+
!tarCommands.sh
77

88
!Client
99
!Client/**
@@ -13,4 +13,3 @@ Client/bin/**
1313
!Server
1414
!Server/**
1515
Server/target/**
16-

Server/pom.xml

Lines changed: 89 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,98 @@
1-
<?xml version="1.0" encoding="UTF-8"?>
21
<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">
32
<modelVersion>4.0.0</modelVersion>
43
<groupId>bgu.spl</groupId>
54
<artifactId>spl-net</artifactId>
6-
<version>1.0-SNAPSHOT</version>
75
<packaging>jar</packaging>
6+
<version>1.0</version>
7+
88
<properties>
99
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
10-
<maven.compiler.source>1.8</maven.compiler.source>
11-
<maven.compiler.target>1.8</maven.compiler.target>
10+
<junit.version>4.12</junit.version>
1211
</properties>
13-
<name>spl-net</name>
12+
13+
<dependencies>
14+
<!-- <dependency>
15+
<groupId>junit</groupId>
16+
<artifactId>junit</artifactId>
17+
<version>${junit.version}</version>
18+
<scope>test</scope>
19+
</dependency> -->
20+
</dependencies>
21+
22+
<build>
23+
<plugins>
24+
<plugin>
25+
<groupId>org.apache.maven.plugins</groupId>
26+
<artifactId>maven-compiler-plugin</artifactId>
27+
28+
<configuration>
29+
<source>1.8</source>
30+
<target>1.8</target>
31+
</configuration>
32+
</plugin>
33+
34+
35+
<plugin>
36+
<artifactId>maven-assembly-plugin</artifactId>
37+
38+
<executions>
39+
<execution>
40+
<id>build-a</id>
41+
<configuration>
42+
<archive>
43+
<manifest>
44+
<mainClass>bgu.spl.net.impl.BGSServer.TPCMain</mainClass>
45+
</manifest>
46+
</archive>
47+
<descriptorRefs>
48+
<descriptorRef>jar-with-dependencies</descriptorRef>
49+
</descriptorRefs>
50+
51+
<finalName>bgs_tpc</finalName>
52+
53+
<appendAssemblyId>false</appendAssemblyId>
54+
</configuration>
55+
<phase>package</phase>
56+
<goals>
57+
<goal>single</goal>
58+
</goals>
59+
</execution>
60+
61+
<execution>
62+
<id>build-b</id>
63+
<configuration>
64+
<archive>
65+
<manifest>
66+
<mainClass>bgu.spl.net.impl.BGSServer.ReactorMain</mainClass>
67+
</manifest>
68+
</archive>
69+
<descriptorRefs>
70+
<descriptorRef>jar-with-dependencies</descriptorRef>
71+
</descriptorRefs>
72+
73+
<finalName>bgs_reactor</finalName>
74+
75+
<appendAssemblyId>false</appendAssemblyId>
76+
</configuration>
77+
<phase>package</phase>
78+
<goals>
79+
<goal>single</goal>
80+
</goals>
81+
</execution>
82+
</executions>
83+
</plugin>
84+
85+
86+
<plugin>
87+
<artifactId>maven-jar-plugin</artifactId>
88+
89+
<executions>
90+
<execution>
91+
<id>default-jar</id>
92+
<phase>none</phase>
93+
</execution>
94+
</executions>
95+
</plugin>
96+
</plugins>
97+
</build>
1498
</project>

tarCommands.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
ARCHIVE=submission.tar.gz
2+
3+
tar -czf $ARCHIVE Client/src Client/include/ Client/bin/.gitkeep Client/makefile Server/src/ Server/pom.xml
4+
tar -tvf $ARCHIVE
5+

0 commit comments

Comments
 (0)