Skip to content
Snippets Groups Projects
pom.xml 10.1 KiB
Newer Older
benemart's avatar
benemart committed
<?xml version="1.0" encoding="UTF-8"?>
<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">
    <modelVersion>4.0.0</modelVersion>

    <artifactId>ui-referential</artifactId>
    <packaging>jar</packaging>
    <name>VITAMUI UI Referential</name>

    <parent>
        <groupId>fr.gouv.vitamui</groupId>
        <artifactId>ui-parent</artifactId>
        <version>1.0.0-SNAPSHOT</version>
    </parent>

    <properties>
		<angular.base.href>/referential/</angular.base.href>
        <angular.build.project>referential</angular.build.project>
        <rpm.skip>false</rpm.skip>
        <sonar.sources>src/main/java</sonar.sources>
        <swagger.dir>ui</swagger.dir>
        <swagger.skip>false</swagger.skip>
        <webpack.skip>false</webpack.skip>
        <webpack.test.skip>false</webpack.test.skip>
        <skipTests>false</skipTests>
        <skipAllFrontend>false</skipAllFrontend>
    </properties>

    <dependencies>

        <!--VITAMUI -->
        <dependency>
            <groupId>fr.gouv.vitamui.ui</groupId>
            <artifactId>ui-commons</artifactId>
        </dependency>
        <dependency>
            <groupId>fr.gouv.vitamui.commons</groupId>
            <artifactId>commons-api</artifactId>
        </dependency>
        <dependency>
            <groupId>fr.gouv.vitamui</groupId>
            <artifactId>referential-commons</artifactId>
        </dependency>
        <dependency>
            <groupId>fr.gouv.vitamui.commons</groupId>
            <artifactId>commons-rest</artifactId>
        </dependency>
        <dependency>
            <groupId>fr.gouv.vitamui</groupId>
            <artifactId>referential-external-client</artifactId>
        </dependency>
        <dependency>
            <groupId>fr.gouv.vitamui</groupId>
            <artifactId>ui-frontend</artifactId>
            <scope>provided</scope>
            <type>pom</type>
            <version>${project.version}</version>
        </dependency>

        <!-- SPRING BOOT -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-actuator</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-configuration-processor</artifactId>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-consul-discovery</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-security</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-devtools</artifactId>
            <scope>provided</scope>
        </dependency>

        <!-- Documentation -->
        <dependency>
            <groupId>io.springfox</groupId>
            <artifactId>springfox-swagger2</artifactId>
        </dependency>
        <dependency>
            <groupId>io.springfox</groupId>
            <artifactId>springfox-swagger-ui</artifactId>
        </dependency>

        <!-- UTILS -->
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpclient</artifactId>
        </dependency>

        <!--TEST -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework.security</groupId>
            <artifactId>spring-security-test</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>fr.gouv.vitamui.commons</groupId>
            <artifactId>commons-test</artifactId>
            <type>test-jar</type>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>fr.gouv.vitamui.ui</groupId>
            <artifactId>ui-commons</artifactId>
            <type>test-jar</type>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>commons-httpclient</groupId>
            <artifactId>commons-httpclient</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <resources>
            <resource>
                <directory>target/www/</directory>
                <targetPath>static/</targetPath>
            </resource>
            <resource>
                <directory>src/main/resources</directory>
            </resource>
        </resources>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <id>build-info</id>
                        <goals>
                            <goal>build-info</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>spring-boot-repackage</id>
                        <goals>
                            <goal>repackage</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <executable>true</executable>
                    <attach>false</attach> <!-- Need to use the original jar for integration-tests -->
                    <mainClass>fr.gouv.vitamui.referential.ReferentialApplication</mainClass>
benemart's avatar
benemart committed
                    <arguments>
                        <!-- use src/main/config/application-dev.yml when using mvn spring-boot:run -->
                        <!-- See : https://docs.spring.io/spring-boot/docs/current/reference/html/boot-features-external-config.html#boot-features-external-config-application-property-files -->
                        <argument>--spring.config.additional-location=file:${basedir}/src/main/config/ui-referential-application-dev.yml</argument>
                    </arguments>
                </configuration>
            </plugin>
            <plugin>
                <groupId>com.github.eirslett</groupId>
                <artifactId>frontend-maven-plugin</artifactId>
                <version>${maven.frontend.plugin.version}</version>
                <configuration>
                    <workingDirectory>${maven.multiModuleProjectDirectory}/ui/ui-frontend</workingDirectory>
                    <installDirectory>${maven.multiModuleProjectDirectory}/ui/ui-frontend</installDirectory>
                </configuration>
                <executions>
                    <execution>
                        <id>install node and npm</id>
                        <goals>
                            <goal>install-node-and-npm</goal>
                        </goals>
                        <phase>initialize</phase>
                        <configuration>
                            <skip>${skipAllFrontend}</skip>
                            <nodeVersion>${node.version}</nodeVersion>
                            <npmVersion>${npm.version}</npmVersion>
                        </configuration>
                    </execution>
                    <execution>
                        <id>npm install</id>
                        <goals>
                            <goal>npm</goal>
                        </goals>
                        <phase>generate-sources</phase>
                        <configuration>
                            <skip>${skipAllFrontend}</skip>
                            <arguments>install --loglevel warn</arguments>
                        </configuration>
                    </execution>
                    <!-- copy scss from vitamui-library to other projects -->
                    <execution>
                        <id>copy scss</id>
                        <goals>
                        <goal>npm</goal>
                        </goals>
                        <phase>generate-sources</phase>
                        <configuration>
                        <skip>${skipAllFrontend}</skip>
                        <arguments>run copy-scss:vitamui-library</arguments>
                        </configuration>
                    </execution>
benemart's avatar
benemart committed
                    <execution>
                        <id>npm run build</id>
                        <goals>
                            <goal>npm</goal>
                        </goals>
                        <phase>process-sources</phase>
                        <configuration>
                            <skip>${skipAllFrontend}</skip>
                            <arguments>run ng-high-memory build -- --project=referential --output-path=${project.basedir}/target/www --base-href=${angular.base.href} --deploy-url=${angular.base.href}</arguments>
                        </configuration>
                    </execution>
                    <execution>
                        <id>npm test</id>
                        <phase>test</phase>
                        <goals>
                            <goal>npm</goal>
                        </goals>
                        <configuration>
                            <skip>${skipTests}</skip>
                            <arguments>run test:conf-ci</arguments>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>