maven打包jar源码至私服
1. setting文件 配置私服中设置的用户和密码
- <servers>
- <server>
- <id>releases</id>
- <username>admin</username>
- <password>xxxxxxxxxxx</password>
- </server>
- <server>
- <id>snapshots</id>
- <username>admin</username>
- <password>xxxxxxxxx</password>
- </server>
- <server>
- <id>Nexus</id>
- <username>admin</username>
- <password>xxxxxxx</password>
- </server>
- <server>
- <id>Nexus2</id>
- <username>admin</username>
- <password>xxxxxxx</password>
- </server>
2.需要打包的项目的pom.xml配置
- <?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">
- <version>1.1.0</version>
- <modelVersion>4.0.0</modelVersion>
- <packaging>jar</packaging>
- <artifactId>msg-service</artifactId>
- <properties>
- <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
- <maven.compiler.plugin.version>3.2</maven.compiler.plugin.version>
- <maven_jar_plugin_version>2.4</maven_jar_plugin_version>
- </properties>
- <dependencies>
- <!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-dependency-plugin -->
- <dependency>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-dependency-plugin</artifactId>
- <version>3.0.1</version>
- </dependency>
- </dependencies>
- <distributionManagement>
- <repository>
- <id>releases</id>
- <name>Maven Snapshots</name>
- <url>http://192.168.79.16:9081/nexus/content/repositories/releases</url>
- </repository>
- <snapshotRepository>
- <id>snapshots</id>
- <name>Maven Snapshots</name>
- <url>http://192.168.79.16:9081/nexus/content/repositories/snapshots</url>
- </snapshotRepository>
- </distributionManagement>
- <build>
- <finalName>msg-service</finalName>
- <sourceDirectory>src/main/java/com/fqgj/jkzj/msg/service</sourceDirectory>
- <!--<resources>-->
- <!--<!– 控制资源文件的拷贝 –>-->
- <!--<resource>-->
- <!--<directory>...</directory>-->
- <!--</resource>-->
- <!--</resources>-->
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <version>${maven.compiler.plugin.version}</version>
- <configuration>
- <source>1.8</source>
- <target>1.8</target>
- </configuration>
- </plugin>
- <plugin>
- <inherited>true</inherited>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <version>2.19.1</version>
- <configuration>
- <skip>true</skip><!-- 跳过测试 -->
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-jar-plugin</artifactId>
- <version>${maven_jar_plugin_version}</version>
- <configuration>
- <archive>
- <addMavenDescriptor>true</addMavenDescriptor>
- <index>true</index>
- <manifest>
- <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
- <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
- </manifest>
- </archive>
- </configuration>
- </plugin>
- <plugin>
- <artifactId>maven-source-plugin</artifactId>
- <version>2.1</version>
- <configuration>
- <attach>true</attach>
- </configuration>
- <executions>
- <execution>
- <phase>compile</phase>
- <goals>
- <goal>jar</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </project>
maven打包jar源码至私服的更多相关文章
- maven上传源码到私服
上传源码 项目中采用了分模块的方式构建,直接将maven-source-plugin写到父pom中,尝试了很多次发现源码一直不能上传到私服中,纠结了很长时间才发现原来多模块项目和普通一个项目的配置是有 ...
- Maven打包生成源码包和Javadoc包
https://blog.csdn.net/top_code/article/details/53586551 当我们开发了一个公共模块,将它deploy到Maven仓库时,最好同时提供源码包和Jav ...
- 使用maven&&make-distribution.sh编译打包spark源码
1>基础环境准备: jdk1.8.0_101 maven 3.3.9scala2.11.8 安装好上述软件,配置好环境变量,并检查是否生效. 2>配置maven:intellij idea ...
- Spark 学习(三) maven 编译spark 源码
spark 源码编译 scala 版本2.11.4 os:ubuntu 14.04 64位 memery 3G spark :1.1.0 下载源码后解压 1 准备环境,安装jdk和scala,具体参考 ...
- win7+idea+maven搭建spark源码阅读环境
1.参考. 利用IDEA工具编译Spark源码(1.60~2.20) https://blog.csdn.net/He11o_Liu/article/details/78739699 Maven编译打 ...
- Maven命令下载源码和javadocs
1:Maven命令下载源码和javadocs 当在IDE中使用Maven时如果想要看引用的jar包中类的源码和javadoc需要通过maven命令下载这些源码,然后再进行引入,通过mvn命令能够容易的 ...
- SpringMVC+Maven开发项目源码详细介绍
代码地址如下:http://www.demodashi.com/demo/11638.html Spring MVC概述 Spring MVC框架是一个开源的Java平台,为开发强大的基于Java的W ...
- Maven 依赖调解源码解析(二):如何调试 Maven 源码和插件源码
本文是系列文章<Maven 源码解析:依赖调解是如何实现的?>第二篇,主要介绍如何调试 Maven 源码和插件源码.系列文章总目录参见:https://www.cnblogs.com/xi ...
- 使用 maven 自动将源码打包并发布
1.maven-source-plugin 访问地址 在 pom.xml 中添加 下面的 内容,可以 使用 maven 生成 jar 的同时 生成 sources 包 <plugin> & ...
随机推荐
- Siki_Unity_1-2_Unity5.2入门课程_进入Unity开发的奇幻世界_Roll A Ball
1-2 Unity5.2入门课程 进入Unity开发的奇幻世界 任务1:Roll A Ball项目简介 Unity官网的tutorial入门项目 方向键控制小球在平台上滚动,碰撞方块得分,消掉所有方块 ...
- 手机端网页返回顶部js代码
<!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" cont ...
- 最小生成树(II)与Kruskal算法
为防止网页加载过慢,故分两章.上接https://www.cnblogs.com/Uninstalllingyi/p/10479470.html Kruskal算法——将森林合并成树 玩过瘟疫公司吗… ...
- 创新手机游戏《3L》开发点滴(3)——道具、物品、装备表设计 V2(最终版)
我们正在开发一款新手游,里面有道具,之前也写了一篇博文记录了下我们的设计思路,但是国庆到了,于是我有了时间继续纠结这个问题. 其实我主要是在到底是用mysql还是mongodb上纠结.这个复杂.痛苦. ...
- Mybatis ResultMap(2)
SQL 映射XML 文件是所有sql语句放置的地方.需要定义一个workspace,一般定义为对应的接口类的路径.写好SQL语句映射文件后,需要在MyBAtis配置文件mappers标签中引用,例如: ...
- android仿win8
在 eoe上偶然发现已经有人实现了这个功能的源码(地址:http://www.eoeandroid.com /forum.php?mod=viewthread&tid=327557),马上下载 ...
- [solution]xdebug正确配置,但不显示错误信息
一开始以为是配置问题,其实不是,折腾了好久,貌似中文网页很少有人提到这事,更别提解决之道! 最好还是用英文关键词google之:得如下网页 https://bugs.launchpad.net/ubu ...
- Android中Parcelabel对象的使用和理解
1. Parcelable接口 Interface for classes whose instances can be written to and restored from a Parcel. ...
- Linux服务器记录并查询历史操作记录
Linux服务器在使用过程中,经常会有除自己之外的其他人员使用.并不是每个人都对Linux服务器特别熟悉,难免会有一些操作导致服务器报错. 因此,监控Linux服务器的操作并记录下来,是非常有必要的! ...
- python2 对URL编码进行编译
在请求页面时有时会返回类似: %E8%AF%A5985%E5%A4%A7%E5%AD%A6%E5%B8%B8%E5%B9%B4%E4%BD%8D%E5%B1%85%E5%9B%BD%E5%86%85% ...