|
| 1 | +<?xml version="1.0" encoding="UTF-8"?> |
| 2 | +<!-- |
| 3 | + Copyright (c) 2020, 2021, Oracle and/or its affiliates. All rights reserved. |
| 4 | + DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
| 5 | +
|
| 6 | + The Universal Permissive License (UPL), Version 1.0 |
| 7 | +
|
| 8 | + Subject to the condition set forth below, permission is hereby granted to any |
| 9 | + person obtaining a copy of this software, associated documentation and/or |
| 10 | + data (collectively the "Software"), free of charge and under any and all |
| 11 | + copyright rights in the Software, and any and all patent rights owned or |
| 12 | + freely licensable by each licensor hereunder covering either (i) the |
| 13 | + unmodified Software as contributed to or provided by such licensor, or (ii) |
| 14 | + the Larger Works (as defined below), to deal in both |
| 15 | +
|
| 16 | + (a) the Software, and |
| 17 | +
|
| 18 | + (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if |
| 19 | + one is included with the Software each a "Larger Work" to which the Software |
| 20 | + is contributed by such licensors), |
| 21 | +
|
| 22 | + without restriction, including without limitation the rights to copy, create |
| 23 | + derivative works of, display, perform, and distribute the Software and make, |
| 24 | + use, sell, offer for sale, import, export, have made, and have sold the |
| 25 | + Software and the Larger Work(s), and to sublicense the foregoing rights on |
| 26 | + either these or other terms. |
| 27 | +
|
| 28 | + This license is subject to the following condition: |
| 29 | +
|
| 30 | + The above copyright notice and either this complete permission notice or at a |
| 31 | + minimum a reference to the UPL must be included in all copies or substantial |
| 32 | + portions of the Software. |
| 33 | +
|
| 34 | + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| 35 | + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 36 | + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
| 37 | + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
| 38 | + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
| 39 | + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
| 40 | + SOFTWARE. |
| 41 | +--> |
| 42 | + |
| 43 | +<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 |
| 44 | + http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
| 45 | + <modelVersion>4.0.0</modelVersion> |
| 46 | + |
| 47 | + <groupId>org.graalvm.buildtools.examples</groupId> |
| 48 | + <artifactId>maven</artifactId> |
| 49 | + <version>1.0.0-SNAPSHOT</version> |
| 50 | + |
| 51 | + <properties> |
| 52 | + <java.version>1.8</java.version> |
| 53 | + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> |
| 54 | + <native.maven.plugin.version>0.11.1-SNAPSHOT</native.maven.plugin.version> |
| 55 | + <junit.platform.native.version>0.11.1-SNAPSHOT</junit.platform.native.version> |
| 56 | + <imageName>example-app</imageName> |
| 57 | + <mainClass>org.graalvm.demo.Application</mainClass> |
| 58 | + </properties> |
| 59 | + |
| 60 | + <dependencies> |
| 61 | + <dependency> |
| 62 | + <groupId>org.apache.commons</groupId> |
| 63 | + <artifactId>commons-lang3</artifactId> |
| 64 | + <version>3.8.1</version> |
| 65 | + </dependency> |
| 66 | + </dependencies> |
| 67 | + |
| 68 | + <profiles> |
| 69 | + <profile> |
| 70 | + <id>native</id> |
| 71 | + <build> |
| 72 | + <plugins> |
| 73 | + <plugin> |
| 74 | + <groupId>org.graalvm.buildtools</groupId> |
| 75 | + <artifactId>native-maven-plugin</artifactId> |
| 76 | + <version>${native.maven.plugin.version}</version> |
| 77 | + <extensions>true</extensions> |
| 78 | + <executions> |
| 79 | + <execution> |
| 80 | + <id>test-native</id> |
| 81 | + <goals> |
| 82 | + <goal>test</goal> |
| 83 | + </goals> |
| 84 | + <phase>test</phase> |
| 85 | + </execution> |
| 86 | + <execution> |
| 87 | + <id>build-native</id> |
| 88 | + <goals> |
| 89 | + <goal>compile-no-fork</goal> |
| 90 | + </goals> |
| 91 | + <phase>package</phase> |
| 92 | + </execution> |
| 93 | + </executions> |
| 94 | + <configuration> |
| 95 | + <skip>false</skip> |
| 96 | + <imageName>${imageName}</imageName> |
| 97 | + <fallback>false</fallback> |
| 98 | + </configuration> |
| 99 | + </plugin> |
| 100 | + </plugins> |
| 101 | + </build> |
| 102 | + </profile> |
| 103 | + </profiles> |
| 104 | + |
| 105 | + <build> |
| 106 | + <finalName>${project.artifactId}</finalName> |
| 107 | + <plugins> |
| 108 | + <plugin> |
| 109 | + <groupId>org.apache.maven.plugins</groupId> |
| 110 | + <artifactId>maven-surefire-plugin</artifactId> |
| 111 | + <version>3.0.0-M5</version> |
| 112 | + </plugin> |
| 113 | + |
| 114 | + <plugin> |
| 115 | + <groupId>org.apache.maven.plugins</groupId> |
| 116 | + <artifactId>maven-compiler-plugin</artifactId> |
| 117 | + <version>3.8.1</version> |
| 118 | + <configuration> |
| 119 | + <source>${java.version}</source> |
| 120 | + <target>1.8</target> |
| 121 | + </configuration> |
| 122 | + </plugin> |
| 123 | + |
| 124 | + <plugin> |
| 125 | + <groupId>org.apache.maven.plugins</groupId> |
| 126 | + <artifactId>maven-jar-plugin</artifactId> |
| 127 | + <version>3.2.2</version> |
| 128 | + <configuration> |
| 129 | + <archive> |
| 130 | + <manifest> |
| 131 | + <addClasspath>true</addClasspath> |
| 132 | + <mainClass>${mainClass}</mainClass> |
| 133 | + </manifest> |
| 134 | + </archive> |
| 135 | + </configuration> |
| 136 | + </plugin> |
| 137 | + |
| 138 | + <plugin> |
| 139 | + <groupId>org.codehaus.mojo</groupId> |
| 140 | + <artifactId>exec-maven-plugin</artifactId> |
| 141 | + <version>3.0.0</version> |
| 142 | + <executions> |
| 143 | + <execution> |
| 144 | + <id>java</id> |
| 145 | + <goals> |
| 146 | + <goal>java</goal> |
| 147 | + </goals> |
| 148 | + <configuration> |
| 149 | + <mainClass>${mainClass}</mainClass> |
| 150 | + </configuration> |
| 151 | + </execution> |
| 152 | + <execution> |
| 153 | + <id>native</id> |
| 154 | + <goals> |
| 155 | + <goal>exec</goal> |
| 156 | + </goals> |
| 157 | + <configuration> |
| 158 | + <executable>${project.build.directory}/${imageName}</executable> |
| 159 | + <workingDirectory>${project.build.directory}</workingDirectory> |
| 160 | + </configuration> |
| 161 | + </execution> |
| 162 | + </executions> |
| 163 | + </plugin> |
| 164 | + </plugins> |
| 165 | + </build> |
| 166 | + |
| 167 | +</project> |
0 commit comments