Skip to content

Commit

Permalink
Updated maven build for the projects (#1643)
Browse files Browse the repository at this point in the history
* Updated maven build for the projects

* Added build bash script
  • Loading branch information
mbarto authored Mar 27, 2017
1 parent c8938c7 commit ffe8487
Show file tree
Hide file tree
Showing 8 changed files with 123 additions and 437 deletions.
7 changes: 7 additions & 0 deletions project/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash
set -e

npm install
npm run compile
npm run lint
mvn clean install
254 changes: 0 additions & 254 deletions project/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,268 +10,14 @@

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

<spring.version>3.0.5.RELEASE</spring.version>
<spring.security.version>3.0.5.RELEASE</spring.security.version>
<slf4j.version>1.7.2</slf4j.version>
<log4j.version>1.2.14</log4j.version>
<servlet-api.version>2.5</servlet-api.version>
<jstl.version>1.2</jstl.version>
<jackson.version>1.9.10</jackson.version>
<jackson.databind-version>2.2.3</jackson.databind-version>
<jackson.annotations-version>2.5.3</jackson.annotations-version>
<!-- Testing -->
<junit.version>4.8.1</junit.version>
<mockito.version>1.9.5</mockito.version>
</properties>

<!-- Repositories -->
<repositories>
<!-- GeoSolutions -->
<repository>
<id>geosolutions</id>
<name>GeoSolutions Repository</name>
<url>http://maven.geo-solutions.it</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>

<!-- Other repositories -->
<repository>
<id>osgeo</id>
<name>OsGEO Repository</name>
<url>http://download.osgeo.org/webdav/geotools/</url>
</repository>
<repository>
<id>boundless</id>
<name>Boundless Maven Repository</name>
<url>http://repo.boundlessgeo.com/main</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>

<dependencyManagement>
<dependencies>
<!-- =========================================================== -->
<!-- LOGGING -->
<!-- =========================================================== -->
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>${log4j.version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>${slf4j.version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jcl-over-slf4j</artifactId>
<version>${slf4j.version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${slf4j.version}</version>
</dependency>

<!-- =========================================================== -->
<!-- JAVAX SERVLET & JSP -->
<!-- =========================================================== -->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>${servlet-api.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>jstl</groupId>
<artifactId>jstl</artifactId>
<version>${jstl.version}</version>
</dependency>
<!-- =========================================================== -->
<!-- SPRING FRAMEWORK DEPENDENCIES -->
<!-- =========================================================== -->
<!-- =========================================================== -->
<!-- SPRING -->
<!-- =========================================================== -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context-support</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-remoting</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<version>${spring.version}</version>
</dependency>
<!-- =========================================================== -->
<!-- SPRING SECURITY -->
<!-- =========================================================== -->
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-core</artifactId>
<version>${spring.security.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-web</artifactId>
<version>${spring.security.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-config</artifactId>
<version>${spring.security.version}</version>
</dependency>
<!-- Jackson JSON Mapper -->
<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-mapper-asl</artifactId>
<version>${jackson.version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
<version>${jackson.annotations-version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>${jackson.databind-version}</version>
</dependency>
<!-- =========================================================== -->
<!-- TESTING -->
<!-- =========================================================== -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
<version>${junit.version}</version>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>${mockito.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
</dependencyManagement>

<build>
<plugins>
<!-- compilation -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.2</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
<encoding>UTF-8</encoding>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>2.6</version>
<configuration>
<encoding>UTF-8</encoding>
</configuration>
</plugin>

<plugin>
<inherited>true</inherited>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>2.4</version>
<configuration>
<attach>true</attach>
</configuration>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<!-- Use 2.4.2 because 2.4.3 has bug with system properties see http://jira.codehaus.org/browse/SUREFIRE-121 -->
<version>2.4.2</version>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.4</version>
<executions>
<execution>
<goals>
<goal>test-jar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>

<profiles>
<profile>
<id>geostore</id>

<modules>
<module>MapStore2/geostore/src</module>
</modules>

</profile>

<profile>
<id>proxy</id>

<modules>
<module>MapStore2/http-proxy</module>
</modules>

</profile>
</profiles>

<modules>
<module>web</module>
<module>backend</module>
</modules>

</project>
3 changes: 1 addition & 2 deletions project/prod-webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ var ParallelUglifyPlugin = require("webpack-parallel-uglify-plugin");
var DefinePlugin = require("webpack/lib/DefinePlugin");
var NormalModuleReplacementPlugin = require("webpack/lib/NormalModuleReplacementPlugin");
const extractThemesPlugin = require('./MapStore2/themes.js').extractThemesPlugin;
var assign = require('object-assign');
var CopyWebpackPlugin = require('copy-webpack-plugin');

webpackConfig.plugins = [
Expand All @@ -17,7 +16,7 @@ webpackConfig.plugins = [
options: {
postcss: {
plugins: [
require('postcss-prefix-selector')({prefix: '.__PROJECTNAME__', exclude: ['.__PROJECTNAME__']})
require('postcss-prefix-selector')({prefix: '.__PROJECTNAME__', exclude: ['.__PROJECTNAME__', '.ms2']})
]
},
context: __dirname
Expand Down
Loading

0 comments on commit ffe8487

Please sign in to comment.