maven

Spring - Need to autowire @RestController class in a @Component class

不打扰是莪最后的温柔 提交于 2021-01-27 21:05:54
问题 I have combination of web and core projects under the same maven parent module as like, Parent - Web (com.parent.test.web) - Core (com.parent.test.core) I would like to refer the web module dependency in the core project to invoke some of the api from web module Web project sample, com.test.parent.web public interface RestInterface { public ResponseEntity load(); } @RestController public class RestInterfaceImpl implements RestInterface { @Override @RequestMapping(value = "/getData", method =

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>

How does Maven Choose the Version of a Transitive Dependency when Two or More Versions of that Dependency Exist in the Dependency Tree?

╄→гoц情女王★ 提交于 2021-01-27 20:07:19
问题 I've got a project that depends on a library that I maintain called microservices-common. The microservices-common library in turn depends on commons-codec:1.11 . However, when I attempt to use microservices-common in my project, commons-codec:1.10 ends up on my classpath, and my code fails to compile, because microservices-common is attempting to use a org.apache.commons.codec.digest.DigestUtils constructor that was added to commons-codec:1.11 , but isn't present in commons-codec:1.10 . Here

Spring-boot error using Apache Derby as embedded database

♀尐吖头ヾ 提交于 2021-01-27 19:58:55
问题 I am new to using spring boot. I am trying to create a REST API with apache derby as an embedded database but I get this error: "Error creating bean with name 'entityManagerFactory'". pom.xml : http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 <groupId>com.restapi</groupId> <artifactId>restApi</artifactId> <version>0.0.1-SNAPSHOT</version> <packaging>jar</packaging> <name>restApi</name> <description>Demo project for Rest API with spring boot</description> <parent> <groupId>org

Clean/Install Multiple maven projects in order without reactor

只谈情不闲聊 提交于 2021-01-27 19:30:01
问题 Project Structure: Parent-Prj (pom.xml) P1 P2 (Dependent on P1) Details: P1/P2 specified as modules in parent project pom (Parent-Prj) P2 is dependent on P1 (with this depencency specified in pom of P2) We are using a custom maven plugin (eclipse plugin with buttons provided for clean/install/compile etc). Issues due to that: P1/P2 specified as modules in parent project pom. However the projects are not being executed in order. i'e P1 should be build before P1 due to dependency specified.

How to autowire a component in a dependency/external jar in Spring? [duplicate]

回眸只為那壹抹淺笑 提交于 2021-01-27 19:18:07
问题 This question already has answers here : How can I @Autowire a spring bean that was created from an external jar? (4 answers) Closed 1 year ago . I have a Spring Boot project and I can't get components from an external jar to be autowired. When I try to, I got a org.springframework.beans.factory.NoSuchBeanDefinitionException saying that can't find a bean with that name available. I tried some solutions found in similar questions, like these ones: How to autowire @service from external Jar in

INFO - Started Jetty Server, but does not finish

Deadly 提交于 2021-01-27 18:35:46
问题 I am trying to setup Dashbuilder. I have worked through a couple issues already (one with the help of others here, thank you). I am at the point where the program must be compiled, built, and run using command ./buildandrun.sh h2 things start off as expected, but then just stop at "[INFO] Started Jetty Server" in terminal. I've let it sit for hours, no progress. I tried running with the -X flag, but no extra info for that step appeared. When I try to visit http://localhost:8080/dashbuilder to

Maven java project builds, but doesn't run

China☆狼群 提交于 2021-01-27 17:53:01
问题 I am creating a maven project from scratch, first just learn how to use maven. The main project contains no source code file, but it has two modules (app, and util). App depends on util. I would like to have a .jar from app, and have no manifest file if possible. I am able to compile the whole project with mvn clean install, but can not run the app from console. The main project .pom is <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

java.lang.NoClassDefFoundError: org/yaml

允我心安 提交于 2021-01-27 17:30:41
问题 I'm new in using storm trying to submit storm-starter but when i mvn package i got that error java.lang.NoClassDefFoundError: org/yaml/snakeyaml/constructor/BaseConstructor, compiling:(word_count.clj:16:1) at clojure.lang.Compiler$InvokeExpr.eval(Compiler.java:3463) POM file here in the link 回答1: I found this solution: add this in pom file. <groupId>org.testng</groupId> <artifactId>testng</artifactId> <version>6.2</version> <type>jar</type> <exclusions> <exclusion> <artifactId>snakeyaml<

Deploying embedded tomcat enabled spring-boot app using IntelliJ

狂风中的少年 提交于 2021-01-27 15:01:30
问题 I have a spring-boot based application, using embedded tomcat. I have no problem when deploying via mvn spring-boot:run goal, but I have a problems when I try to deploy using intelliJ spring-boot plugins. Important note, we have modified the default pom, turning our app into a war that could be deployed into a full tomcatTraditional Deployment, but this in development mode will be better to just deploy the app using the embedded tomcat. The problem is that basically we ended with this message