由于提供给开发人员的jar包没有源码,只有class文件,没有源码导致注释都看不到,所以需要打源码包上传值nexus私服。

maven配置文件settings.xml配置如下:

<?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 athttp://www.apache.org/licenses/LICENSE-2.0Unless 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.
--><!--| This is the configuration file for Maven. It can be specified at two levels:||  1. User Level. This settings.xml file provides configuration for a single user,|                 and is normally provided in ${user.home}/.m2/settings.xml.||                 NOTE: This location can be overridden with the CLI option:||                 -s /path/to/user/settings.xml||  2. Global Level. This settings.xml file provides configuration for all Maven|                 users on a machine (assuming they're all using the same Maven|                 installation). It's normally provided in|                 ${maven.conf}/settings.xml.||                 NOTE: This location can be overridden with the CLI option:||                 -gs /path/to/global/settings.xml|| The sections in this sample file are intended to give you a running start at| getting the most out of your Maven installation. Where appropriate, the default| values (values used when the setting is not specified) are provided.||-->
<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>--><!-- interactiveMode| This will determine whether maven prompts you when it needs input. If set to false,| maven will use a sensible default value, perhaps based on some other setting, for| the parameter in question.|| Default: true<interactiveMode>true</interactiveMode>--><!-- offline| Determines whether maven should attempt to connect to the network when executing a build.| This will have an effect on artifact downloads, artifact deployment, and others.|| Default: false<offline>false</offline>--><!-- pluginGroups| This is a list of additional group identifiers that will be searched when resolving plugins by their prefix, i.e.| when invoking a command line like "mvn prefix:goal". Maven will automatically add the group identifiers| "org.apache.maven.plugins" and "org.codehaus.mojo" if these are not already contained in the list.|--><pluginGroups><!-- pluginGroup| Specifies a further group identifier to use for plugin lookup.<pluginGroup>com.your.plugins</pluginGroup>--></pluginGroups><!-- proxies| This is a list of proxies which can be used on this machine to connect to the network.| Unless otherwise specified (by system property or command-line switch), the first proxy| specification in this list marked as active will be used.|--><proxies><!-- proxy| Specification for one proxy, to be used in connecting to the network.|<proxy><id>optional</id><active>true</active><protocol>http</protocol><username>proxyuser</username><password>proxypass</password><host>proxy.host.net</host><port>80</port><nonProxyHosts>local.net|some.host.com</nonProxyHosts></proxy>--></proxies><!-- servers| This is a list of authentication profiles, keyed by the server-id used within the system.| Authentication profiles can be used whenever maven must make a connection to a remote server.|--><servers><!-- server| Specifies the authentication information to use when connecting to a particular server, identified by| a unique name within the system (referred to by the 'id' attribute below).|| NOTE: You should either specify username/password OR privateKey/passphrase, since these pairings are|       used together.|<server><id>deploymentRepo</id><username>repouser</username><password>repopwd</password></server>--><!-- Another sample, using keys to authenticate.<server><id>siteServer</id><privateKey>/path/to/private/key</privateKey><passphrase>optional; leave empty if not used.</passphrase></server>--><server>  <id>snapshots</id>  <username>admin</username>  <password>fwk123</password>  </server> <server>  <id>releases</id>  <username>admin</username>  <password>fwk123</password>  </server></servers><!-- mirrors| This is a list of mirrors to be used in downloading artifacts from remote repositories.|| It works like this: a POM may declare a repository to use in resolving certain artifacts.| However, this repository may have problems with heavy traffic at times, so people have mirrored| it to several places.|| That repository definition will have a unique id, so we can create a mirror reference for that| repository, to be used as an alternate download site. The mirror site will be the preferred| server for that repository.|--><mirrors><!-- mirror| Specifies a repository mirror site to use instead of a given repository. The repository that| this mirror serves has an ID that matches the mirrorOf element of this mirror. IDs are used| for inheritance and direct lookup purposes, and must be unique across the set of mirrors.|<mirror><id>mirrorId</id><mirrorOf>repositoryId</mirrorOf><name>Human Readable Name for this Mirror.</name><url>http://my.repository.com/repo/path</url></mirror>--><mirror><!-- <id>alimaven</id><name>aliyun maven</name><url>http://maven.aliyun.com/nexus/content/groups/public/</url><mirrorOf>central</mirrorOf>        --><id>nexus</id><name>my nexus</name><url>http://xxx/repository/maven-public/</url><mirrorOf>central</mirrorOf></mirror></mirrors><!-- profiles| This is a list of profiles which can be activated in a variety of ways, and which can modify| the build process. Profiles provided in the settings.xml are intended to provide local machine-| specific paths and repository locations which allow the build to work in the local environment.|| For example, if you have an integration testing plugin - like cactus - that needs to know where| your Tomcat instance is installed, you can provide a variable here such that the variable is| dereferenced during the build process to configure the cactus plugin.|| As noted above, profiles can be activated in a variety of ways. One way - the activeProfiles| section of this document (settings.xml) - will be discussed later. Another way essentially| relies on the detection of a system property, either matching a particular value for the property,| or merely testing its existence. Profiles can also be activated by JDK version prefix, where a| value of '1.4' might activate a profile when the build is executed on a JDK version of '1.4.2_07'.| Finally, the list of active profiles can be specified directly from the command line.|| NOTE: For profiles defined in the settings.xml, you are restricted to specifying only artifact|       repositories, plugin repositories, and free-form properties to be used as configuration|       variables for plugins in the POM.||--><profiles><!-- profile| Specifies a set of introductions to the build process, to be activated using one or more of the| mechanisms described above. For inheritance purposes, and to activate profiles via <activatedProfiles/>| or the command line, profiles have to have an ID that is unique.|| An encouraged best practice for profile identification is to use a consistent naming convention| for profiles, such as 'env-dev', 'env-test', 'env-production', 'user-jdcasey', 'user-brett', etc.| This will make it more intuitive to understand what the set of introduced profiles is attempting| to accomplish, particularly when you only have a list of profile id's for debug.|| This profile example uses the JDK version to trigger activation, and provides a JDK-specific repo.<profile><id>jdk-1.4</id><activation><jdk>1.4</jdk></activation><repositories><repository><id>jdk14</id><name>Repository for JDK 1.4 builds</name><url>http://www.myhost.com/maven/jdk14</url><layout>default</layout><snapshotPolicy>always</snapshotPolicy></repository></repositories></profile>--><!--| Here is another profile, activated by the system property 'target-env' with a value of 'dev',| which provides a specific path to the Tomcat instance. To use this, your plugin configuration| might hypothetically look like:|| ...| <plugin>|   <groupId>org.myco.myplugins</groupId>|   <artifactId>myplugin</artifactId>||   <configuration>|     <tomcatLocation>${tomcatPath}</tomcatLocation>|   </configuration>| </plugin>| ...|| NOTE: If you just wanted to inject this configuration whenever someone set 'target-env' to|       anything, you could just leave off the <value/> inside the activation-property.|<profile><id>env-dev</id><activation><property><name>target-env</name><value>dev</value></property></activation><properties><tomcatPath>/path/to/tomcat/instance</tomcatPath></properties></profile>--><profile>   <!--profile的id--><id>dev</id>   <repositories>   <repository>  <!--仓库id,repositories可以配置多个仓库,保证id不重复--><id>nexus</id>   <!--仓库地址,即nexus仓库组的地址--><url>http://xxx/repository/maven-public/</url>   <!--是否下载releases构件--><releases>   <enabled>true</enabled>   </releases>   <!--是否下载snapshots构件--><snapshots>   <enabled>true</enabled>   </snapshots>   </repository>   </repositories>  <pluginRepositories>  <!-- 插件仓库,maven的运行依赖插件,也需要从私服下载插件 --><pluginRepository>  <!-- 插件仓库的id不允许重复,如果重复后边配置会覆盖前边 --><id>public</id>  <name>Public Repositories</name>  <url>http://xxx/repository/maven-public/</url>  </pluginRepository>  </pluginRepositories>  </profile></profiles><!-- activeProfiles| List of profiles that are active for all builds.|<activeProfiles><activeProfile>alwaysActiveProfile</activeProfile><activeProfile>anotherAlwaysActiveProfile</activeProfile></activeProfiles>--><activeProfiles><activeProfile>dev</activeProfile></activeProfiles>
</settings>

java项目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"><modelVersion>4.0.0</modelVersion><groupId>com.fwkily</groupId><artifactId>jvmdemo</artifactId><version>1.0-SNAPSHOT</version><properties><java.version>1.8</java.version></properties><build><plugins>
<!-- 打源码包插件 --><plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-source-plugin</artifactId><configuration><attach>true</attach></configuration><executions><execution><phase>compile</phase><goals><goal>jar</goal></goals></execution></executions></plugin>
<!-- 编译插件,不然会编译会报错 --><plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-compiler-plugin</artifactId><version>3.8.0</version><configuration><source>1.8</source><target>1.8</target></configuration></plugin></plugins></build><repositories><repository><id>central</id><url>http://xxx/repository/maven-public/</url><snapshots><enabled>true</enabled><updatePolicy>always</updatePolicy></snapshots></repository></repositories><!-- 配置远程发布到私服,mvn deploy --><distributionManagement><!-- 定义releases库的坐标 --><repository><id>releases</id><name>Nexus Release Repository</name><url>http://xxx/repository/maven-releases/</url></repository><!-- 定义snapshots库 --><snapshotRepository><id>snapshots</id><name>Nexus Snapshot Repository</name><url>http://xxx/repository/maven-snapshots/</url></snapshotRepository></distributionManagement></project>

maven deploy jar包和源码包到私服相关推荐

  1. 【Linux/内核】Linux内核rpm包和源码包下载地址-20210107

    1.有个需求:如何下载老版本内核rpm包? 因自己在按文档做实验时,为了实验期间涉及软件包版本保持一致,需要用到旧版本的内核rpm包,但是自己在内核下载页面并没找到相关的旧版本软件包,只有最近新版本的 ...

  2. spring各版本jar包和源码

    spring各版本jar包和源码 spring历史版本源码:https://github.com/spring-projects/spring-framework/tags spring历史jar包和 ...

  3. 下载java免安装包_下载并获取免安装版的JDK、JRE和源码包

    首先,我们需要去Oracle官网下载JDK的exe安装程序,下载页面:传送门,我下载的是截至目前为止最新的JDK 8u192.接下来就有两种方式获取免安装版的JDK.JRE和源码包,第一种方式不需要打 ...

  4. linux源码编译rpm,Linux的RPM和源码包(CentOS)

    Liunx的软件包有源码包和二进制(RPM)包,源码包即是包含全部的源代码,绝大部分是使用c语言开发,其未经过编译,所以安装时要经过一系列编译,将其变成机器语言才能安装.RPM包是事先经过编译,其安装 ...

  5. linux平台下rpm方式和源码包方式安装mysql5.7

    博主QQ:819594300 博客地址:http://zpf666.blog.51cto.com/ 有什么疑问的朋友可以联系博主,博主会帮你们解答,谢谢支持! 一.下载mysql的rpm包 Mysql ...

  6. yum更换本地源、yum下载和源码包安装

    7.6 yum更换国内源 恢复系统默认yum源配置: [root@gaohanwei Packages]# cd /etc/yum.repos.d [root@gaohanwei yum.repos. ...

  7. Linux 如何安装程序的源代码软件包/源码程序包/源码包?

    文章目录 一.安装源码包的三个步骤 (一)执行命令 configure,进行配置/检测 (二)执行命令 make,编译源码 (三)执行命令 make install,安装软件 二.源码包安装示例 (一 ...

  8. Linux软件管理包-源码包与rmp包区别,及其安装与卸载

    一. rpm包与源码包的区别 安装前:概念上的区别,源码包是开源的,比RPM包安装更自由,但是它安装更慢,更容易报错:RPM包是经过编译的,不能看到源代码,但是它安装更快,报错更容易解决,只有依赖性问 ...

  9. maven deploy jar包到远程仓库400

    第一步,登陆nexus http://maven.repo.[公司域].com/nexus/#welcome 查看账号是否有上传权限,选择某个respository如果如下图所示,代表有权限 第二步, ...

  10. mysql源码安装报错_mysql 的二进制和源码包 安装的报错总结

    MySQL报错总结 报错原因:/application/mysql-5.6.44/tmp不存在 解决方法:mkdir /application/mysql-5.6.44/tmp 报错原因: /appl ...

最新文章

  1. 企业网络推广之下滴滴造车野心不减,“造车时代”想入局恐需技术先行
  2. 《大话数据结构》第9章 排序 9.5 直接插入排序
  3. 曲率多项式转换为直角坐标系
  4. 学习Linux tar 命令:最简单也最困难
  5. Oracle11g客户端安装配置
  6. 关于linux模块驱动简单的Makefile
  7. 从数据到代码——通过代码生成机制实现强类型编程[上篇]
  8. [题解]第十一届北航程序设计竞赛预赛——I.神奇宝贝大师
  9. 五款最好的免费同步软件
  10. 北京企业平均薪酬达16.68万元;小米 11 内核已开源;阿里达摩院 2021 十大科技趋势 | EA周报...
  11. 推荐16个超棒的国外免费PSD资源素材网站
  12. ecshop微信登录php代码,Ecshop实现微信第三方授权扫码登录
  13. 日常部署之OA办公系统源码OA协同办公源码包含CRM客户管理系统+内部聊天工具+自适应手机(含php源码)
  14. 电力职称计算机英语成绩查询,职称考试成绩查询
  15. 计算机网络应用云计算,计算机网络云计算技术应用
  16. 云上PDF怎么删除页眉页脚_PDF怎么删除页面?
  17. hive修改分区信息
  18. NGFW防火墙的ASPF实现原理
  19. MUI-grid(栅格),超小屏xs和小屏幕sm
  20. 对话哈佛大学教授Lukin:量子计算将在我们有生之年普及! | AI英雄

热门文章

  1. 思科路由器如何导出配置文件_备份cisco路由器配置文件
  2. 搞副业被领导发现了,让我要么停止,要么滚蛋!
  3. 1.scrapy项目创建——python scrapy 爬取新浪财经财经新闻
  4. 安装SQL SERVER 2005后,没有SSMS界面管理的问题
  5. web显示csv_10 种最流行的 Web 挖掘工具!
  6. 腾讯轻量云FREEBSD11.1安装panabit cloud
  7. Windows10下自定义桌面快捷方式图标--以Spyder为例
  8. 串口服务器调试助手使用教程,串口调试助手使用教程【操作方式】
  9. 【饭谈】谈谈所有人都曾经对测开技术的迷茫和恐惧
  10. php 中 normdist,说明 Excel 中的 NORMDIST 函数