|
| 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>com.baeldung.j2cl.taskmanager</groupId> |
| 8 | + <artifactId>j2cl-task-manager</artifactId> |
| 9 | + <packaging>war</packaging> |
| 10 | + <version>1.0-SNAPSHOT</version> |
| 11 | + |
| 12 | + <properties> |
| 13 | + <j2cl.maven.plugin.version>0.22.0</j2cl.maven.plugin.version> |
| 14 | + <elemental2.version>1.1.0</elemental2.version> |
| 15 | + |
| 16 | + <jsinterop.base.version>1.0.0</jsinterop.base.version> |
| 17 | + <j2cl.version>v20230718-1</j2cl.version> |
| 18 | + |
| 19 | + <maven.compiler.target>11</maven.compiler.target> |
| 20 | + <maven.compiler.source>11</maven.compiler.source> |
| 21 | + |
| 22 | + <maven.compiler.plugin.version>3.8.1</maven.compiler.plugin.version> |
| 23 | + <maven.jetty.plugin.version>9.4.44.v20210927</maven.jetty.plugin.version> |
| 24 | + <maven.war.plugin.version>3.3.2</maven.war.plugin.version> |
| 25 | + </properties> |
| 26 | + |
| 27 | + <dependencies> |
| 28 | + <dependency> |
| 29 | + <groupId>com.google.elemental2</groupId> |
| 30 | + <artifactId>elemental2-dom</artifactId> |
| 31 | + <version>${elemental2.version}</version> |
| 32 | + </dependency> |
| 33 | + |
| 34 | + <dependency> |
| 35 | + <groupId>com.google.jsinterop</groupId> |
| 36 | + <artifactId>base</artifactId> |
| 37 | + <version>${jsinterop.base.version}</version> |
| 38 | + </dependency> |
| 39 | + |
| 40 | + <dependency> |
| 41 | + <groupId>com.vertispan.j2cl</groupId> |
| 42 | + <artifactId>junit-annotations</artifactId> |
| 43 | + <version>${j2cl.version}</version> |
| 44 | + <scope>test</scope> |
| 45 | + </dependency> |
| 46 | + |
| 47 | + <dependency> |
| 48 | + <groupId>com.vertispan.j2cl</groupId> |
| 49 | + <artifactId>junit-emul</artifactId> |
| 50 | + <version>${j2cl.version}</version> |
| 51 | + <scope>test</scope> |
| 52 | + </dependency> |
| 53 | + |
| 54 | + <dependency> |
| 55 | + <groupId>com.vertispan.j2cl</groupId> |
| 56 | + <artifactId>junit-emul</artifactId> |
| 57 | + <version>${j2cl.version}</version> |
| 58 | + <classifier>sources</classifier> |
| 59 | + <scope>test</scope> |
| 60 | + </dependency> |
| 61 | + </dependencies> |
| 62 | + |
| 63 | + <build> |
| 64 | + <plugins> |
| 65 | + <plugin> |
| 66 | + <artifactId>maven-compiler-plugin</artifactId> |
| 67 | + <version>${maven.compiler.plugin.version}</version> |
| 68 | + <configuration> |
| 69 | + <source>${maven.compiler.source}</source> |
| 70 | + <target>${maven.compiler.target}</target> |
| 71 | + </configuration> |
| 72 | + </plugin> |
| 73 | + <plugin> |
| 74 | + <groupId>org.apache.maven.plugins</groupId> |
| 75 | + <artifactId>maven-war-plugin</artifactId> |
| 76 | + <version>${maven.war.plugin.version}</version> |
| 77 | + </plugin> |
| 78 | + <plugin> |
| 79 | + <groupId>com.vertispan.j2cl</groupId> |
| 80 | + <artifactId>j2cl-maven-plugin</artifactId> |
| 81 | + <version>${j2cl.maven.plugin.version}</version> |
| 82 | + <executions> |
| 83 | + <execution> |
| 84 | + <goals> |
| 85 | + <goal>build</goal> |
| 86 | + </goals> |
| 87 | + </execution> |
| 88 | + <execution> |
| 89 | + <id>test-js</id> |
| 90 | + <goals> |
| 91 | + <goal>test</goal> |
| 92 | + </goals> |
| 93 | + <configuration> |
| 94 | + <!-- In order to use htmlunit, we must compile to |
| 95 | + remove es6 classes --> |
| 96 | + <compilationLevel>ADVANCED</compilationLevel> |
| 97 | + </configuration> |
| 98 | + </execution> |
| 99 | + </executions> |
| 100 | + <configuration> |
| 101 | + <tests> |
| 102 | + <test>com.baeldung.j2cl.taskmanager.MyJ2CLAppTest</test> |
| 103 | + </tests> |
| 104 | + </configuration> |
| 105 | + </plugin> |
| 106 | + <plugin> |
| 107 | + <groupId>org.eclipse.jetty</groupId> |
| 108 | + <artifactId>jetty-maven-plugin</artifactId> |
| 109 | + <version>${maven.jetty.plugin.version}</version> |
| 110 | + <configuration> |
| 111 | + <webApp> |
| 112 | + <_initParams> |
| 113 | + <org.eclipse.jetty.servlet.Default.useFileMappedBuffer> |
| 114 | + false</org.eclipse.jetty.servlet.Default.useFileMappedBuffer> |
| 115 | + </_initParams> |
| 116 | + <resourceBases> |
| 117 | + <!-- Serve static content without copying from |
| 118 | + src/main/webapp --> |
| 119 | + <resourceBase>src/main/webapp</resourceBase> |
| 120 | + <!-- Serve compiled JS built by J2CL --> |
| 121 | + <resourceBase> |
| 122 | + ${project.build.directory}/${project.build.finalName}</resourceBase> |
| 123 | + </resourceBases> |
| 124 | + </webApp> |
| 125 | + </configuration> |
| 126 | + </plugin> |
| 127 | + </plugins> |
| 128 | + </build> |
| 129 | +</project> |
0 commit comments