<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">
    <modelVersion>4.0.0</modelVersion>
    <groupId>com.example</groupId>
    <artifactId>jws</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <name>jws</name>
    <packaging>war</packaging>

    <parent>
        <groupId>com.baeldung</groupId>
        <artifactId>parent-modules</artifactId>
        <version>1.0.0-SNAPSHOT</version>
    </parent>

	<repositories>
	    <repository>
	        <id>OpenNMS Repository</id>
	        <url>http://repo.opennms.org/maven2/</url>
	    </repository>
	</repositories>

    <dependencies>
        <dependency>
            <groupId>javax.samples.jnlp</groupId>
            <artifactId>jnlp-servlet</artifactId>
            <version>${jnlp-servlet.version}</version>
        </dependency>
        <dependency>
            <groupId>javax.samples.jnlp</groupId>
            <artifactId>jnlp-jardiff</artifactId>
            <version>${jnlp-jardiff.version}</version>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>${maven-jar-plugin.version}</version>
                <executions>
                    <execution>
                        <phase>compile</phase>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                        <configuration>
                            <archive>
                                <manifest>
                                    <mainClass>com.example.Hello</mainClass>
                                </manifest>
                            </archive>
                            <outputDirectory>${project.basedir}/target/jws</outputDirectory>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-war-plugin</artifactId>
                <version>${maven-war-plugin.version}</version>
                <executions>
                    <execution>
                        <phase>package</phase>
                    </execution>
                </executions>
                <configuration>
                    <webResources>
                        <resource>
                            <directory>${project.basedir}/java-core-samples-lib/</directory>
                            <includes>
                                <include>**/*.jar</include>
                            </includes>
                            <targetPath>WEB-INF/lib</targetPath>
                        </resource>
                    </webResources>
                </configuration>
            </plugin>
        </plugins>
        <finalName>${project.artifactId}</finalName>
    </build>

    <properties>
        <maven-jar-plugin.version>3.0.2</maven-jar-plugin.version>
        <maven-war-plugin.version>3.0.0</maven-war-plugin.version>
        <jnlp-jardiff.version>1.6.0</jnlp-jardiff.version>
        <jnlp-servlet.version>1.6.0</jnlp-servlet.version>
    </properties>

</project>