<skip>${skipSanityChecks}</skip>
</configuration>
</plugin>
+ <plugin>
+ <groupId>com.github.eirslett</groupId>
+ <artifactId>frontend-maven-plugin</artifactId>
+ <version>0.0.14</version>
+ </plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<artifactId>sonar-packaging-maven-plugin</artifactId>
<version>1.9</version>
</plugin>
- <plugin>
- <groupId>ro.isdc.wro4j</groupId>
- <artifactId>wro4j-maven-plugin</artifactId>
- <version>1.7.2</version>
- </plugin>
</plugins>
</pluginManagement>
<packaging>war</packaging>
<name>SonarQube :: Server</name>
+ <properties>
+ <gruntTask>default</gruntTask>
+ </properties>
+
<dependencies>
<dependency>
<groupId>com.google.code.gson</groupId>
<plugin>
<groupId>com.github.eirslett</groupId>
<artifactId>frontend-maven-plugin</artifactId>
- <version>0.0.14</version>
<executions>
<execution>
<phase>generate-resources</phase>
<goals>
<goal>grunt</goal>
</goals>
+ <configuration>
+ <arguments>${gruntTask}</arguments>
+ </configuration>
</execution>
</executions>
</plugin>
<plugin>
- <groupId>ro.isdc.wro4j</groupId>
- <artifactId>wro4j-maven-plugin</artifactId>
- <executions>
- <execution>
- <phase>prepare-package</phase>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- <configuration>
- <targetGroups>sonar</targetGroups>
- <minimize>true</minimize>
- <cssDestinationFolder>${project.build.directory}/${project.build.finalName}/stylesheets</cssDestinationFolder>
- <jsDestinationFolder>${project.build.directory}/${project.build.finalName}/javascripts</jsDestinationFolder>
- <contextFolder>${basedir}/src/main/webapp/</contextFolder>
- <wroFile>${basedir}/wro.xml</wroFile>
- <wroManagerFactory>ro.isdc.wro.extensions.manager.standalone.GoogleStandaloneManagerFactory
- </wroManagerFactory>
- <ignoreMissingResources>false</ignoreMissingResources>
- </configuration>
- </plugin>
-
- <plugin>
- <groupId>com.github.bringking</groupId>
- <artifactId>requirejs-maven-plugin</artifactId>
- <version>2.0.3</version>
+ <artifactId>maven-resources-plugin</artifactId>
<executions>
<execution>
- <phase>prepare-package</phase>
+ <id>copy-generated-webapp</id>
+ <!-- must be after the execution of grunt -->
+ <phase>process-resources</phase>
<goals>
- <goal>optimize</goal>
+ <goal>copy-resources</goal>
</goals>
+ <configuration>
+ <outputDirectory>${project.build.directory}/${project.build.finalName}</outputDirectory>
+ <overwrite>false</overwrite>
+ <resources>
+ <resource>
+ <directory>src/main/webapp/build</directory>
+ <filtering>false</filtering>
+ </resource>
+ </resources>
+ </configuration>
</execution>
</executions>
- <configuration>
- <configFile>${basedir}/src/main/webapp/javascripts/build.js</configFile>
- <optimizerParameters>
- <parameter>dir=${project.build.directory}/${project.build.finalName}/javascripts</parameter>
- <parameter>skipDirOptimize=true</parameter>
- <parameter>keepBuildDir=true</parameter>
- </optimizerParameters>
- </configuration>
</plugin>
<plugin>
</execution>
</executions>
</plugin>
-
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<packagingExcludes>
- **/*.log,*.iml,WEB-INF/script/,WEB-INF/test/,javascripts/*-min.js,stylesheets/*-min.css,javascripts/tests/**/*
+ **/*.log,*.iml,WEB-INF/script/,WEB-INF/test/,javascripts/*-min.js,stylesheets/*-min.css,javascripts/tests/**/*,
+ build/**,coffee/**,less/**,templates/**
</packagingExcludes>
<warSourceExcludes>
**/*
<profiles>
<profile>
<id>start-dev-server</id>
+ <properties>
+ <gruntTask>dev</gruntTask>
+ </properties>
<build>
<plugins>
<plugin>
</plugins>
</build>
</profile>
-
- <profile>
- <!-- experimental profile -->
- <id>js</id>
- <build>
- <plugins>
- <plugin>
- <groupId>com.kelveden</groupId>
- <artifactId>maven-karma-plugin</artifactId>
- <version>1.5</version>
- <configuration>
- <configFile>${basedir}/karma.conf.js</configFile>
- </configuration>
- <executions>
- <execution>
- <id>karma</id>
- <goals>
- <goal>start</goal>
- </goals>
- <phase>process-test-classes</phase>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
</profiles>
</project>