pom.xml

Generate jar file in Maven with dependencies and tests

蓝咒 提交于 2021-02-07 05:23:07
问题 I use this code in pom.xml to create a jar file. <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> <configuration> <excludes> <exclude>**/log4j.properties</exclude> </excludes> <archive> <manifest> <mainClass>test.LeanFTest</mainClass> </manifest> </archive> </configuration> </plugin> I got error message: Deployment failed: repository element was not specified in the POM inside distribution UPDATE: I added another plugin in pom.xml. <plugin>

How to enable TLSv1.2 in java 7?

风格不统一 提交于 2021-02-05 07:10:27
问题 I'm trying to enable TSLv1.2 in my machine which has java 1.7 using the commands -mvn -Dhttps.protocols=TLSv1,TLSv1.1,TLSv1.2 install / mvn -Dhttps.protocols=TLSv1.2 install. But its throwing some errors saying my pom.xml has some unresolved dependencies, those dependencies errors are there because my project couldn't download from maven repository due to TSLv1.2 issue. Seems like a deadlock to me, Can anyone help me on how to resolve it? 回答1: You need to configure MAVEN_OPTS env variable or

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

How to read java files from target folder in spring boot

爷,独闯天下 提交于 2021-01-29 14:52:38
问题 I've been trying to read java files that are stored inside target/generated-sources folder. To store these files I have used below plugin in pom.xml file <!-- For Code Generation --> <plugin> <groupId>org.jvnet.jaxb2.maven2</groupId> <artifactId>maven-jaxb2-plugin</artifactId> <version>0.12.3</version> <executions> <execution> <id>add-source-for-demoapp</id> <goals> <goal>generate</goal> </goals> <configuration> <schemaDirectory>src/main/resources/xsd</schemaDirectory> <schemaIncludes>

Issues with maven dependencies: UnsolvableVersionConflictException

梦想的初衷 提交于 2021-01-29 08:43:47
问题 Im new in grpc and java. I have a big problem with my dependencies: Caused by: org.eclipse.aether.collection.UnsolvableVersionConflictException: Could not resolve version conflict among [io.grpc:grpc-all:jar:1.27.1 -> io.grpc:grpc-core:jar:[1.27.1,1.27.1], io.grpc:grpc-all:jar:1.27.1 -> io.grpc:grpc-netty:jar:1.27.1 -> io.grpc:grpc-core:jar:[1.27.1,1.27.1], io.grpc:grpc-all:jar:1.27.1 -> io.grpc:grpc-okhttp:jar:1.27.1 -> io.grpc:grpc-core:jar:[1.27.1,1.27.1], io.grpc:grpc-all:jar:1.27.1 -> io

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:/

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:38:29
问题 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:/

How to decide which plugin to use in maven?

大兔子大兔子 提交于 2021-01-28 01:45:38
问题 I was going through the maven documentation. I saw maven works using plugins, for each phase there is one or more plugin and for each plugin there is one or more goals. there are plugin for compile, install, deploy, clean etc. I saw in my project they used maven-clean-plugin. Then how maven clean install command is working if we did not put the maven-install-plugin? Question might be bit silly but i am new the this world and appreciate your help. 回答1: That would follow up with some default

After deploy in Nexus, the variables in POM.xml are not resolved?

早过忘川 提交于 2021-01-27 20:28:39
问题 I use Maven Multi-Modul, Jenkins builds and then deploy in Nexus... I'm using in my Pom files many variables that I have defined in parent-pom part propertis I would have after the build/deploy resolved the variables in Pom-Nexus. I know that this is feasible, because I made a few years ago.... 回答1: I think, i found it <build> <plugins> <plugin> <groupId>com.sap.prd.mobile.ios.maven.plugins</groupId> <artifactId>resolve-pom-maven-plugin</artifactId> <version>1.0</version> <executions>

The import io.restassured.RestAssured cannot be resolved

筅森魡賤 提交于 2021-01-27 14:42:11
问题 Hi I am not able to resolve the error while using rest assured 4.1.1. library in my Eclipse IDE. I have added the rest assured library in my pom.xml file still the error is not resolved. I tried re-importing the rest assured library from https://mvnrepository.com/artifact/io.rest-assured/rest-assured/4.1.1 But still doesn't work <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:/