maven-dependency

Maven : “Caused by: java.lang.NoClassDefFoundError: com/omnesys/omne/om/OMN”

核能气质少年 提交于 2020-07-03 13:09:32
问题 I want to add 3rd party external jar into my maven repository. My project is in Spring Boot. Error : `Exception in thread "main" java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner .java

How can I select the output of maven dependency:list?

為{幸葍}努か 提交于 2020-05-14 09:07:06
问题 I have a big group of projects and they depend on each others with pom.xml . I want to get the relationships of these dependencies among projects in a file by shell. mvn dependency:list is the key command, but the result is not satisfied. https://maven.apache.org/plugins/maven-dependency-plugin/list-mojo.html with the guide, i have use some parameters, but the result is not good enough now the command is: mvn dependency:list -DincludeGroupIds=group -DoutputFile=dependency.xml -DappendOutput

How to create a single library jar from maven project with multiple submodules?

百般思念 提交于 2020-01-06 04:56:09
问题 I have a quite large java maven project with over 200 modules, it is OK as is. I am trying to merge all of those modules to single jar. In some cases it would be very handy to declare just one new maven dependency eg. my-library-5.2.4-SNAPSHOT-bundle.jar or something similar in new projects. I have tried to use maven assembly-plugin. I can create new jar file, jar contains all the module jars and it goes properly to local .m2 -folder if I install it. Jar can be declared as dependency in other

How to ignore Maven dependency-check failure on missing nvd file

北战南征 提交于 2020-01-03 08:55:10
问题 I tried to perform a release of my project today using the Maven release plugin. It failed due to the dependency-check-maven plugin's attempt to download the 2020 version of the CVD file, which hasn't yet been uploaded: Unable to download meta file: https://nvd.nist.gov/feeds/json/cve/1.1/nvdcve-1.1-2020.meta; received 404 -- resource not found A brief perusal of the NVD Data Feeds page shows that file hasn't been uploaded yet. Obviously I could wait about 24 hours and this problem will

How to work with selenium-chrome-driver in Maven without ChromeDriver.exe

拟墨画扇 提交于 2019-12-30 04:40:13
问题 I add the below dependency and code for Opening Chrome,but browser is not opening. <dependency> <groupId>org.seleniumhq.selenium</groupId> <artifactId>selenium-chrome-driver</artifactId> <version>2.50.0</version> </dependency> My code :- package example; import org.openqa.selenium.WebDriver;` import org.openqa.selenium.chrome.ChromeDriver; import org.testng.annotations.Test; public class DepChrome { @Test public void testBrowser() { WebDriver driver = new ChromeDriver(); driver.manage()

Maven Integration with Query DSL

痞子三分冷 提交于 2019-12-22 16:58:46
问题 I am trying to integrate an existing project in maven with query dsl I have added the dependencies as below ` <dependency> <groupId>com.mysema.querydsl</groupId> <artifactId>querydsl-apt</artifactId> <version>2.5.0</version> <scope>provided</scope> </dependency> <dependency> <groupId>com.mysema.querydsl</groupId> <artifactId>querydsl-jpa</artifactId> <version>2.5.0</version> </dependency> <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-log4j12</artifactId> <version>1.6.1</version>

Using Java project as jar file in other project as maven dependency

泄露秘密 提交于 2019-12-13 03:42:37
问题 I want to use one maven project as dependency using POM.xml in other project with few limitations. My Maven project1 is framework project. I have created a jar file for that project. This project will reside in a private git repo. I donot want to expose this project other user to edit it. In my maven project2 or maven project3 i want to use the maven project1 as dependency. the jar file should be downladed to maven dependencies during run time. Note: the user will not have mave project1 in

Maven - Multiple version of same dependency

坚强是说给别人听的谎言 提交于 2019-12-12 07:46:13
问题 I have a web application in which the dependencies pull in two jars called: javassist-3.9.0.GA.jar javassist-3.20.0-GA.jar when I package the WAR I have both of these in the WEB-INF/lib directory, my question is that the application is running and why I wouldn't get any issues because apparently I have same classes in both jars and there should be issues right? 回答1: For Java it doesn't matter how many versions of a class you provide. The default classloader will just pick the first one on the

LocalVariableDeclarationStatement - The method addAnnotatedClass() is undefined for the type Configuration

不羁岁月 提交于 2019-12-12 03:39:07
问题 My pom.xml is : <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>HibernateOneToOneMapping</groupId> <artifactId>HibernateOneToOneMapping</artifactId> <version>0.0.1-SNAPSHOT</version> <build> <sourceDirectory>src</sourceDirectory> <plugins> <plugin> <artifactId>maven-compiler-plugin</artifactId>

Maven3 : How to get all the project dependencies in a Custom Maven Extension

守給你的承諾、 提交于 2019-12-11 23:42:45
问题 In Maven 3.x , how I can get all the dependencies of a project including the transitive in a custom maven extension (By not using Aether) Currently I have this : @Component(role = AbstractMavenLifecycleParticipant.class, hint = "Test") public class sampleExtension extends AbstractMavenLifecycleParticipant implements LogEnabled { private Logger logger; @Override public void afterSessionStart(MavenSession session) throws MavenExecutionException { this.logger.info("Starting afterSessionStart()")