Intorduce JCR sync, compatible with native image generation.
[lgpl/argeo-commons.git] / dist / argeo-cli / pom.xml
index b067131cfc3bea72e477d01018d0a13213c1953a..c455e0a17e2c6afa4a79be6fc10b8bb7cb1eae30 100644 (file)
@@ -1,4 +1,6 @@
-<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">
+<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>
        <parent>
                <groupId>org.argeo.commons</groupId>
        <artifactId>argeo-cli</artifactId>
        <packaging>pom</packaging>
        <name>Argeo Command Line</name>
+       <properties>
+               <graalvm.version>20.0.0</graalvm.version>
+       </properties>
+       <dependencies>
+               <dependency>
+                       <groupId>org.argeo.commons</groupId>
+                       <artifactId>org.argeo.dep.cms.client</artifactId>
+                       <version>2.1.89-SNAPSHOT</version>
+               </dependency>
+               <dependency>
+                       <groupId>org.argeo.commons</groupId>
+                       <artifactId>org.argeo.dep.cms.node</artifactId>
+                       <version>2.1.89-SNAPSHOT</version>
+               </dependency>
+       </dependencies>
        <profiles>
                <profile>
                        <id>dist</id>
-                       <dependencies>
-                               <dependency>
-                                       <groupId>org.argeo.commons</groupId>
-                                       <artifactId>org.argeo.dep.cms.client</artifactId>
-                                       <version>2.1.89-SNAPSHOT</version>
-                               </dependency>
-                               <dependency>
-                                       <groupId>org.argeo.commons</groupId>
-                                       <artifactId>org.argeo.dep.cms.node</artifactId>
-                                       <version>2.1.89-SNAPSHOT</version>
-                               </dependency>
-                       </dependencies>
                        <build>
                                <plugins>
                                        <plugin>
                                </plugins>
                        </build>
                </profile>
+               <profile>
+                       <id>native-image</id>
+                       <build>
+                               <plugins>
+                                       <plugin>
+                                               <groupId>org.graalvm.nativeimage</groupId>
+                                               <artifactId>native-image-maven-plugin</artifactId>
+                                               <version>${graalvm.version}</version>
+                                               <executions>
+                                                       <execution>
+                                                               <goals>
+                                                                       <goal>native-image</goal>
+                                                               </goals>
+                                                               <phase>package</phase>
+                                                       </execution>
+                                               </executions>
+                                               <configuration>
+                                                       <imageName>argeo</imageName>
+                                                       <mainClass>org.argeo.cms.cli.ArgeoCli</mainClass>
+                                                       <buildArgs>
+                                                               --no-fallback
+                                                               --allow-incomplete-classpath
+                                                               --initialize-at-build-time=org.apache.lucene.util.AttributeImpl,org.apache.lucene.util.VirtualMethod,org.apache.lucene.util.WeakIdentityMap
+                                                               -H:EnableURLProtocols=http,https
+                                                               -H:IncludeResourceBundles=sun.security.util.Resources
+                                                               -H:ConfigurationFileDirectories=${basedir}/native-image
+                                                               -H:ReflectionConfigurationFiles=${basedir}/native-image/reflect-config.json
+                                                               -H:ResourceConfigurationFiles=${basedir}/native-image/resource-config.json
+                                                               -H:JNIConfigurationFiles=${basedir}/native-image/jni-config.json
+                                                       </buildArgs>
+                                                       <skip>false</skip>
+                                               </configuration>
+                                       </plugin>
+                               </plugins>
+                       </build>
+                       <dependencies>
+                               <dependency>
+                                       <groupId>org.graalvm.sdk</groupId>
+                                       <artifactId>graal-sdk</artifactId>
+                                       <version>${graalvm.version}</version>
+                                       <scope>provided</scope>
+                               </dependency>
+                       </dependencies>
+               </profile>
        </profiles>
 </project>