maven-2

If the dependency is a unique snapshot version and install is called, what does maven select?

落花浮王杯 提交于 2019-12-05 20:08:55
Imagine two projects. The first is the framework-core project which is in version 1.1.0 and has several snapshot builds. The other is the example-business project which has the following dependency to framework-core on the build-iteration number 9. <dependency> <groupId>org.example</groupId> <artifactId>framework-core</artifactId> <version>1.1.0-20100518.134928-9</version> </dependency> What happens if mvn install is called on the framework-core ? I found out that the artifact is copied to the folder and is named to *.1.1.0-SNAPSHOT.jar (as expected). This lead me to the assumption that this

maven deploy to tomcat cluster (multiple) in one line

主宰稳场 提交于 2019-12-05 20:08:53
We're trying to have maven deploy to many multiple servers that form our cluster in just one line. This solution works just fine except that we need to run it repeatedly (1 time per server installation) and our goal is to do it after our integration server (jenkins) buils a successful artifact. And having a matrix feature is not really an option at this time. Why build again the project per server if we just need to deploy it? (plus the time spend doing this) We've been experimenting using maven profiles (one per server and trying to activated them all at once, or one big profile with all

Jetty JNDI error within Maven Jetty Plugin

落爺英雄遲暮 提交于 2019-12-05 20:00:31
I am trying to configure a JNDI data source that can be used from an invocation of the Maven Jetty Plugin. I am trying to do this external to the WAR file, so that anyone who might later deploy our webapp with Jetty will not have to edit a configuration file inside the WAR's WEB-INF directory. I created a jetty.xml file as follows: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" "http://jetty.mortbay.org/configure.dtd"> <Configure class="org.mortbay.jetty.webapp.WebAppContext"> <!-- Atomikos XA aware (but not XA capable) JDBC data

Getting -bash: mvn: command not found

只愿长相守 提交于 2019-12-05 19:42:20
I tried setting the Maven PATH in .profile file as well using export commands in terminal(Mac OSX). But, on running mvn commands, getting -bash: mvn: command not found Please help. What did you set up exactly? Did you setup PATH like this (or something equivalent): export PATH=$PATH:...:$M2_HOME/bin If yes, did you logout and login again? According to the bash manpage: When bash is invoked as an interactive login shell , or as a non-interactive shell with the --login option, it first reads and executes commands from the file /etc/profile , if that file exists. After reading that file, it looks

Failed eclipse update when trying to install eclipse

岁酱吖の 提交于 2019-12-05 19:12:30
When trying to install eclipse using the eclipse new software feature, I get this error: Cannot complete the install because one or more required items could not be found. Software being installed: Maven SCM handler for Subclipse (Optional) 0.9.8.200905041414 (org.maven.ide.eclipse.subclipse.feature.feature.group 0.9.8.200905041414) Missing requirement: Maven SCM handler for Subclipse (Optional) 0.9.8.200905041414 (org.maven.ide.eclipse.subclipse.feature.feature.group 0.9.8.200905041414) requires 'org.tigris.subversion.subclipse.ui 0.0.0' but it could not be found I am new to eclipse, so I

Problems by import of a multiple modules maven 2 project into eclipse workspace

孤街醉人 提交于 2019-12-05 18:58:25
I was wondering if someone has experienced the same problem as me and can help me. I have a maven project which contains 6 modules. Some of modules are depending on each other. The project is written in Java and builds to jars, wars and aar. I've been trying to import it to Eclipse with the m2eclipse plug-in. It seems to work fine until the project builds. During the build process I get hundreds of errors complaining about missing Java files which are generated. As I found out eclipse can't recognize that some of generated packages should be interpreted as source code. I don't realy know what

how to configure <manifest> only once in pom.xml in a desktop application

不羁的心 提交于 2019-12-05 18:52:14
I'm making a swing application with maven and I try to keep the pom.xml under tight reins (this file tends to become a pile of junk after pasting there whatever we find in google). My pom is with jar and I use the maven-assembly-plugin with "jar-with-dependencies" descriptor. So I need to define twice the part of my project (main class and versions), once for the normal jar and the other once for the jar-with-dependencies. I think the problem comes from the jar-with-dependencies assembly descriptor, instead of unpacking the normal jar and fusion the manifests, it creates a new jar from $

How can the user-agent be changed in Maven?

一世执手 提交于 2019-12-05 18:49:36
How can I change the user-agent in Maven? I need to be able to change this to get through the company firewall. I am using version 2.2.1 and I noticed an improvement in the 2.0.10 release notes: [MNG-3652] - set a user agent for Maven HTTP requests. Brett Porter posted a blog on Configuring Maven HTTP Connections that describes how you can do this and some other funky things: <server> <id>archiva.localhost</id> <configuration> <httpHeaders> <property> <name>User-Agent</name> <value>Internal-Build-System/1.0</value> </property> </httpHeaders> </configuration> </server> 来源: https://stackoverflow

How can I get nexus to proxy springsource maven repository on s3?

半城伤御伤魂 提交于 2019-12-05 18:09:23
I have nexus 1.5.0 setup to proxy springsource repositories but it's not working. The repositories are on s3 that nexus doesn't seem to understand how to deal with that. What's the right pattern? Here are the repositories I'm told I need, but I cannot access the maven paths with in them http://repository.springsource.com/maven/bundles/release http://repository.springsource.com/maven/bundles/external Do, I need to mirror these locally? According to NEXUS-1121 , your version of Nexus knows how to deal with S3 based repositories. Below, Eugene's comment : Here is Nexus setup that works for me:

How to send out email notification for Maven build

此生再无相见时 提交于 2019-12-05 18:06:23
Is there a simple way to send out email notifications in Maven for each build without outside CI tools, just like Ant? If CI is not an option I would use a simple script wrapper: mvn install 2>&1 | tee build.log && cat build.log | mail -s 'Maven build output' user@example.com && rm -f build.log If you do decide to use a CI tool, I would strongly recommend Hudson. The installation page shows how easy it is to run. Continuous integration server sounds pompous and enterprisey, but Hudson is dead-simple. I'd strongly recommend using a CI tool to manage this for you, I personally like to configure