maven

Maven pom to zip config files from GitHub and jars from artifactory

ぃ、小莉子 提交于 2021-02-04 06:51:54
问题 Requirement : Need to push config files and jars from artifactory to UCD for deployment. Config files are present in GitHub repostiory. Jars (not needed for build but needed to start application in UCD) are present in artifactory. What would be the general process to follow, in order to copy config files from github and download/copy jars from artifactory and package everything in a zip file to push to UCD? 回答1: You might consider: the maven download plugin to get the files you need from an

Gradle 比 Maven 好为什么用的人少

好久不见. 提交于 2021-02-04 01:40:53
都是编译工具,各有各的优势。 貌似常用的几个大项目都将构建移到了 Gradle,例如 Hibernate,Spring。 相对来说也会增加不少 Gradle 的人气吧。 因为不怎么调整编译,很多时候感觉都差不多,但是 Gradle 的学习曲线确实比 Maven 要陡峭一点点。可以说是成也萧何败也萧何,Gradle 就是因为灵活性比 Maven 要好,所以开发插件,提供新的功能就要比 Maven 要容易。 同时 Gradle 也使用 Maven 的中央仓库,很多时候可以说是站在巨人的肩膀上面,在 Gradle 的设计时候就已经考虑过了 Maven 已经存在的一些问题。 就是因为 Gradle 设计灵活性又导致了学习起来难学习。 不太喜欢的是 Gradle 的包结构,当包下载下来后会打上标签,有时候都不知道包下哪里去了,Maven 这里比较直观,就直接能找到。 尤其是在调试的时候,希望能够删掉一个包,使用一个已经编译好的包替代下,直接拷贝过去就好了,使用 Gradle 在这里有点惆怅。 喜欢 Gradle 是,Gradle 比较容易出文档,其实这个问题也不是大问题,Gradle 可以直接编译 Asciidoctor 的文档,然后输出各种格式。 下载速度来说,一般大公司可能都会有 Central Maven 的镜像,感觉上差别不是非常多。 https://www.ossez.com/t

分页插件pagehelper

拥有回忆 提交于 2021-02-03 07:34:17
1、配置环境 maven依赖 1 2 3 4 5 6 7 8 9 10 11 <!--分页pagehelper--> < dependency > < groupId >com.github.pagehelper</ groupId > < artifactId >pagehelper</ artifactId > < version >5.1.4</ version > </ dependency > < dependency > < groupId >com.github.jsqlparser</ groupId > < artifactId >jsqlparser</ artifactId > < version >1.0</ version > </ dependency >    在mybatis配置文件中添加 <plugins> ,(configuration报错 写其它配置下面) 1 2 3 4 5 6 7 8 9 10 < configuration > <!-- 批量设置类的别名 --> < typeAliases > < package name="com.wanglz.pojo"/> </ typeAliases > <!--PageHelper分页--> < plugins > < plugin interceptor="com.github

Unable to find a single main class from the following candidates

只谈情不闲聊 提交于 2021-02-03 06:38:57
1、Unable to find a single main class from the following candidates 1.1、问题描述 maven build时出现以下错误提示日志: [ERROR] Failed to execute goal org.springframework.boot:spring-boot-maven-plugin: 1.3 .5.RELEASE:repackage ( default) on project information: Execution default of goal org.springframework.boot:spring-boot-maven-plugin: 1.3 .5.RELEASE:repackage failed: Unable to find a single main class from the following candidates [ com. hhly. InformationApplication, com. hhly. test. Application] -> [ Help 1] 1.2、日志分析 Unable to find a single main class from the following candidates [ com. hhly.

maven打包时跳过测试

徘徊边缘 提交于 2021-02-02 18:41:08
方法一:修改pom.xml文件 <project> [...] <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <version>2.18.1</version> <configuration> <skipTests>true</skipTests> </configuration> </plugin> </plugins> </build> [...] </project> 方法二:在Terminal执行命令 mvn install -DskipTests 方法三:在Terminal执行命令 mvn install -Dmaven.test.skip=true 方法四:Spring boot项目使用 spring-boot-maven-plugin插件已经集成了maven-surefire-plugin插件,会自动运行 junit test ,只需要在pom.xml里增加如下配置: <properties> <!-- 跳过测试 --> <skipTests>true</skipTests> </properties> 来源: oschina 链接: https://my.oschina.net

Gradle进阶计划(二)Gradle Plugin原理分析

安稳与你 提交于 2021-02-02 10:39:37
通过 Gradle进阶计划(一)Gradle初探 的介绍,我们已经对Gradle有了初步的了解。这篇文章我们更深入研究一下 Gradle Plugin 的原理。 一、Gradle 和 Gradle Plugin 首先,我们需要先明确一个概念,就是 Gradle 和 Gradle Plugin 是不同的。 (一)Gradle 结合上一篇文章,官方已经对Gradle已经有了很详细的定义,这里在重点解释一下。 Gradle 是一个 构建 项目的工具,将它用来编译Android App , 能够简化你的编译、打包、测试过程。 它其实不仅仅是用在Android Studio上。如何去理解构建工具呢? 构建工具 就是对你的项目进行 编译、运行、签名、打包、依赖管理 等一系列功能的合集。例如 Eclipse 最初是用来做 Java 开发的,Google 为了能在 Eclipse 上进行Android 开发,开发了ADT 插件(Android Developer Tools),正是因为有了 ADT ,我们才可以在 Eclipse 上进行编译、运行、签名、打包等一系列流程。而这背后的工作都是 ADT 的功劳,ADT 就是我们的构建工具。一般来说,构建工具除了以上提到的编译、运行、签名、打包等,还具备依赖管理的功能。什么是依赖管理呢?例如我们以前在 Eclipse 上开发 Android 引用第三方库

Saiku调用WS接口(十四)

半世苍凉 提交于 2021-02-02 05:14:39
Saiku调用WS接口 关于saiku集成系统单点登录告一段落,始终没想好怎么去做,主要是因为saiku有自己的权限定义,一直没想好关于saiku本身的权限信息以及用户信息怎么处理(在这里笔者希望已实现saiku单点登录的大佬不吝赐教,感激~) 这里实现了在saiku源码里面调用公司内部的WS接口来验证登录时的密码信息(因为saiku本身未使用dubbo,所以无法直接通过maven引入dubbo包去调用接口) 如果已查看了saiku登录源码追踪(十三)我们就已经大概知道saiku登录时代码执行过程啦,接下来我们就来更改这里的密码校验,调用其他组件的WS接口验证登录 >>调用WS接口 1.在saiku-webapp项目下 找到 WEB-INF/applicationContext-spring-security-jdbc.xml 文件 作出以下更改,替换原来的bean信息, 将原来的 org.springframework.security.authentication.dao.DaoAuthenticationProvider 类 替换为自己定义的 org.saiku.service.util.security.authentication.UmServiceProvider 类 <!--   <bean id="daoAuthenticationProvider" class=

推荐50多款DevOps开源工具

て烟熏妆下的殇ゞ 提交于 2021-02-02 04:56:32
你喜欢免费的东西吗?获得开发者社区支持的自动化,开源的工具是大家梦寐以求的。这里列举了 60 多款最棒的开源工具,可以帮助你很好的实行 DevOps。 一、开发工具 版本控制&协作开发 1.版本控制系统 Git Git是一个开源的分布式版本控制系统,用以有效、高速的处理从很小到非常大的项目版本管理。 2.代码托管平台 GitLab GitLab是一个利用Ruby on Rails开发的开源应用程序,实现一个自托管的Git项目仓库,可通过Web界面进行访问公开的或者私人项目。 3.代码评审工具 Gerrit Gerrit是一个免费、开放源代码的代码审查软件,使用网页界面。利用网页浏览器,同一个团队的软件程序员,可以相互审阅彼此修改后的程序代码,决定是否能够提交,退回或者继续修改。它使用Git作为底层版本控制系统。 4.版本控制系统 Mercurial Mercurial是一种轻量级分布式版本控制系统,采用 Python 语言实现,易于学习和使用,扩展性强。 5.版本控制系统 Subversion Subversion 是一个版本控制系统,相对于的RCS、CVS,采用了分支管理系统,它的设计目标就是取代CVS。互联网上免费的版本控制服务多基于Subversion。 6.版本控制系统 Bazaar Bazaar 是一个分布式的版本控制系统,它发布在 GPL 许可协议之下,并可用于

PageHelper分页插件的原理是什么

前提是你 提交于 2021-02-02 04:43:07
作者:祖大俊 原文: https: / /my.oschina.net/zudajun /blog/ 745232 PageHelper是一款好用的开源免费的Mybatis第三方物理分页插件,其实我并不想加上好用两个字,但是为了表扬插件作者开源免费的崇高精神,我毫不犹豫的加上了好用一词作为赞美。 原本以为分页插件,应该是很简单的,然而PageHelper比我想象的要复杂许多,它做的很强大,也很彻底,强大到使用者可能并不需要这么多功能,彻底到一参可以两用。但是,我认为,作为分页插件,完成物理分页任务是根本,其它的很多智能并不是必要的,保持它够傻够憨,专业术语叫stupid,简单就是美。 我们将简单介绍PageHelper的基本使用和配置参数的含义,重点分析PageHelper作为Mybatis分页插件的实现原理。 1. PageHelper的maven依赖及插件配置 < dependency > < groupId > com.github.pagehelper </ groupId > < artifactId > pagehelper </ artifactId > < version > 4.1.6 </ version > </ dependency > PageHelper除了本身的jar包外,它还依赖了一个叫jsqlparser的jar包,使用时

Spring boot 项目导出可执行jar

。_饼干妹妹 提交于 2021-02-02 03:43:44
配置文件中添加插件 < plugin > < groupId > org.springframework.boot </ groupId > < artifactId > spring-boot-maven-plugin </ artifactId > < version > 2.0.5.RELEASE </ version > < executions > < execution > < goals > < goal > repackage </ goal > </ goals > </ execution > </ executions > </ plugin > 示例如下: 1. 新建Maven 项目 exejar 2. pom.xml < 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.java </