Skip to content

Commit

Permalink
automate distribution
Browse files Browse the repository at this point in the history
  • Loading branch information
michzimny committed Jul 26, 2017
1 parent 5a3492b commit d3710f7
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 18 deletions.
19 changes: 13 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,32 @@

Programy JFR Pary i Teamy (http://www.pzbs.pl/pary-teamy) zawierają program Goniec, który ma problem z wrzucaniem plików na niektóre serwery FTP (wiadomo, że są takie problemy z serwerami home.pl), ponieważ nie jest przystosowany do określonych wersji lub ustawień protokołu FTP. Z tego powodu powstał Zimny Goniec, który ma te same funkcje co Goniec, ale jest pozbawiony wspomnianego wyżej ograniczenia.

## Kompilacja
## Budowanie

Wymagania:

* JDK 7 lub 8
* Apache Maven 3.3.x (lub prawdopodobnie dowolny nowszy)

Kompilacja:
Sama kompilacja:

```
mvn compile package
mvn compile
```

Powstanie wykonywalny JAR: target/zimny-goniec-${version}-jar-with-dependencies.jar
Kompilacja i pakowanie do dystrybucji:

```
mvn package
```

Powstanie ZIP gotowy do dystrybucji: target/zimny-goniec-${version}.zip

## Użycie

Umieścić w jednym katalogu wykonywalny JAR oraz goniec.xml z konfiguracją. Uruchomić:
Rozpakować ZIP z dystrybucją, wprowadzić konfigurację do goniec.xml i uruchomić:

```
java -jar ${jar_filename}
java -jar zimny-goniec-${version}.jar
```

25 changes: 25 additions & 0 deletions assembly.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<assembly xmlns="http://maven.apache.org/ASSEMBLY/2.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.0.0 http://maven.apache.org/xsd/assembly-2.0.0.xsd">
<id>dist</id>
<formats>
<format>zip</format>
</formats>
<fileSets>
<fileSet>
<directory>${project.basedir}</directory>
<outputDirectory>/</outputDirectory>
<includes>
<include>LICENSE*</include>
<include>goniec.xml</include>
</includes>
</fileSet>
</fileSets>
<files>
<file>
<source>${project.build.directory}/${artifactId}-${version}-jar-with-dependencies.jar</source>
<outputDirectory>/</outputDirectory>
<destName>${artifactId}-${version}.jar</destName>
</file>
</files>
</assembly>
36 changes: 24 additions & 12 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,24 +39,36 @@
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.4</version>
<configuration>
<archive>
<manifest>
<mainClass>pl.michzimny.goniec.Goniec</mainClass>
</manifest>
</archive>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
<executions>
<execution>
<id>make-assembly</id>
<id>jar-with-dependencies</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<archive>
<manifest>
<mainClass>pl.michzimny.goniec.Goniec</mainClass>
</manifest>
</archive>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
</execution>
<execution>
<id>dist</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<appendAssemblyId>false</appendAssemblyId>
<descriptors>
<descriptor>assembly.xml</descriptor>
</descriptors>
</configuration>
</execution>
</executions>
</plugin>
Expand Down

0 comments on commit d3710f7

Please sign in to comment.