maven-3

How to include remote jar dependency in Maven

自闭症网瘾萝莉.ら 提交于 2020-01-03 17:47:29
问题 I need to include a third party jar to my pom.xml (using Maven 3.2.5 on a Linux environment). If the jar file is available on the same machine that runs the build I can just declare the dependency in this way: <dependencies> <dependency> <groupId>Foo</groupId> <artifactId>Foo</artifactId> <version>Foo-1.0</version> <scope>system</scope> <systemPath>/myspace/javalibs/foo-1.0.jar</systemPath> </dependency> </dependencies> But what if the jar is on a different server such as <repositories>

How do I get Eclipse and Maven to download the JARs I need?

大憨熊 提交于 2020-01-03 15:36:00
问题 I'm new to Maven and Eclipse. We have been using Netbeans and installing jars manually in our projects. I thought the purpose of Maven was to download the required jars based on your dependencies? In a new project, I added the following under my dependencies node of my pom.xml file: <!-- Java dependencies --> <dependency> <groupId>javax.annotation</groupId> <artifactId>com.springsource.javax.annotation</artifactId> </dependency> <!-- Spring dependencies --> <dependency> <groupId>org

Excluding package with maven-compiler-plugin works for one package but doesn't work for another

本小妞迷上赌 提交于 2020-01-03 11:34:10
问题 My project has the following package structure: src/ com.my.app.school.course -Course.java ... com.my.app.school.course.free -CourseFree.java I use Maven to build the project, in my pom.xml, I defined maven-compiler-plugin to test excluding a package with all its java classes. I first tried following way to exclude package com.my.app.school.course.free : <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>2.3.2<

Maven: Groovy-Eclipse Compiler plugin with Groovy 2.3.5

百般思念 提交于 2020-01-03 10:08:57
问题 Since GMaven has been discontinued, I have been using Groovy-Eclipse Compiler plugin on my Maven projects. The version I used is 2.8.0-01 and I specifically used Groovy 2.1. I know 2.9.0-01-SNAPSHOT has been out for the longest time, but there's no ETA when it will be officially released. My question here is... can I use safely use version 2.8.0-01 with Groovy 2.3.5 without potential side effects? Thanks. 回答1: Since there is no groovy-eclipse-batch 2.3.5 you can not use it with any version of

Maven: Groovy-Eclipse Compiler plugin with Groovy 2.3.5

谁说胖子不能爱 提交于 2020-01-03 10:07:02
问题 Since GMaven has been discontinued, I have been using Groovy-Eclipse Compiler plugin on my Maven projects. The version I used is 2.8.0-01 and I specifically used Groovy 2.1. I know 2.9.0-01-SNAPSHOT has been out for the longest time, but there's no ETA when it will be officially released. My question here is... can I use safely use version 2.8.0-01 with Groovy 2.3.5 without potential side effects? Thanks. 回答1: Since there is no groovy-eclipse-batch 2.3.5 you can not use it with any version of

Maven ignores settings.xml file

被刻印的时光 ゝ 提交于 2020-01-03 08:08:11
问题 I have added proxy configuration in settigns.xml file, but it is not used by Maven, i confirmed this by making the settings.xml file invalid. I ran the maven install command to update settings and global-settings to point to the correct file, still no luck. I am using maven3.0.4. 回答1: Try running Maven with the -X option. It should print as part of the debug output which settings file is being used. Since you already tried it with an invalid file, I bet that something is wrong with the

Running Jar does not use jars from lib/* when packaged with mvn clean package

时光怂恿深爱的人放手 提交于 2020-01-03 05:15:14
问题 I have spring-boot application, which is first packaged to jar using mvn clean package I am trying to run it as java -jar target/bootstep-0.0.1-SNAPSHOT.jar But it fails due to following error. 2015-04-24 16:06:45.425 INFO 27324 --- [ost-startStop-1] c.s.j.api.core.PackagesResourceConfig : Scanning for root resource and provider classes in the packages: com.netflix.discovery com.netflix.eureka 2015-04-24 16:06:45.470 ERROR 27324 --- [ost-startStop-1] o.a.c.c.C.[Tomcat].[localhost].[/] :

Maven and working with legacy app

做~自己de王妃 提交于 2020-01-03 04:55:11
问题 In order to work with a legacy app framework I need to split a webapp project into 2. 1 jar needs to have the java class files, the other will have all the web stuff like jsps, css, et. al.. How can I do this with on maven-3 pom? 回答1: For this purpose you can use the configuration of the maven-war-plugin. This will create a separate jar file which contains the .class files... <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-war-plugin</artifactId> <configuration>

How to transform web.xml during packaging with maven?

…衆ロ難τιáo~ 提交于 2020-01-03 03:35:09
问题 I am porting an ant script to maven, and I am stuck on transforming my web.xml. My web.xml has the following security constraint set to NONE during development, and to CONFIDENTIAL for the war that is produced for the production server. <security-constraint> <web-resource-collection> <web-resource-name>HTTPSOnly</web-resource-name> <url-pattern>/*</url-pattern> </web-resource-collection> <user-data-constraint> <transport-guarantee>NONE</transport-guarantee> </user-data-constraint> </security

How to publish a 3rd party files to remote maven repo using an existing pom.xml?

狂风中的少年 提交于 2020-01-02 06:39:08
问题 I have some third party jars that I want to upload to my nexus maven repo, and so far I have found two ways to do it. Use the Nexus GUI Use the instructions at http://maven.apache.org/guides/mini/guide-3rd-party-jars-remote.html mvn deploy:deploy-file -DgroupId=<group-id> \ -DartifactId=<artifact-id> \ -Dversion=<version> \ -Dpackaging=<type-of-packaging> \ -Dfile=<path-to-file> \ -DrepositoryId=<id-to-map-on-server-section-of-settings.xml> \ -Durl=<url-of-the-repository-to-deploy> I am