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>-->
<!--&lt;!&ndash; 控制资源文件的拷贝 &ndash;&gt;-->
<!--<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源码至私服的更多相关文章

  1. maven上传源码到私服

    上传源码 项目中采用了分模块的方式构建,直接将maven-source-plugin写到父pom中,尝试了很多次发现源码一直不能上传到私服中,纠结了很长时间才发现原来多模块项目和普通一个项目的配置是有 ...

  2. Maven打包生成源码包和Javadoc包

    https://blog.csdn.net/top_code/article/details/53586551 当我们开发了一个公共模块,将它deploy到Maven仓库时,最好同时提供源码包和Jav ...

  3. 使用maven&&make-distribution.sh编译打包spark源码

    1>基础环境准备: jdk1.8.0_101 maven 3.3.9scala2.11.8 安装好上述软件,配置好环境变量,并检查是否生效. 2>配置maven:intellij idea ...

  4. Spark 学习(三) maven 编译spark 源码

    spark 源码编译 scala 版本2.11.4 os:ubuntu 14.04 64位 memery 3G spark :1.1.0 下载源码后解压 1 准备环境,安装jdk和scala,具体参考 ...

  5. win7+idea+maven搭建spark源码阅读环境

    1.参考. 利用IDEA工具编译Spark源码(1.60~2.20) https://blog.csdn.net/He11o_Liu/article/details/78739699 Maven编译打 ...

  6. Maven命令下载源码和javadocs

    1:Maven命令下载源码和javadocs 当在IDE中使用Maven时如果想要看引用的jar包中类的源码和javadoc需要通过maven命令下载这些源码,然后再进行引入,通过mvn命令能够容易的 ...

  7. SpringMVC+Maven开发项目源码详细介绍

    代码地址如下:http://www.demodashi.com/demo/11638.html Spring MVC概述 Spring MVC框架是一个开源的Java平台,为开发强大的基于Java的W ...

  8. Maven 依赖调解源码解析(二):如何调试 Maven 源码和插件源码

    本文是系列文章<Maven 源码解析:依赖调解是如何实现的?>第二篇,主要介绍如何调试 Maven 源码和插件源码.系列文章总目录参见:https://www.cnblogs.com/xi ...

  9. 使用 maven 自动将源码打包并发布

    1.maven-source-plugin 访问地址 在 pom.xml 中添加 下面的 内容,可以 使用 maven 生成 jar 的同时 生成 sources 包 <plugin> & ...

随机推荐

  1. Python2快速入门教程,只需要这十五张图片就够了!

    今天给大家分享的教程是适用于Python 2.7,但它可能适用于Python 2.Python 2.7将停止在2020中的支持. 与Python 2.7和3兼容的Python代码是完全可能的.通过使用 ...

  2. angular-使用iframe做独立页(iframe传值到angular和iframe里请求后台数据)

    这个方法使用过两次.一次是在项目中嵌入一个表达式生成器.因为用别人做好的网页变成组件很难,而且里面用了jq,与angular思想相反不能用.另一次是因为想要单独引用样式.而innerHTML使用的样式 ...

  3. 预分配内存fifo实现可变长度字节序列存储

    预分配内存fifo实现可变长度字节序列存储 github链接https://github.com/gexin1023/utils/tree/master/fifo fifo即先进先出队列,可以用链表来 ...

  4. BZOJ 4736 温暖会指引我们前行 LCT+最优生成树+并查集

    题目链接:http://uoj.ac/problem/274 题意概述: 没什么好概述的......概述了题意就知道怎么做了......我懒嘛 分析: 就是用lct维护最大生成树. 然后如果去UOJ上 ...

  5. Nodejs中关于模块的总结

    关于Nodejs中的模块 概念 Nodejs在ECMAScript的基础上扩展并封装了许多高级特性,如文件访问.网络访问等,使得Nodejs成为一个很好的Web开发平台.基于Nodejs这个平台将We ...

  6. c# 有无符号值进一步了解

    1.编写过程中用到了short类型(有符号型,值范围含负值).两个正数之和得负. 改为int或unsigned short 均可. 2.注意,short型(-32768,32767)举例:做自加运算, ...

  7. Python中对变量是否为None的判断

    三种主要的写法有: 第一种:if X is None; 第二种:if not X: 当X为None,  False, 空字符串"", 0, 空列表[], 空字典{}, 空元组()这 ...

  8. Swift-闭包理解(二)

    简明扼要的闭包表达式 其实Swift已经为我们提供了很多简化的语法,可以让我们保证代码的高可读性和维护性.还用上面的例子来说明,对于  greetPeople 这个全局函数来说,其实只需要使用一次,所 ...

  9. Js键盘事件全面控制,回车按键事件,键盘对应按键码,按键事件兼容各个浏览器。

    在网上查询的按键码如下: 一.键盘按键和键盘对应代码表:   字母按键码A <--------> 65 B <--------> 66 C <--------> 6 ...

  10. linux上使用J-Link调试S3C2440裸机代码

    linux上使用J-Link调试S3C2440裸机代码 工具: segger的jlink仿真器 segger的jlink for linux 交叉编译工具链里面的arm-xx-linux-xx-gdb ...