Project

General

Profile

Esempio file pomxml » History » Version 2

Gabor Murray, 03/13/2021 02:19 PM

1 1 Gabor Murray
h1. Esempio file pomxml
2
3
<pre>
4
<?xml version="1.0" encoding="UTF-8"?>
5
<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/maven-v4_0_0.xsd">
6 2 Gabor Murray
    <properties>
7
        <!-- java compiler version -->
8
        <maven.compiler.source>1.8</maven.compiler.source>
9
        <maven.compiler.target>1.8</maven.compiler.target>
10
    </properties>
11 1 Gabor Murray
12 2 Gabor Murray
    <modelVersion>4.0.0</modelVersion>
13 1 Gabor Murray
14 2 Gabor Murray
    <groupId>com.your.organization</groupId>
15
    <artifactId>NameOfProject</artifactId>
16
    <version>1</version>
17
    <dependencies>
18 1 Gabor Murray
        <dependency>
19 2 Gabor Murray
            <dependency>
20
                <groupId>org.apache.logging.log4j</groupId>
21
                <artifactId>log4j-api</artifactId>
22
                <version>2.14.1</version>
23
            </dependency>
24
            <dependency>
25
                <groupId>org.apache.logging.log4j</groupId>
26
                <artifactId>log4j-core</artifactId>
27
                <version>2.14.1</version>
28
            </dependency>
29
        </dependency>
30
    </dependencies>
31
    <build>
32
        <sourceDirectory>path/of/sources</sourceDirectory>
33
        <resources>
34
            <resource>
35
            <!-- additional directory. Files into this dir are added to classpath-->
36
            <directory>additional/path/</directory>
37
        </resource>
38
        </resources>
39
        <plugins>
40
            <plugin>
41
                <groupId>org.apache.maven.plugins</groupId>
42
                <artifactId>maven-assembly-plugin</artifactId>
43
                <executions>
44
                    <execution>
45
                        <phase>package</phase>
46
                        <goals>
47
                            <goal>single</goal>
48
                        </goals>
49
                        <configuration>
50
                            <archive>
51
                                <manifest>
52
                                    <mainClass>
53
                                        package.MainClassName
54
                                    </mainClass>
55
                                </manifest>
56
                            </archive>
57
                            <descriptorRefs>
58
                                <descriptorRef>jar-with-dependencies</descriptorRef>
59
                            </descriptorRefs>
60
                            <finalName>final-jar-name</finalName>
61
                            <!-- Set to false to avoid the "jar-with-dependencies" suffix -->
62
                            <appendAssemblyId>false</appendAssemblyId>
63
                        </configuration>
64
                    </execution>
65
                </executions>
66
            </plugin>
67
        </plugins>
68
    </build>
69 1 Gabor Murray
</project>
70
71
</pre>