maven

Include JDBC driver for Postgres in the JAR fo my simple demo app driven by Maven [duplicate]

蹲街弑〆低调 提交于 2021-01-29 04:13:24
问题 This question already has answers here : How can I create an executable JAR with dependencies using Maven? (31 answers) Closed 1 year ago . How to make Maven include the JDBC driver for Postgres inside my app's .jar file? I added this dependency element to the <dependencies> element in my POM. <!-- https://mvnrepository.com/artifact/org.postgresql/postgresql --> <dependency> <groupId>org.postgresql</groupId> <artifactId>postgresql</artifactId> <version>42.2.8</version> </dependency> The

cucumber.runtime.CucumberException: java.util.regex.PatternSyntaxException: Illegal repetition near index 39

99封情书 提交于 2021-01-29 04:03:59
问题 Facing some repetition errors after running tests from Java class I have tried to change/update my steps and runner file but unfortunately this did not help to solve my problem. I'm quite new in cucumber and maven so if the information that I've provided is less please let me know. Feature file 1: Feature: Login into account Existing user should be able to login account using correct credentials Scenario: Login into account with correct credentials Given User navigates to stackoverflow

maven: java.io.FileNotFoundException when trying to open file from resources with Intellij or using java command with jar

情到浓时终转凉″ 提交于 2021-01-29 03:09:01
问题 I've imported the github's project from the book "Java 8 In Action" in intellij as a maven project. The module structure is the following: Then, i'm executing the Main method from the ExecuteAround class directly from Intellij (right click -> execute main...) public static void main(String ...args) throws IOException{ // method we want to refactor to make more flexible String result = processFileLimited(); System.out.println(result); System.out.println("---"); String oneLine = processFile(

maven multi-module project with one plugin module

心已入冬 提交于 2021-01-29 02:56:01
问题 I am thinking about creating a multi-module project in maven, with one plugin module (i.e. this module is used as a plugin in other projects, not a dependency). Question : Is it feasible to have a plugin as a module in a multi module maven project? 回答1: It is feasible and it is also documented on the official maven multi-module/reactor page concerning how having a plugin as module is handled by the build (bold is mine): Because modules within a multi-module build can depend on each other, it

Dockerfile can't build app with Maven - No goals specified for this build

北战南征 提交于 2021-01-29 02:30:20
问题 I'm developing a Spring Boot app with several data services, but I'm struggling to get it working as a containerized application. This is the project folder structure: myapp/ ├── src/ │ └── ... ├── docker-compose.yml ├── Dockerfile ├── init-mongo.js └── pom.xml And this is the Dockerfile content I came up with after reading tutorials and official documentation: # # Build stage # FROM maven:3.5-jdk-8 AS build COPY init-mongo.js /docker-entrypoint-initdb.d/ COPY src /app/src/ COPY pom.xml /app/

Flink 源码阅读环境搭建并调试 Flink-Clients 模块

爱⌒轻易说出口 提交于 2021-01-29 01:41:15
本文大纲 一、Flink 官方文档这么全面,为什么还要读 Flink 源码 读文档和读源码的目的是不一样的,就拿 Apache Flink 这个项目来说,如果你想知道 Flink 的使用功能,设计思想,实现原理,看官方文档就足够了;如果你想了解的就是具体细节,比如说 StreamGraph 是怎么生成的或者是 Exactly Once 究竟如何实现的,那么就需要去阅读源码了。 关键是看你的目的是什么,如果你想了解思想,经验等看文档就够了,因为文档是人写给人的;如果你想了解具体细节,那应该去看源码,因为源码是人写给机器的,源码里有到底做了什么这些事情。 那么我写这篇的文章目的是什么?我的目的是,万一你已经在生产上身经百战了,对 Flink 的原理都把握住了,那么看源码是对你来说最好的进阶方式,所以我为你准备了这篇搭建环境的教程,为你节约宝贵的时间陪家人陪孩子不香吗? 二、Flink 源码几百万行,该如何下手 通常对于阅读源码这件事情来说是有方法论可循的。 1、首先得具备前提条件 相关语言和基础技术知识。比如 Java,Maven,Git,设计模式等等。如果你只会 C++,哪天心血来潮去阅读 Flink 源码,那是不现实的; 开源项目的功能。需要知道这个项目是为了解决什么问题,完成什么功能,有哪些特性,如何启动,有哪些配置项。先把这个项目跑起来,能运行简单的 Demo; 相关的文档

Failsafe error: “Invalid signature file digest for Manifest main attributes” when using shade plugin

徘徊边缘 提交于 2021-01-29 01:35:56
问题 When using shade-plugin in maven and later trying to run integration tests using failsafe-plugin, I get the following error when failsafe is about to run, resulting in my integration tests being skipped: [ERROR] Invalid signature file digest for Manifest main attributes This error seems to be caused by signed jars in dependencies. This answer suggests using dependency plugin to filter out the signatures, but it did not seem to work for me. Shade-plugin just unpacked all the dependencies and

Failsafe error: “Invalid signature file digest for Manifest main attributes” when using shade plugin

房东的猫 提交于 2021-01-29 01:33:09
问题 When using shade-plugin in maven and later trying to run integration tests using failsafe-plugin, I get the following error when failsafe is about to run, resulting in my integration tests being skipped: [ERROR] Invalid signature file digest for Manifest main attributes This error seems to be caused by signed jars in dependencies. This answer suggests using dependency plugin to filter out the signatures, but it did not seem to work for me. Shade-plugin just unpacked all the dependencies and

Failsafe error: “Invalid signature file digest for Manifest main attributes” when using shade plugin

狂风中的少年 提交于 2021-01-29 01:32:53
问题 When using shade-plugin in maven and later trying to run integration tests using failsafe-plugin, I get the following error when failsafe is about to run, resulting in my integration tests being skipped: [ERROR] Invalid signature file digest for Manifest main attributes This error seems to be caused by signed jars in dependencies. This answer suggests using dependency plugin to filter out the signatures, but it did not seem to work for me. Shade-plugin just unpacked all the dependencies and

why do I have to remove a dependency from my pom before adding it back and installing to get the latest version of my maven package?

旧巷老猫 提交于 2021-01-29 00:51:16
问题 I have a maven package I've hosted on GitHub package registry. Whenever I make an update to the package I run mvn deploy to publish the changes, but if I simply run mvn install on the dependent application it doesn't seem to install the latest version of the package. Only after deleting the pom.xml and then loading the changes into IntelliJ, then adding it back and running mvn install does it seem to get the new publication of the package. This is my settings.xml file: <settings xmlns="http:/