maven-3

Accessing local repository in offline mode

做~自己de王妃 提交于 2019-12-14 01:43:37
问题 I need to make Maven access local repository (file://) when it is ran in offline mode (basically, I am trying to setup repository hierarchy so it does not put artifacts where I don't need them). This does not work out-of-the-box, though I always assumed this scenario is supported. Is there some flag to enable particular repository in offline mode? 回答1: For the dev environment only, if you use IntelliJ IDEA, you can configure Maven to work offline as follow: Preferences... > Search for Maven >

PDF report maven configuration with sonar-maven3-plugin 3.5.1 verstion

99封情书 提交于 2019-12-13 21:33:39
问题 I am using sonar-maven3-plugin 3.5.1 and i don't know how to configure PDF report for this plugin. Is sonar-maven3-plugin uses any internal plugin for report. I don't know how and where to configure the reporting plugin. 回答1: In Sonar 4.0+ the plugin is included with the base install. The PDF is generated automatically when you run mvn sonar:sonar , but the dashboard doesn't contain the PDF widget by default. Add it by going to Dashboards > Configure Widgets. Search for and add the PDF widget

Maven can't find artifacts in remote file repository

爱⌒轻易说出口 提交于 2019-12-13 20:17:49
问题 Background: I'm working on a maven project in a closed network, which means I can't connect to Maven Central. I have a repository folder containing all the artifacts I should need, including plugins and maven artifacts. Also, I can't use or install Nexus. Problem: I want to run a Jenkins job using maven 3.6.0 / jdk 1.8.0_162. My settings.xml file is as follows: <?xml version="1.0" encoding="UTF-8"?> <settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001

Executing multiple maven profiles

血红的双手。 提交于 2019-12-13 15:18:47
问题 I'm trying to execute multiple maven profiles using maven commandline mvn clean process-resources -P<Profile1>,<Profile2> But it only executes for Profile2, Profile1 is never executed. Help is required on executing multiple profiles through commandline. Also note that when I list active profiles, it shows both profiles as active. 回答1: mvn clean install -P profile-1,profile-2 This should work fine. profiles doesn't have to be explicitly active. 来源: https://stackoverflow.com/questions/37027526

Maven multi module: error assembling WAR: webxml attribute is required

时光总嘲笑我的痴心妄想 提交于 2019-12-13 15:01:38
问题 I'm turning a single Eclipse Maven-managed webapp project in a multi-module Maven project (this is a test project to experiment with Maven, so feel free to provide any kind of suggestion). The single project webapp doean't have any error, succesfully compiles and behaves correctly when deployed, so I'm starting with a working application. The application has a web part and a console part, meaning that there are some classes with a main() method that when run from within Eclipse (with Run as -

HotSwaping code into “mvnDebug tomcat:run”

时光怂恿深爱的人放手 提交于 2019-12-13 11:47:29
问题 Usually i start tomcat using mvnDebug tomcat:run . After Code-change i need to use mvn tomcat:redeploy . This is sub-optimal because i often only change content of existing method-bodys. Can I HotSwap the method's body into the runtime, and hot-redeploy as a fallback? I have unfortunatally nothing found like a maven-hotswap-plugin . faces-config.xml ... <application> <view-handler>com.sun.facelets.FaceletViewHandler</view-handler> <locale-config> <default-locale>de_DE</default-locale> <

Maven cannot build Java 8

本小妞迷上赌 提交于 2019-12-13 08:56:54
问题 Today I tried to use lambda expression in my project. I configured my project to use Java 8 everywhere: Build path, Java Compiler, maven-compiler-plugin, but it shows errors when I do "Run / Maven Install". java.lang.IllegalStateException: Failed to load ApplicationContext at org.springframework.test.context.CacheAwareContextLoaderDelegate.loadContext(CacheAwareContextLoaderDelegate.java:103) at org.springframework.test.context.TestContext.getApplicationContext(TestContext.java:122) at org

Spring WebApp Maven - Source folder is not on the Java build class path

天大地大妈咪最大 提交于 2019-12-13 08:20:08
问题 I am following this article to understand how to create a Java web application with Spring MVC.I created the web app project CounterWebApp at a separate location first ( mvn eclipse:eclipse -Dwtpversion=2.0 ) and then imported the whole project in Eclipse. I am having difficulty to put the BaseController.java in the correct package as stated in the article.It's either "Source folder is not on the Java build class path", OR BaseController.java is not getting created at the location ( /src/main

mvn javadoc:javadoc failing on just ONE of my Module project

柔情痞子 提交于 2019-12-13 08:11:16
问题 I have really very strange problem with my Sub modules project. Project Structure something like as below. TestPomProject * DAOProject * SchemaProject * EJBProject * EarProject If i execute "mvn javadoc:javadoc" command on these projects ( DAOProject, SchemaProject, EarProject ) It's working fine and completed successfully. But when i execute this command at EJBProject it's giving me following exception and there isn't any different entry for javadoc in EJBProject all having same entry for

Tomcat8 Spring MVC4 maven jsp source code displayed instead of content

独自空忆成欢 提交于 2019-12-13 08:08:03
问题 I am trying to build and deploy the Spring MVC web application from My MacBook Air. Created the maven project and added all the necessary files for the project. Able to build the project and deploy to Tomcat 8 via maven pom.xml. When I access the page it just shows me the jsp code as it is instead of content. I could not able to see the generated servlet file out tomcat work folder. Since am deploying the files via maven I don't think it can hide in my eclipse workspace. I went through