|
7 | 7 | <!-- Use your verified namespace --> |
8 | 8 | <groupId>io.github.beehive-lab</groupId> |
9 | 9 | <artifactId>gpu-llama3</artifactId> |
10 | | - <version>0.3.3</version> <!-- release version (no -SNAPSHOT) --> |
| 10 | + <version>${revision}${jdk.version.suffix}</version> |
11 | 11 |
|
12 | 12 | <name>GPU Llama3</name> |
13 | 13 | <description>GPU-accelerated LLaMA3 inference using TornadoVM</description> |
|
37 | 37 | </scm> |
38 | 38 |
|
39 | 39 | <properties> |
| 40 | + <!-- CI-friendly version: resolved by flatten-maven-plugin at build time --> |
| 41 | + <revision>0.3.1</revision> |
| 42 | + <jdk.version.suffix></jdk.version.suffix> <!-- empty=JDK21, -jdk25=JDK25 --> |
| 43 | + <!-- TornadoVM version: overridden per JDK profile --> |
| 44 | + <tornadovm.version>3.0.0</tornadovm.version> <!-- JDK21 default --> |
| 45 | + <!-- Compiler defaults (overridden by JDK profiles below) --> |
40 | 46 | <maven.compiler.source>21</maven.compiler.source> |
41 | 47 | <maven.compiler.target>21</maven.compiler.target> |
42 | 48 | <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> |
|
54 | 60 | <dependency> |
55 | 61 | <groupId>io.github.beehive-lab</groupId> |
56 | 62 | <artifactId>tornado-api</artifactId> |
57 | | - <version>2.2.0</version> |
| 63 | + <version>${tornadovm.version}</version> |
58 | 64 | </dependency> |
59 | 65 | <dependency> |
60 | 66 | <groupId>io.github.beehive-lab</groupId> |
61 | 67 | <artifactId>tornado-runtime</artifactId> |
62 | | - <version>2.2.0</version> |
| 68 | + <version>${tornadovm.version}</version> |
63 | 69 | </dependency> |
64 | 70 | </dependencies> |
65 | 71 |
|
66 | 72 | <build> |
67 | 73 | <plugins> |
68 | | - <!-- Compiler --> |
| 74 | + <!-- Compiler: enable-preview for both JDKs. |
| 75 | + --add-modules jdk.incubator.vector is added per JDK profile (see below). |
| 76 | + The Vector API remains in jdk.incubator.vector on both JDK 21 and JDK 25 |
| 77 | + (JEP 508 — 10th Incubator in JDK 25); the flag is required for all JDKs. --> |
69 | 78 | <plugin> |
70 | 79 | <groupId>org.apache.maven.plugins</groupId> |
71 | 80 | <artifactId>maven-compiler-plugin</artifactId> |
72 | 81 | <version>3.11.0</version> |
73 | 82 | <configuration> |
74 | 83 | <compilerArgs> |
75 | 84 | <arg>--enable-preview</arg> |
76 | | - <arg>--add-modules</arg> |
77 | | - <arg>jdk.incubator.vector</arg> |
78 | 85 | </compilerArgs> |
79 | 86 | </configuration> |
80 | 87 | </plugin> |
81 | 88 |
|
| 89 | + <!-- Flatten: resolves ${revision}${jdk.version.suffix} in the published POM --> |
| 90 | + <plugin> |
| 91 | + <groupId>org.codehaus.mojo</groupId> |
| 92 | + <artifactId>flatten-maven-plugin</artifactId> |
| 93 | + <version>1.6.0</version> |
| 94 | + <configuration> |
| 95 | + <updatePomFile>true</updatePomFile> |
| 96 | + <flattenMode>resolveCiFriendliesOnly</flattenMode> |
| 97 | + </configuration> |
| 98 | + <executions> |
| 99 | + <execution> |
| 100 | + <id>flatten</id> |
| 101 | + <phase>process-resources</phase> |
| 102 | + <goals><goal>flatten</goal></goals> |
| 103 | + </execution> |
| 104 | + <execution> |
| 105 | + <id>flatten.clean</id> |
| 106 | + <phase>clean</phase> |
| 107 | + <goals><goal>clean</goal></goals> |
| 108 | + </execution> |
| 109 | + </executions> |
| 110 | + </plugin> |
| 111 | + |
82 | 112 | <!-- Shade (fat jar) --> |
83 | 113 | <plugin> |
84 | 114 | <groupId>org.apache.maven.plugins</groupId> |
|
103 | 133 |
|
104 | 134 | <!-- Profiles for optional/conditional builds --> |
105 | 135 | <profiles> |
| 136 | + |
| 137 | + <!-- ─── JDK 21 ─────────────────────────────────────────────────────────── |
| 138 | + Auto-activates for JDK 21.x builds. |
| 139 | + Publishes: gpu-llama3:${revision} (no suffix) |
| 140 | + TornadoVM: 3.0.0 |
| 141 | + Adds add-modules jdk.incubator.vector (still incubating in JDK21) |
| 142 | + ─────────────────────────────────────────────────────────────────────── --> |
| 143 | + <profile> |
| 144 | + <id>jdk21</id> |
| 145 | + <activation><jdk>[21,25)</jdk></activation> |
| 146 | + <properties> |
| 147 | + <maven.compiler.source>21</maven.compiler.source> |
| 148 | + <maven.compiler.target>21</maven.compiler.target> |
| 149 | + <tornadovm.version>3.0.0</tornadovm.version> |
| 150 | + <jdk.version.suffix></jdk.version.suffix> |
| 151 | + </properties> |
| 152 | + <build> |
| 153 | + <plugins> |
| 154 | + <plugin> |
| 155 | + <groupId>org.apache.maven.plugins</groupId> |
| 156 | + <artifactId>maven-compiler-plugin</artifactId> |
| 157 | + <configuration> |
| 158 | + <!-- Appended to enable-preview already in main build --> |
| 159 | + <compilerArgs combine.children="append"> |
| 160 | + <arg>--add-modules</arg> |
| 161 | + <arg>jdk.incubator.vector</arg> |
| 162 | + </compilerArgs> |
| 163 | + </configuration> |
| 164 | + </plugin> |
| 165 | + </plugins> |
| 166 | + </build> |
| 167 | + </profile> |
| 168 | + |
| 169 | + <!-- ─── JDK 25 ─────────────────────────────────────────────────────────── |
| 170 | + Auto-activates for JDK 25.0.2+ builds (minimum required version). |
| 171 | + Publishes: gpu-llama3:${revision}-jdk25 |
| 172 | + TornadoVM: 3.0.0-jdk25 |
| 173 | + Vector API is still incubating in JDK 25 (JEP 508 — 10th Incubator); |
| 174 | + --add-modules jdk.incubator.vector is required for compilation. |
| 175 | + ─────────────────────────────────────────────────────────────────────── --> |
| 176 | + <profile> |
| 177 | + <id>jdk25</id> |
| 178 | + <activation><jdk>[25.0.2,)</jdk></activation> |
| 179 | + <properties> |
| 180 | + <maven.compiler.source>25</maven.compiler.source> |
| 181 | + <maven.compiler.target>25</maven.compiler.target> |
| 182 | + <tornadovm.version>3.0.0-jdk25</tornadovm.version> |
| 183 | + <jdk.version.suffix>-jdk25</jdk.version.suffix> |
| 184 | + </properties> |
| 185 | + <build> |
| 186 | + <plugins> |
| 187 | + <plugin> |
| 188 | + <groupId>org.apache.maven.plugins</groupId> |
| 189 | + <artifactId>maven-compiler-plugin</artifactId> |
| 190 | + <configuration> |
| 191 | + <!-- Appended to enable-preview already in main build --> |
| 192 | + <compilerArgs combine.children="append"> |
| 193 | + <arg>--add-modules</arg> |
| 194 | + <arg>jdk.incubator.vector</arg> |
| 195 | + </compilerArgs> |
| 196 | + </configuration> |
| 197 | + </plugin> |
| 198 | + </plugins> |
| 199 | + </build> |
| 200 | + </profile> |
| 201 | + |
106 | 202 | <profile> |
107 | 203 | <id>release</id> |
108 | 204 | <properties> |
|
126 | 222 | </executions> |
127 | 223 | </plugin> |
128 | 224 |
|
129 | | - <!-- Javadocs with preview feature support --> |
| 225 | + <!-- Javadocs with preview feature support. |
| 226 | + --add-modules jdk.incubator.vector is required on all currently |
| 227 | + supported JDKs (21 and 25) because the Vector API remains in the |
| 228 | + incubator module (JEP 508 — 10th Incubator in JDK 25). --> |
130 | 229 | <plugin> |
131 | 230 | <groupId>org.apache.maven.plugins</groupId> |
132 | 231 | <artifactId>maven-javadoc-plugin</artifactId> |
133 | 232 | <version>3.6.3</version> |
134 | 233 | <configuration> |
135 | | - <source>21</source> |
136 | | - <release>21</release> |
| 234 | + <source>${maven.compiler.source}</source> |
| 235 | + <release>${maven.compiler.source}</release> |
137 | 236 | <additionalJOptions> |
138 | 237 | <additionalJOption>--enable-preview</additionalJOption> |
139 | | - <additionalJOption>--add-modules=jdk.incubator.vector</additionalJOption> |
| 238 | + <additionalJOption>--add-modules</additionalJOption> |
| 239 | + <additionalJOption>jdk.incubator.vector</additionalJOption> |
140 | 240 | </additionalJOptions> |
141 | 241 | <additionalOptions> |
142 | 242 | <additionalOption>--enable-preview</additionalOption> |
| 243 | + <additionalOption>--add-modules jdk.incubator.vector</additionalOption> |
143 | 244 | </additionalOptions> |
144 | 245 | <failOnError>false</failOnError> |
145 | 246 | <failOnWarnings>false</failOnWarnings> |
|
0 commit comments