maven

Combine Javadoc for multiple modules into a single collection

房东的猫 提交于 2021-02-18 10:33:28
问题 I have a Java application consisting of several modules. I'd like to generate Javadoc for all of them together: that is to say, from these several modules, I'd like a single collection of HTML files with a single index.html , a single allclasses-frame.html etc. and the various hyperlinks should work across modules. I use Maven but I'm not necessarily constrained to Maven-specific solutions. This will be performed by a cron job so other tools could also be used. What is the most

Maven Quick-start Guide [closed]

陌路散爱 提交于 2021-02-18 10:20:15
问题 Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 6 years ago . Improve this question I'm tasked with getting a development environment set up for a new program at work. The lead has chosen Eclipse as the IDE for its OSGi support and Maven as the build utility. I've struggled through getting Maven integrated with Eclipse and I'm grudgingly

Maven: meaning of repository ID

可紊 提交于 2021-02-18 10:13:29
问题 In my POM file, I'm specifying two repositories: <repositories> <repository> <id>myid</id> <url>http://url1</url> </repository> <repository> <id>myid</id> <url>http://url2</url> </repository> </repositories> So, from the Maven documentation, I got the impression that the id element should cross-reference with a settings.xml server entry, to specify authentication information. Both http://url1 and http://url2 , in my case, require the very same authentication data; that is why I'm using the

Maven: meaning of repository ID

眉间皱痕 提交于 2021-02-18 10:10:19
问题 In my POM file, I'm specifying two repositories: <repositories> <repository> <id>myid</id> <url>http://url1</url> </repository> <repository> <id>myid</id> <url>http://url2</url> </repository> </repositories> So, from the Maven documentation, I got the impression that the id element should cross-reference with a settings.xml server entry, to specify authentication information. Both http://url1 and http://url2 , in my case, require the very same authentication data; that is why I'm using the

springboot整合zookeeper和dubbo

别来无恙 提交于 2021-02-18 09:49:17
序言 dubbo就是个rpc框架,之前都是一直在用,现在稍微总结下以备以后使用。 我就直接贴代码了,代码肯定能运行,如果运行不了那么看我之前的zookeeper配置,或者把我贴的代码重新复制下,实在不行请留言,我看到会回复的。 整体项目结构 项目是父子maven结构,父maven中基础jar包都依赖好了,子maven只需继承父maven,额外依赖自己的jar包就可以,其中 domain 是放实体类的, interfaceapi 是放提供者提供给消费者的接口的。 provider 是提供者 consumer 是消费者,不过真实项目中可能一个模块即是消费者又是提供者。所以自己需要的话直接写就行,用法都一样的。 2.主pom文件 <?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>

Maven shade plugin warning: we have a duplicate - how to fix?

偶尔善良 提交于 2021-02-18 08:54:20
问题 This is my project POM (link to the paste, so you can right click > save as 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.zybnet</groupId> <artifactId>excel-reporter</artifactId> <version>0.0.1-SNAPSHOT</version> <packaging>jar</packaging> <name>mvn1</name> <url>http://maven

spring profile 与maven profile

匆匆过客 提交于 2021-02-18 08:26:35
profile: n. 侧面,半面; 外形,轮廓; [航]翼型; 人物简介; vt. 描…的轮廓; 给…画侧面图; 为(某人)写传略; [机]铣出…的轮廓; 这个词具体是什么意思,参考: https://www.zhihu.com/question/28464897 我的理解,就是一个配置。 一、spring中的profile profile 说白了就是利用一个变量来控制加载哪些bean。主要用在实现在不同的环境下加载不同的bean。 比如在测试环境下,加载根据这个数据库的配信息生成的bean,在生产环境下使用另一个bean。 简单用法: 将spring-profile-test.xml和spring-profile-dev.xml都import入主配置文件中,但是由于spring.profile.active的值不同,真正加载的bean也不同(不满足profile值的bean不会被加载,此时相当于import了一个空文件) 在运行的使用配置下面参数来激活test环境需要加载的bean,profile的值可以有多个,测试需要用“,”隔开。 -Dspring.profiles.active=test 当然profile还有其他激活方法,如: DispatcherServlet的初始化参数传入 web app上下文参数传入 JNDI入口 环境变量 JVM系统属性

How to create a fat jar?

风流意气都作罢 提交于 2021-02-18 07:57:50
问题 With SpringBoot, you have the @SpringBootApplication annotation, but what is the equivalent with the neat Java Spark framework? IntelliJ creates a Maven project and I added the spark dependency, but running the install goal, I get a 5 KB jar with no manifest. Not an executable jar. The pom.xml created thus far is as follows: <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:/

--mount=type=cache in buildkit

自作多情 提交于 2021-02-18 06:57:12
问题 I'm trying to get maven offline builds working from within a docker container. I've enabled buildkit. I've run mvn dependency:go-offline -s ~/checkouts/settings.xml to cache the dependencies in /root/.m2 of host machine. I wish to use this inside the container that builds maven project. Here is my Dockerfile: #syntax=docker/dockerfile:experimental FROM maven:3.6.1-jdk-11 AS build WORKDIR / COPY . / RUN --mount=type=cache,target=/root/.m2 mvn -o install FROM scratch COPY --from=build /admin

Skip single test with maven with command line options

我只是一个虾纸丫 提交于 2021-02-18 05:10:46
问题 I would like to skip a single test (e.g. com.example.MyTest ) when building a project with Maven from the command line. I'm aware of similar questions like this one, but they all require either modification of source code or pom.xml . I would like to do without modifications. How can I exclude a test using command line options only? What I've tried so far after reading some documentation is mvn clean install -Dtest="*,!com.example.MyTest" but the test is still not skipped. I'm using surefire