|
| 1 | +<?xml version="1.0"?> |
| 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 https://maven.apache.org/xsd/maven-4.0.0.xsd"> |
| 3 | + <modelVersion>4.0.0</modelVersion> |
| 4 | + <artifactId>opencast-admin</artifactId> |
| 5 | + <packaging>bundle</packaging> |
| 6 | + <name>Opencast :: admin</name> |
| 7 | + <parent> |
| 8 | + <groupId>org.opencastproject</groupId> |
| 9 | + <artifactId>base</artifactId> |
| 10 | + <version>18-SNAPSHOT</version> |
| 11 | + <relativePath>../../pom.xml</relativePath> |
| 12 | + </parent> |
| 13 | + <properties> |
| 14 | + <opencast.basedir>${project.basedir}/../..</opencast.basedir> |
| 15 | + <checkstyle.skip>false</checkstyle.skip> |
| 16 | + <nodejs.version>v20.10.0</nodejs.version> |
| 17 | + <!--<ui.include.resource>/admin-ui=-build/</ui.include.resource>--> |
| 18 | + </properties> |
| 19 | + <profiles> |
| 20 | + <profile> |
| 21 | + <id>frontend-no-prebuild</id> |
| 22 | + <properties> |
| 23 | + <ui.include.resource>/admin-ui=-build/</ui.include.resource> |
| 24 | + </properties> |
| 25 | + <build> |
| 26 | + <plugins> |
| 27 | + <plugin> |
| 28 | + <groupId>org.codehaus.mojo</groupId> |
| 29 | + <artifactId>exec-maven-plugin</artifactId> |
| 30 | + <configuration> |
| 31 | + <environmentVariables> |
| 32 | + <PUBLIC_PATH>/admin-ui</PUBLIC_PATH> |
| 33 | + </environmentVariables> |
| 34 | + </configuration> |
| 35 | + <executions> |
| 36 | + <execution> |
| 37 | + <id>npm ci</id> |
| 38 | + <goals> |
| 39 | + <goal>exec</goal> |
| 40 | + </goals> |
| 41 | + <phase>validate</phase> |
| 42 | + <configuration> |
| 43 | + <executable>npm</executable> |
| 44 | + <arguments> |
| 45 | + <argument>ci</argument> |
| 46 | + </arguments> |
| 47 | + </configuration> |
| 48 | + </execution> |
| 49 | + |
| 50 | + <execution> |
| 51 | + <id>npm run build</id> |
| 52 | + <goals> |
| 53 | + <goal>exec</goal> |
| 54 | + </goals> |
| 55 | + <phase>generate-resources</phase> |
| 56 | + <configuration> |
| 57 | + <executable>npm</executable> |
| 58 | + <arguments> |
| 59 | + <argument>run</argument> |
| 60 | + <argument>build</argument> |
| 61 | + </arguments> |
| 62 | + </configuration> |
| 63 | + </execution> |
| 64 | + </executions> |
| 65 | + </plugin> |
| 66 | + </plugins> |
| 67 | + </build> |
| 68 | + </profile> |
| 69 | + |
| 70 | + <profile> |
| 71 | + <id>frontend</id> |
| 72 | + <activation> |
| 73 | + <activeByDefault>true</activeByDefault> |
| 74 | + </activation> |
| 75 | + <properties> |
| 76 | + <ui.include.resource>/admin-ui=-build/</ui.include.resource> |
| 77 | + </properties> |
| 78 | + <build> |
| 79 | + <plugins> |
| 80 | + <plugin> |
| 81 | + <groupId>com.github.eirslett</groupId> |
| 82 | + <artifactId>frontend-maven-plugin</artifactId> |
| 83 | + <configuration> |
| 84 | + <nodeVersion>${nodejs.version}</nodeVersion> |
| 85 | + <installDirectory>target</installDirectory> |
| 86 | + <environmentVariables> |
| 87 | + <PUBLIC_PATH>/admin-ui</PUBLIC_PATH> |
| 88 | + </environmentVariables> |
| 89 | + </configuration> |
| 90 | + <executions> |
| 91 | + <execution> |
| 92 | + <id>install node and npm</id> |
| 93 | + <phase>validate</phase> |
| 94 | + <goals> |
| 95 | + <goal>install-node-and-npm</goal> |
| 96 | + </goals> |
| 97 | + <configuration> |
| 98 | + <nodeVersion>${node.version}</nodeVersion> |
| 99 | + </configuration> |
| 100 | + </execution> |
| 101 | + <execution> |
| 102 | + <phase>validate</phase> |
| 103 | + <id>npm ci</id> |
| 104 | + <goals> |
| 105 | + <goal>npm</goal> |
| 106 | + </goals> |
| 107 | + <configuration> |
| 108 | + <arguments>ci</arguments> |
| 109 | + </configuration> |
| 110 | + </execution> |
| 111 | + <execution> |
| 112 | + <id>npm run build</id> |
| 113 | + <goals> |
| 114 | + <goal>npm</goal> |
| 115 | + </goals> |
| 116 | + <phase>generate-resources</phase> |
| 117 | + <configuration> |
| 118 | + <arguments>run build</arguments> |
| 119 | + </configuration> |
| 120 | + </execution> |
| 121 | + </executions> |
| 122 | + </plugin> |
| 123 | + <plugin> |
| 124 | + <artifactId>maven-clean-plugin</artifactId> |
| 125 | + <configuration> |
| 126 | + <filesets> |
| 127 | + <fileset> |
| 128 | + <directory>node_modules</directory> |
| 129 | + <followSymlinks>false</followSymlinks> |
| 130 | + </fileset> |
| 131 | + </filesets> |
| 132 | + </configuration> |
| 133 | + </plugin> |
| 134 | + </plugins> |
| 135 | + </build> |
| 136 | + </profile> |
| 137 | + </profiles> |
| 138 | + <build> |
| 139 | + <plugins> |
| 140 | + <plugin> |
| 141 | + <groupId>org.apache.maven.plugins</groupId> |
| 142 | + <artifactId>maven-dependency-plugin</artifactId> |
| 143 | + </plugin> |
| 144 | + <plugin> |
| 145 | + <groupId>org.apache.felix</groupId> |
| 146 | + <artifactId>maven-bundle-plugin</artifactId> |
| 147 | + <extensions>true</extensions> |
| 148 | + <configuration> |
| 149 | + <instructions> |
| 150 | + <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName> |
| 151 | + <Build-Number>${buildNumber}</Build-Number> |
| 152 | + <Include-Resource>${ui.include.resource}</Include-Resource> |
| 153 | + <Private-Package>admin-ui.*</Private-Package> |
| 154 | + <Http-Alias>/admin-ui</Http-Alias> |
| 155 | + <Http-Classpath>/admin-ui</Http-Classpath> |
| 156 | + <Http-Welcome>index.html</Http-Welcome> |
| 157 | + </instructions> |
| 158 | + </configuration> |
| 159 | + </plugin> |
| 160 | + </plugins> |
| 161 | + </build> |
| 162 | +</project> |
0 commit comments