2018-4-23
Apache Maven is a software project management and comprehension tool. Based on the concept(概念) of a project object model (POM), Maven can manage a project’s build, reporting and documentation from a central piece of information.
安装 for windowns
- Maven官网: http://maven.apache.org/index.html
- 下载好二进制文件, 例如: apache-maven-3.5.3.zip , 解压 →
指定目录, 例:D:\apache-maven-3.5.3\, 添加其bin目录到环境变量, 例:D:\apache-maven-3.5.3\bin→ OK - 测试一下执行:
mvn -version
Apache Maven 基金会下开源项目, 使用java编写的, 还需要配置JDK
一些个人初配
- 配置本地仓库目录
- 配置本地仓库目录
.\conf\setting.xml文件, 配置 localRepository 节点
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
...omission..
<!--E:\maven_local_repository 为本地仓库目录 -->
<localRepository>E:\maven_local_repository</localRepository>
执行命令mvn help:system 更新本地目录
- 下载镜像
- 国内的镜像远程仓库, 可以下载快一点
https://developer.aliyun.com/mvn/guide
<!-- 阿里云的镜像远程仓库 -->
<mirrors>
<mirror>
<id>alimaven</id>
<name>aliyun maven</name>
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
<mirrorOf>central</mirrorOf>
</mirror>
</mirrors>- 默认的jdk版本
- 默认的jdk1.4太低了, 增加profile节点
<!-- 1.8 版本 -->
<profiles>
<profile>
<id>jdk-1.8</id>
<activation>
<activeByDefault>true</activeByDefault>
<jdk>1.8</jdk>
</activation>
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.compilerVersion>1.8</maven.compiler.compilerVersion>
</properties>
</profile>
</profiles>项目配置 独立JDK版本
<build>
....
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
</build> 目录小解
- 使用mvn命令行生成一个java项目
执行:mvn archetype:generate -DgroupId=com.companyname.bank -DartifactId=consumerBanking -DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false
mvn archetype:generate
-DgroupId=com.companyname.bank
-DartifactId=consumerBanking//项目名
-DarchetypeArtifactId=maven-archetype-quickstart
-DinteractiveMode=false它会在当前目录下生成
$>tree
consumerBanking
└─src
├─main//src 所有的源代码放在这里; 对于Java项目, 还有一个下级子目录: java
│ └─java
│ └─com
│ └─companyname
│ └─bank
└─test//test 所有的单元测试类放在这里;
└─java
└─com
└─companyname
└─bank
│-pom.xml//附加的一个标准的 pom.xml 被生成; 这个POM文件类似于 Ant build.xml 文件, 它描述了整个项目的信息, 一切从目录结构, 项目的插件, 项目依赖, 如何构建这个项目等
//target: 所有编译过的类文件以及生成的打包文件(.jar, .war, ...)放在这里;
标准目录
有时候生成的项目没有某些目录, 目测是JDK版本问题, 自己建吧, 附目录介绍..
参考文档:
| src/main/java | Application/Library sources |
|---|---|
| src/main/resources | Application/Library resources |
| src/main/filters | Resource filter files |
| src/main/webapp | Web application sources |
| src/test/java | Test sources |
| src/test/resources | Test resources |
| src/test/filters | Test resource filter files |
| src/it | Integration Tests (primarily for plugins) |
| src/assembly | Assembly descriptors |
| src/site | Site |
| LICENSE.txt | Project’s license |
| NOTICE.txt | Notices and attributions required by libraries that the project depends on |
| README.txt | Project’s readme |
配置
Maven 依赖关系 /Scope 标签
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<scope>runtime</scope>
</dependency>compile 默认的scope, 表示 dependency都可以在生命周期中使用; 而且, 这些dependencies 会传递到依赖的项目中; 适用于所有阶段, 会随着项目一起发布
provided 跟compile相似, 但是表明了dependency 由JDK或者容器提供, 例如Servlet AP和一些Java EE APIs; 这个scope 只能作用在编译和测试时, 同时没有传递性;
runtime 表示dependency不作用在编译时, 但会作用在运行和测试时, 如JDBC驱动, 适用运行和测试阶段;
test 表示dependency作用在测试时,不作用在运行时; 只在测试时使用, 用于编译和运行测试代码; 不会随项目发布;
system 跟provided 相似, 但是在系统中要以外部JAR包的形式提供, maven不会在repository查找它;
添加本地 jar
<dependency>
<groupId>dingding</groupId>
<artifactId>dingding</artifactId>
<version>2.8</version>
<scope>system</scope>
<systemPath>${project.basedir}/lib/**sdk-java.jar</systemPath>
</dependency>依赖分析 dependency:tree
mvn dependency:tree
mvn -Dverbose dependency:tree //全部
mvn dependency:tree -Dverbose -DoutputFile=DEP_RESULT.txt //将结果输出到文件
compile
编译成功
version managed from 2.3 ;omitted for duplicate (version xxx)
最终会使用 xxx 版本 , 拒绝使用
<dependencyManagement></dependencyManagement>中声明的2.3版本
(io.netty:netty-common:jar:4.0.56.Final:compile - omitted for conflict with 4.1.36)
真正编译的版本是4.1.36, 而Cassandra引入的依赖版本是4.0.56;
Require upper bound dependencies error
Require upper bound dependencies error for org.springframework:spring-test:5.1.11.RELEASE paths to dependency are:
+-net.jk.cloud.framework:sny-paddle-sdk:4.0.0
+-org.springframework.boot:spring-boot-starter-test:2.1.15.RELEASE
+-org.springframework:spring-test:5.1.11.RELEASE (managed) <-- org.springframework:spring-test:5.1.16.RELEASE
简而言之父项目有个地方 dependencyManagement 声明了版本为: spring-test:5.1.11.RELEASE, 而子模块引用的是: spring-test:5.1.16.RELEASE
如何找到dependencyManagement的声明?
在pom.xml引用一下 可以跳到它的定义
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
</dependency>或者直接把maven-enforcer-plugin 这个依赖检查插件去掉, 一了百了!!
idea 22.01 自带依赖分析
dependencyManagement 标签
Maven使用dependencyManagement元素来提供了一种管理依赖版本号的方式。通常会在一个组织或者项目的最顶层的父POM中看到dependencyManagement元素
dependencyManagement 只是声明依赖,并不实际导入,因此子项目需要显式的声明依赖。
如果某个子项目需要另一个版本号时,只需要在dependencies中声明一个版本号即可。子类就会使用子类声明的版本号,不继承于父类版本号。
Maven 生命周期
Maven的生命周期由一系列阶段(phase)构成, 以内置的生命周期default为例, 它包含以下phase:
validate
initialize
generate-sources
process-sources
generate-resources
process-resources
compile
process-classes
generate-test-sources
process-test-sources
generate-test-resources
process-test-resources
test-compile
process-test-classes
test
prepare-package
package
pre-integration-test
integration-test
post-integration-test
verify
install
deploy如果我们运行mvn package, Maven就会执行default生命周期, 它会从开始一直运行到package这个phase为止:
validate … package
如果我们运行mvn compile, Maven也会执行default生命周期, 但这次它只会运行到compile
validate … compile
Maven 插件
实际上, 执行每个phase, 都是通过某个插件(plugin)来执行的, Maven本身其实并不知道如何执行compile, 它只是负责找到对应的compiler 插件, 然后执行默认的compiler:compile这个goal来完成编译;
所以, 使用Maven, 实际上就是配置好需要使用的插件, 然后通过phase调用它们;
jar与lib分离 插件
- pom.xml 配置
<build>
<plugins>
<!--设置应用 Main 参数启动依赖查找的地址指向外部 lib 文件夹-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<manifest>
<!-- 入口类 -->
<mainClass>com.yang.Main</mainClass>
<addClasspath>true</addClasspath>
<!-- 项目所依赖的jar位于同一级的lib目录下-->
<classpathPrefix>lib/</classpathPrefix>
</manifest>
</archive>
</configuration>
</plugin>
<!--设置 SpringBoot 打包插件不包含任何 Jar 依赖包-->
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<includes>
<include>
<groupId>nothing</groupId>
<artifactId>nothing</artifactId>
</include>
</includes>
</configuration>
</plugin>
<!--设置将 lib 拷贝到应用 Jar 外面-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>copy-dependencies</id>
<phase>prepare-package</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/lib</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>mvn istall ok!
java -classpath ./lib -jar test-0.0.1-SNAPSHOT.jar
org.mapstruct.Mapper 插件使用一则
自动生成 DTO转换entity 的Mapper 插件
@Mapper
public interface CarMapper {
@Mappings({
@Mapping(source = "make", target = "manufacturer"),
@Mapping(source = "numberOfSeats", target = "seatCount")
})
CarDto carToCarDto(Car car);
@Mapping(source = "name", target = "fullName")
PersonDto personToPersonDto(Person person);
}
引入mapstruct依赖
<!-- mapstruct -->
<dependency>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct-jdk8</artifactId>
<version>${org.mapstruct.version}</version>
</dependency>
</dependencies>
必须 使用 mavn 命令/编译, 会自动生成映射实现
踩坑指南
必须需要存在映射单个DTO的方法, 才能映射list
@Mappings(value = {
@Mapping(source = "bsmdTableId", target = "tableId"),
})
public FieldStruct toStruct(BsmdField bean);
public List<FieldStruct> toStruct(List<BsmdField> beans);踩坑指南
deploy 无法上传到私服
eclipse pom 运行 clean deploy 无法部署上传到私服
Could not transfer artifact org.apache.maven.plugins:maven-resources-plugin:.. 错误: 原因是没有办法下到maven自身运行所需的插件
可手动引入依赖
<!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-deploy-plugin -->
<dependency>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8.2</version>
</dependency>trustAnchors parameter must be non-empty
"maven" the trustAnchors parameter must be non-empty 错误: https问题,
把阿里云的镜像url变成https; <url>https://maven.aliyun.com/nexus/content/groups/public/</url>
http 错误?
<mirrors>
...
<mirror>
<id>maven-default-http-blocker</id>
<mirrorOf>blocker</mirrorOf>
<!-- <name>用于突破maven-3.8.1版本以后默认禁用http仓库的限制</name> -->
<url>http://0.0.0.0/</url>
</mirror>
<!-- maven官方镜像 -->
<mirror>
<id>mirrorId</id>
<mirrorOf>central</mirrorOf>
<name>Human Readable Name </name>
<url>http://repo1.maven.org/maven2/</url>
</mirror>
</mirrors>
关于 mirrorOf
mirrorOf可以理解”为某个仓库(repository)的做镜像”, 填写的是repostoryId; ”*” 的意思就是匹配所有的仓库
- 尽量不要配置mirrorOf为 *
- 私服的配置推荐用profile配置而不是mirror
<mirrorOf>*,!spring-milestones</mirrorOf>标识 spring-milestones 这个依赖不从这里下载 central
with eclipse
转为eclipse项目
-如上项目, 让它成为一个eclipse的项目
可以(进入到项目目录)执行: mvn eclipse:eclipse
它自动下载更新相关资源和配置信息(需要等待一段时间), 并产生 Eclipse IDE所要求的所有项目文件;
要导入项目到Eclipse IDE中, 选择File -> Import… -> General->Existing Projects into Workspace
-
集成到eclipse
-
更改eclipse自动安装的maven
- eclipse自动安装的maven一些配置, 比如仓库路径, 跟手动安装的不一样; 可以在eclipse更改为手动安装的maven 版本;
windows -->preferences--> maven -->installations -->(add 手动安装的maven路径)之后
User Settings --> [global settings 和 user settings 都改为一样吧]例(D:\apache-maven-3.5.3\conf\settings.xml)
- eclipse自动安装的maven一些配置, 比如仓库路径, 跟手动安装的不一样; 可以在eclipse更改为手动安装的maven 版本;
-
建个项目
- 在eclipse
new -> Maven Project -> Next
(一般而言, java项目选择maven-archetype-quickstart x.x, jweb项目选择maven-archetypeWebapp x.x) 键入groupId和artifactIdOK.
- 在eclipse
-
管理依赖
- 修改该项目下pom.xml的文件,例如
-
<!-- WebMagic 依赖 -->
<dependency>
<groupId>us.codecraft</groupId>
<artifactId>webmagic-core</artifactId>
<version>0.7.3</version>
</dependency>
<dependency>
<groupId>us.codecraft</groupId>
<artifactId>webmagic-extension</artifactId>
<version>0.7.3</version>
</dependency>
<!-- WebMagic 依赖 end -->
- 右键`pom.xml`文件 , `run as -> maven install`简单方便..OK; (修改pom.xml后eclipse自动加载依赖...)
添加 Archetupe
eclipse maven java 项目 万年缺失目录, junit低版本
Eclipse IDE, click menu File > New > Maven Project (or File > New > Other… > Maven Project). The New Maven Project dialog appears:
官方更新到1.4 > https://mvnrepository.com/artifact/org.apache.maven.archetypes/maven-archetype-quickstart 也是低的一批
在中央仓库 Category 选 Maven Archetype 可以搜索
自定义 Archetupe
受不了, 自定义一个
创建一个以此为模版 普通的maven 项目
pom 添加
<build>
<plugins>
...
<!-- 打包 archetype-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-archetype-plugin</artifactId>
<version>3.0.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
</build>打包 archetype
到根目录运行 mvn archetype:create-from-project
记得删除eclipse的 .classpath, .project 配置文件
成功执行完之后, 在target/generated-sources/ 下有个archetype目录, 这个就是生成的 archetype; 可以看到这个目录其实就是普通的maven项目, 也就是我们最终的骨架模板项目\
有几个目录, 文件需要说明:
src/main/resources/archetype-resources 通过A-template骨架创建的项目包含的所有的文件和目录都在这个目录下
src/main/resource/META-INF/maven/archetype-metadata.xml 此文件是配置文件, 告诉archetype插件, archetype-resources里面哪些文件需要包含到创建出的项目里; 打开这个文件发现有个fileSets标签, 包含一系列的fileSet标签; 不难发现fileSet就是对archetype-resources下的资源描述;
archetype: create-from-project 需要自己稍加修改
- 改pom.xml文件 修改packing的值为jar或者war
requiredProperties 定义模板项目中一些参数值, 内置的参数包括: groupId,artifactId,version,package; 自己可以提供这些参数的默认值, 也可以增加自己额外的参数;
添加到eclipse
cd 进入generated-sourced/archetype目录, 运行maven命令: mvn clean install
执行成功默认会在maven仓储的根目录生成一个archetype-catalog.xml的文件, 如果未生成则执行mvn archetype:crawl
若最后还是无法生成也可以自己创建, 前提是前面的步骤都是success
<?xml version="1.0" encoding="UTF-8"?>
<archetype-catalog xsi:schemaLocation="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-catalog/1.0.0
http://maven.apache.org/xsd/archetype-catalog-1.0.0.xsd"
xmlns="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-catalog/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<archetypes>
<archetype>
<groupId>com.XXX</groupId>
<artifactId>XXX-archetype</artifactId>
<version>1.0.0</version>
<description>XXX</description>
</archetype>
</archetypes>
</archetype-catalog>在eclipse
add local catalog..
参考 https://www.jianshu.com/p/3bba7f3665f4
自用的 archetype
mvn archetype:create-from-project mvn install mvn archetype:crawl
配置私服 (nexus)
问卷太恶心了! https://www.sonatype.com/oss-thank-you-win64.zip?submissionGuid=762637a1-2b4f-4ee9-b71d-26c63054d0ea
https://help.sonatype.com/repomanager3/product-information/download
私服服务端
安装
nexus for win 安装
- 解压执行
cd bin
nexus.exe /run
The application can be accessed once the the log shows the message “Started Sonatype Nexus”.
- 安装服务
./\bin>nexus /install
nexus.exe /install <optional-service-name>
- 管理服务
nexus.exe /start <optional-service-name>
nexus.exe /stop <optional-service-name>
nexus.exe /uninstall <optional-service-name>
-
默认管理员账号 账号 admin 新版本默认第一次登陆, 密码保存在
./sonatype-work/nexus3/admin.password; 登陆后修改密码会删除该文件
角色管理
角色管理: https://help.sonatype.com/repomanager3/nexus-repository-administration/access-control/roles 权限说明: https://help.sonatype.com/repomanager3/nexus-repository-administration/access-control/privileges
新建仅用于上传部署的角色 & 用户
- 新建角色给予权限
SecuritySecurity > Rolesnx-component-upload//上传权限nx-repository-view-*-*-*//上传页面查看权限 nx-repository-admin---browse nx-repository-admin-maven2-maven-releases-* nx-repository-admin-maven2-maven-snapshots-*
nx-repository-admin---* //所有仓库管理权限
- 新建用户
SecuritySecurity > Users
配置运行环境
configuring-the-runtime-environment
change JVM memory Open $install-dir/bin/nexus.vmoptions in a text editor Find the lines which configure memory:
-Xms2703M
-Xmx2703M
-XX:MaxDirectMemorySize=2703M启动失败?
看配置文件的 -XX:LogFile 配置, 找到日志
-XX:LogFile=../sonatype-work/nexus3/log/jvm.log
OStorageException: Storage config is not opened.
maven本地
./settings.xml文件
<servers>
...omitt
<server>
<id>release</id>//这里的ID要跟项目pom.xml的 <distributionManagement> <repository> <id> 元素相同
<username>admin</username>//服务端的用户名跟密码
<password>admin123</password>
</server>
</servers>
...omitt
<profiles>
...omitt
<profile>
<id>priRepository</id>
<repositories>
<repository>
<id>3rd_part</id>
<name>3rd_part</name>//服务端仓库名
<url>http://192.168.10.71:8081/repository/3rd_part/</url>//服务端仓库url
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
</profile>
</profiles>
<activeProfiles>
<activeProfile>priRepository</activeProfile>//激活
</activeProfiles>注意: 闭合元素标签!!!
./pom.xml文件
<distributionManagement>
<repository>
<id>release</id>//这里的ID跟settings.xml的 <servers><server><id>元素相同
<url>http://192.168.10.71:8081/repository/3rd_part/</url>//服务端仓库url
</repository>
<!-- <snapshotRepository> -->
<!-- <id>snapshots</id> -->
<!-- <url>http://192.168.10.71:8081/repository/snapshots/</url> -->
<!-- </snapshotRepository> -->
</distributionManagement>
- maven 查询jar的优先级
本地 > 私服 > 镜像网站 > 中央仓库
mvn 发布到私服
mvn deploy:deploy-file -DgroupId=net.jk.cloud.framework -DartifactId=jk-cloud -Dversion=3.0.3 -Dpackaging=jar -Dfile=jk-cloud-tools-3.0.3.jar -Durl=http://192.168.10.71:8081/repository/maven-releases/ -DrepositoryId=release
mvn deploy:deploy-file -DgroupId=net.jk.cloud.framework -DartifactId=jk-cloud -Dversion=3.0.5 -Dpackaging=jar -Dfile=jk-cloud-security-3.0.5.jar -Durl=http://192.168.10.71:8081/repository/maven-releases/ -DrepositoryId=release 强制下载
清除 Maven 缓存:
mvn dependency:purge-local-repository
强制更新依赖库:
mvn dependency:resolve -U
命令来强制更新所有依赖库
mvn dependency:resolve -U
附
完整配置
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
<!-- localRepository
| The path to the local repository maven will use to store artifacts.
|
| Default: ${user.home}/.m2/repository
<localRepository>/path/to/local/repo</localRepository>
-->
<localRepository>F://software//maven_local_repository</localRepository>
<pluginGroups>
<!-- pluginGroup
| Specifies a further group identifier to use for plugin lookup.
<pluginGroup>com.your.plugins</pluginGroup>
-->
</pluginGroups>
<proxies>
</proxies>
<servers>
<server>
<id>releases</id>
<username>admin</username>
<password>admin123</password>
</server>
<server>
<id>snapshots</id>
<username>admin</username>
<password>admin123</password>
</server>
</servers>
<mirrors>
<mirror>
<id>releases</id>
<mirrorOf>*,!spring-milestones</mirrorOf>
<url>http://192.168.10.71:8081/repository/maven-releases/</url>
</mirror>
<mirror>
<id>snapshots</id>
<mirrorOf>*,!spring-milestones</mirrorOf>
<url>http://192.168.10.71:8081/repository/maven-snapshots/</url>
</mirror>
<mirror>
<id>nexus</id>
<mirrorOf>*,!spring-milestones</mirrorOf>
<url>http://192.168.10.71:8081/repository/3rd_part/</url>
</mirror>
<mirror>
<id>alimaven</id>
<name>aliyun maven</name>
<url>https://maven.aliyun.com/nexus/content/groups/public/</url>
<mirrorOf>central</mirrorOf>
</mirror>
<!-- maven官方镜像 -->
<mirror>
<id>mirrorId</id>
<mirrorOf>central</mirrorOf>
<name>Human Readable Name </name>
<url>http://repo1.maven.org/maven2/</url>
</mirror>
</mirrors>
<profiles>
<profile>
<id>nexus</id>
<repositories>
<repository>
<id>releases</id>
<url>http://192.168.10.71:8081/repository/maven-releases/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>Public</id>
<name>Public Repositories</name>
<url>http://repo1.maven.org/maven2/</url>
</pluginRepository>
</pluginRepositories>
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.compilerVersion>1.8</maven.compiler.compilerVersion>
</properties>
</profile>
</profiles>
<activeProfiles>
<activeProfile>nexus</activeProfile>
</activeProfiles>
</settings>