|
7 | 7 | <!-- Use your verified namespace --> |
8 | 8 | <groupId>io.github.beehive-lab</groupId> |
9 | 9 | <artifactId>gpu-llama3</artifactId> |
10 | | - <version>0.3.1</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 | | - <maven.compiler.source>25</maven.compiler.source> |
41 | | - <maven.compiler.target>25</maven.compiler.target> |
| 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) --> |
| 46 | + <maven.compiler.source>21</maven.compiler.source> |
| 47 | + <maven.compiler.target>21</maven.compiler.target> |
42 | 48 | <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> |
43 | 49 | <maven.javadoc.skip>true</maven.javadoc.skip> |
44 | 50 | <gpg.skip>true</gpg.skip> |
|
54 | 60 | <dependency> |
55 | 61 | <groupId>io.github.beehive-lab</groupId> |
56 | 62 | <artifactId>tornado-api</artifactId> |
57 | | - <version>3.0.0-jdk25</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>3.0.0-jdk25</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 | + jdk.incubator.vector is added only for JDK21 (see jdk21 profile below). |
| 76 | + On JDK25 Vector API is stable; the add-modules flag is not needed. --> |
69 | 77 | <plugin> |
70 | 78 | <groupId>org.apache.maven.plugins</groupId> |
71 | 79 | <artifactId>maven-compiler-plugin</artifactId> |
72 | 80 | <version>3.11.0</version> |
73 | 81 | <configuration> |
74 | 82 | <compilerArgs> |
75 | 83 | <arg>--enable-preview</arg> |
76 | | - <arg>--add-modules</arg> |
77 | | - <arg>jdk.incubator.vector</arg> |
78 | 84 | </compilerArgs> |
79 | 85 | </configuration> |
80 | 86 | </plugin> |
81 | 87 |
|
| 88 | + <!-- Flatten: resolves ${revision}${jdk.version.suffix} in the published POM --> |
| 89 | + <plugin> |
| 90 | + <groupId>org.codehaus.mojo</groupId> |
| 91 | + <artifactId>flatten-maven-plugin</artifactId> |
| 92 | + <version>1.6.0</version> |
| 93 | + <configuration> |
| 94 | + <updatePomFile>true</updatePomFile> |
| 95 | + <flattenMode>resolveCiFriendliesOnly</flattenMode> |
| 96 | + </configuration> |
| 97 | + <executions> |
| 98 | + <execution> |
| 99 | + <id>flatten</id> |
| 100 | + <phase>process-resources</phase> |
| 101 | + <goals><goal>flatten</goal></goals> |
| 102 | + </execution> |
| 103 | + <execution> |
| 104 | + <id>flatten.clean</id> |
| 105 | + <phase>clean</phase> |
| 106 | + <goals><goal>clean</goal></goals> |
| 107 | + </execution> |
| 108 | + </executions> |
| 109 | + </plugin> |
| 110 | + |
82 | 111 | <!-- Shade (fat jar) --> |
83 | 112 | <plugin> |
84 | 113 | <groupId>org.apache.maven.plugins</groupId> |
|
103 | 132 |
|
104 | 133 | <!-- Profiles for optional/conditional builds --> |
105 | 134 | <profiles> |
| 135 | + |
| 136 | + <!-- ─── JDK 21 ─────────────────────────────────────────────────────────── |
| 137 | + Auto-activates for JDK 21.x builds. |
| 138 | + Publishes: gpu-llama3:${revision} (no suffix) |
| 139 | + TornadoVM: 3.0.0 |
| 140 | + Adds add-modules jdk.incubator.vector (still incubating in JDK21) |
| 141 | + ─────────────────────────────────────────────────────────────────────── --> |
| 142 | + <profile> |
| 143 | + <id>jdk21</id> |
| 144 | + <activation><jdk>[21,25)</jdk></activation> |
| 145 | + <properties> |
| 146 | + <maven.compiler.source>21</maven.compiler.source> |
| 147 | + <maven.compiler.target>21</maven.compiler.target> |
| 148 | + <tornadovm.version>3.0.0</tornadovm.version> |
| 149 | + <jdk.version.suffix></jdk.version.suffix> |
| 150 | + </properties> |
| 151 | + <build> |
| 152 | + <plugins> |
| 153 | + <plugin> |
| 154 | + <groupId>org.apache.maven.plugins</groupId> |
| 155 | + <artifactId>maven-compiler-plugin</artifactId> |
| 156 | + <configuration> |
| 157 | + <!-- Appended to enable-preview already in main build --> |
| 158 | + <compilerArgs combine.children="append"> |
| 159 | + <arg>--add-modules</arg> |
| 160 | + <arg>jdk.incubator.vector</arg> |
| 161 | + </compilerArgs> |
| 162 | + </configuration> |
| 163 | + </plugin> |
| 164 | + </plugins> |
| 165 | + </build> |
| 166 | + </profile> |
| 167 | + |
| 168 | + <!-- ─── JDK 25 ─────────────────────────────────────────────────────────── |
| 169 | + Auto-activates for JDK 25.0.2+ builds (minimum required version). |
| 170 | + Publishes: gpu-llama3:${revision}-jdk25 |
| 171 | + TornadoVM: 3.0.0-jdk25 |
| 172 | + Vector API is stable in JDK25; add-modules jdk.incubator.vector not needed |
| 173 | + ─────────────────────────────────────────────────────────────────────── --> |
| 174 | + <profile> |
| 175 | + <id>jdk25</id> |
| 176 | + <activation><jdk>[25.0.2,)</jdk></activation> |
| 177 | + <properties> |
| 178 | + <maven.compiler.source>25</maven.compiler.source> |
| 179 | + <maven.compiler.target>25</maven.compiler.target> |
| 180 | + <tornadovm.version>3.0.0-jdk25</tornadovm.version> |
| 181 | + <jdk.version.suffix>-jdk25</jdk.version.suffix> |
| 182 | + </properties> |
| 183 | + </profile> |
| 184 | + |
106 | 185 | <profile> |
107 | 186 | <id>release</id> |
108 | 187 | <properties> |
|
132 | 211 | <artifactId>maven-javadoc-plugin</artifactId> |
133 | 212 | <version>3.6.3</version> |
134 | 213 | <configuration> |
135 | | - <source>21</source> |
136 | | - <release>21</release> |
| 214 | + <source>${maven.compiler.source}</source> |
| 215 | + <release>${maven.compiler.source}</release> |
137 | 216 | <additionalJOptions> |
138 | 217 | <additionalJOption>--enable-preview</additionalJOption> |
139 | | - <additionalJOption>--add-modules=jdk.incubator.vector</additionalJOption> |
140 | 218 | </additionalJOptions> |
141 | 219 | <additionalOptions> |
142 | 220 | <additionalOption>--enable-preview</additionalOption> |
|
0 commit comments