Posted By

user3456789 on 04/20/19


Tagged


Versions (?)

pom.xml


 / Published in: XML
 

pom.xml

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <project xmlns="http://maven.apache.org/POM/4.0.0"
  3. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  4. xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  5. <modelVersion>4.0.0</modelVersion>
  6.  
  7. <groupId>project2</groupId>
  8. <artifactId>project2</artifactId>
  9. <version>1.0-SNAPSHOT</version>
  10. <packaging>war</packaging>
  11.  
  12. <properties>
  13. <java.version>1.8</java.version>
  14. <teavm.version>0.5.1</teavm.version>
  15. <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  16. </properties>
  17. <dependencies>
  18. <dependency>
  19. <groupId>com.google.code.gson</groupId>
  20. <artifactId>gson</artifactId>
  21. <version>2.8.0</version>
  22. </dependency>
  23. <dependency>
  24. <groupId>org.teavm</groupId>
  25. <artifactId>teavm-classlib</artifactId>
  26. <version>0.4.1</version>
  27. <scope>provided</scope>
  28. </dependency>
  29.  
  30. <dependency>
  31. <groupId>org.teavm</groupId>
  32. <artifactId>teavm-classlib</artifactId>
  33. <version>${teavm.version}</version>
  34. <scope>provided</scope>
  35. </dependency>
  36.  
  37. <!-- JavaScriptObjects (JSO) - a JavaScript binding for TeaVM -->
  38. <dependency>
  39. <groupId>org.teavm</groupId>
  40. <artifactId>teavm-jso-apis</artifactId>
  41. <version>${teavm.version}</version>
  42. <scope>provided</scope>
  43. </dependency>
  44.  
  45. <!-- Servlet 3.1 specification -->
  46. <dependency>
  47. <groupId>javax.servlet</groupId>
  48. <artifactId>javax.servlet-api</artifactId>
  49. <version>3.1.0</version>
  50. <scope>provided</scope>
  51. </dependency>
  52. </dependencies>
  53.  
  54. <build>
  55. <plugins>
  56. <plugin>
  57. <groupId>org.apache.maven.plugins</groupId>
  58. <artifactId>maven-compiler-plugin</artifactId>
  59. <configuration>
  60. <source>1.7</source>
  61. <target>1.7</target>
  62. </configuration>
  63. </plugin>
  64. <!-- Configure Java compiler to use Java 8 syntax -->
  65. <plugin>
  66. <artifactId>maven-compiler-plugin</artifactId>
  67. <version>3.1</version>
  68. <configuration>
  69. <source>${java.version}</source>
  70. <target>${java.version}</target>
  71. </configuration>
  72. </plugin>
  73.  
  74. <!-- Configure WAR plugin to include JavaScript files generated by TeaVM -->
  75. <plugin>
  76. <artifactId>maven-war-plugin</artifactId>
  77. <version>2.4</version>
  78. <configuration>
  79. <webResources>
  80. <resource>
  81. <directory>${project.build.directory}/generated/js</directory>
  82. </resource>
  83. </webResources>
  84. </configuration>
  85. </plugin>
  86.  
  87. <!-- Configure TeaVM -->
  88. <plugin>
  89. <groupId>org.teavm</groupId>
  90. <artifactId>teavm-maven-plugin</artifactId>
  91. <version>${teavm.version}</version>
  92. <executions>
  93. <execution>
  94. <id>web-client</id>
  95. <goals>
  96. <goal>compile</goal>
  97. </goals>
  98. <configuration>
  99. <!-- Directory where TeaVM should put generated files. This configuration conforms to the settings
  100. of the WAR plugin -->
  101. <targetDirectory>${project.build.directory}/generated/js/teavm</targetDirectory>
  102.  
  103. <!-- Main class, containing static void main(String[]) -->
  104. <mainClass>com.project2.GetURLContent</mainClass>
  105.  
  106. <!-- Whether TeaVM should produce minified JavaScript. Can reduce JavaScript file size more than
  107. two times -->
  108. <minifying>true</minifying>
  109.  
  110. <!-- Whether TeaVM should produce debug information for its built-in debugger -->
  111. <debugInformationGenerated>true</debugInformationGenerated>
  112.  
  113. <!-- Whether TeaVM should produce source maps file -->
  114. <sourceMapsGenerated>true</sourceMapsGenerated>
  115.  
  116. <!-- Whether TeaVM should also put source files into output directory,
  117. for compatibility with source maps -->
  118. <sourceFilesCopied>true</sourceFilesCopied>
  119.  
  120. <!-- Optimization level. Valid values are: SIMPLE, ADVANCED, FULL -->
  121. <optimizationLevel>ADVANCED</optimizationLevel>
  122. </configuration>
  123. </execution>
  124. </executions>
  125. </plugin>
  126.  
  127. </plugins>
  128. </build>
  129.  
  130. </project>

Report this snippet  

You need to login to post a comment.