Advertisement
Guest User

pom.xml

a guest
Oct 11th, 2019
246
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 4.96 KB | None | 0 0
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <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/xsd/maven-4.0.0.xsd">
  3.     <modelVersion>4.0.0</modelVersion>
  4.  
  5.     <groupId>com.mycompany</groupId>
  6.     <artifactId>mavenproject1</artifactId>
  7.     <version>1.0-SNAPSHOT</version>
  8.     <packaging>jar</packaging>
  9.  
  10.     <name>mavenproject1</name>
  11.  
  12.     <properties>
  13.         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  14.         <mainClass>com.mycompany.mavenproject1.MainApp</mainClass>
  15.     </properties>
  16.  
  17.     <organization>
  18.         <!-- Used as the 'Vendor' for JNLP generation -->
  19.         <name>Your Organisation</name>
  20.     </organization>
  21.  
  22.     <build>
  23.         <plugins>
  24.             <plugin>
  25.                 <groupId>org.apache.maven.plugins</groupId>
  26.                 <artifactId>maven-dependency-plugin</artifactId>
  27.                 <version>2.6</version>
  28.                 <executions>
  29.                     <execution>
  30.                         <id>unpack-dependencies</id>
  31.                         <phase>package</phase>
  32.                         <goals>
  33.                             <goal>unpack-dependencies</goal>
  34.                         </goals>
  35.                         <configuration>
  36.                             <excludeScope>system</excludeScope>
  37.                             <excludeGroupIds>junit,org.mockito,org.hamcrest</excludeGroupIds>
  38.                             <outputDirectory>${project.build.directory}/classes</outputDirectory>
  39.                         </configuration>
  40.                     </execution>
  41.                 </executions>
  42.             </plugin>
  43.             <plugin>
  44.                 <groupId>org.codehaus.mojo</groupId>
  45.                 <artifactId>exec-maven-plugin</artifactId>
  46.                 <version>1.2.1</version>
  47.                 <executions>
  48.                     <execution>
  49.                         <id>unpack-dependencies</id>
  50.                        
  51.                         <phase>package</phase>
  52.                         <goals>
  53.                             <goal>exec</goal>
  54.                         </goals>
  55.                         <configuration>
  56.                             <executable>${java.home}/../bin/javafxpackager</executable>
  57.                             <arguments>
  58.                                 <argument>-createjar</argument>
  59.                                 <argument>-nocss2bin</argument>
  60.                                 <argument>-appclass</argument>
  61.                                 <argument>${mainClass}</argument>
  62.                                 <argument>-srcdir</argument>
  63.                                 <argument>${project.build.directory}/classes</argument>
  64.                                 <argument>-outdir</argument>
  65.                                 <argument>${project.build.directory}</argument>
  66.                                 <argument>-outfile</argument>
  67.                                 <argument>${project.build.finalName}.jar</argument>
  68.                             </arguments>
  69.                         </configuration>
  70.                     </execution>
  71.                     <execution>
  72.                         <id>default-cli</id>
  73.                         <goals>
  74.                             <goal>exec</goal>                            
  75.                         </goals>
  76.                         <configuration>
  77.                             <executable>${java.home}/bin/java</executable>
  78.                             <commandlineArgs>${runfx.args}</commandlineArgs>
  79.                         </configuration>
  80.                     </execution>
  81.                 </executions>  
  82.             </plugin>
  83.             <plugin>
  84.                 <groupId>org.apache.maven.plugins</groupId>
  85.                 <artifactId>maven-compiler-plugin</artifactId>
  86.                 <version>3.1</version>
  87.                 <configuration>
  88.                     <source>13</source>
  89.                     <target>13</target>
  90.                     <compilerArguments>
  91.                         <bootclasspath>${sun.boot.class.path}${path.separator}${java.home}/lib/jfxrt.jar</bootclasspath>
  92.                     </compilerArguments>
  93.                 </configuration>
  94.             </plugin>
  95.             <plugin>
  96.                 <groupId>org.apache.maven.plugins</groupId>
  97.                 <artifactId>maven-surefire-plugin</artifactId>
  98.                 <version>2.16</version>
  99.                 <configuration>
  100.                     <additionalClasspathElements>
  101.                         <additionalClasspathElement>${java.home}/lib/jfxrt.jar</additionalClasspathElement>
  102.                     </additionalClasspathElements>
  103.                 </configuration>
  104.             </plugin>
  105.         </plugins>
  106.     </build>
  107.     <dependencies>
  108.         <dependency>
  109.             <groupId>org.openjfx</groupId>
  110.             <artifactId>javafx-fxml</artifactId>
  111.             <version>13</version>
  112.         </dependency>
  113.     </dependencies>
  114. </project>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement