Return-Path: X-Original-To: apmail-maven-users-archive@www.apache.org Delivered-To: apmail-maven-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5C23A10524 for ; Fri, 6 Dec 2013 23:06:31 +0000 (UTC) Received: (qmail 73769 invoked by uid 500); 6 Dec 2013 23:06:29 -0000 Delivered-To: apmail-maven-users-archive@maven.apache.org Received: (qmail 73719 invoked by uid 500); 6 Dec 2013 23:06:29 -0000 Mailing-List: contact users-help@maven.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Maven Users List" Reply-To: "Maven Users List" Delivered-To: mailing list users@maven.apache.org Received: (qmail 73711 invoked by uid 99); 6 Dec 2013 23:06:29 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 06 Dec 2013 23:06:29 +0000 X-ASF-Spam-Status: No, hits=0.0 required=5.0 tests=SPF_PASS,WEIRD_PORT X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [69.150.27.74] (HELO stlmail1.amdocs.com) (69.150.27.74) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 06 Dec 2013 23:06:25 +0000 X-AuditID: 0a1a0cd4-f796e6d000001409-45-52a2585bbf31 Received: from USSTLDAGFE3.corp.amdocs.com (Unknown_Domain [10.26.49.50]) (using TLS with cipher AES128-SHA (128/128 bits)) (Client did not present a certificate) by stlmail1.amdocs.com (Amdocs ESMTP Ready) with SMTP id BD.56.05129.B5852A25; Fri, 6 Dec 2013 17:06:04 -0600 (CST) Received: from USSTLDAGBE1.corp.amdocs.com ([fe80::51b3:73bc:1f52:a809]) by USSTLDAGFE3.corp.amdocs.com ([fe80::48a1:c495:2ce:f697%10]) with mapi id 14.03.0158.001; Fri, 6 Dec 2013 17:06:03 -0600 From: John Dix To: Maven Users List Subject: Version resolution question (was: plugin version ranges errors with Maven 3.1.1) Thread-Topic: Version resolution question (was: plugin version ranges errors with Maven 3.1.1) Thread-Index: Ac7y1rubiLgclABkRMePIiUkBUTz+Q== Date: Fri, 6 Dec 2013 23:06:03 +0000 Message-ID: <1B8FF9BB83FDCE44AB581D7E394AB90D2A3831FB@USSTLDAGBE1.corp.amdocs.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.26.49.50] Content-Type: text/plain; charset="us-ascii" content-transfer-encoding: quoted-printable MIME-Version: 1.0 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmpgleLIzCtJLcpLzFFi42LhkjI00o2JWBRk0PGOw+LR1uuMDowe7U+F AhijGhhtkvMLKp1yMvNSFIqSC0pslVLLUitKEouSHYA4I7MsVS8xNyU/uVgvOT9XSd/OJjEv L78ksSRVISW1ONlWyREsGZ+SWZyck5iZm1qkpJCZYqtkrKRQkJOYnJqbmgc0MrGgIDUvRcmO SwED2CR8Zsm4teAXU8F6rYoZk/6zNjDuUuxi5OCQEDCR2NnL1sXICWSKSVy4tx7I5uIQEpjL JNH8/wIjhHOcUeLukrfMIFVsAioSZx6+BOsQEdCVeHjxCVhcWCBa4sS/VVDxBInO7c/ZIWw9 iQMzm1lBbBag3umr/7CA2LwCQRKPTz0Bq2EE2vz91BomEJtZQFzi1pP5TBAXCUgs2XOeGcIW lXj5+B8rhC0vsejJdKh6HYkFuz+xQdjaEssWvmaGmC8ocXLmE5YJjMKzkIydhaRlFpKWWUha FjCyrGIULi7JyU3MzDFEiphNjOBo5rmyg7H7ltUhRgEORiUe3ke2i4KEWBPLiitzDzFKcDAr ifDuVAMK8aYkVlalFuXHF5XmpBYfYvQB+n8is5Rocj4w0eSVxBsamxqZG5oZmlsYmpmiC5ub GJiZmhspifMa9PMECQmkA9NCdmpqQWoRzDgmDk6pBsagOczv92/UWRf/kleE5Wdhr1LD6Wmc VjoP9X1PWGU5bYkRYM+vmVpoNiGbc2oKx8Xzs5V/u2zdeK4orPORnFnGP+3jy589uCm2ny+x fYbXvfkly082pL/R1w2JyRc+Oet3b+z2L33fF7cvPH9B4V1JzS7zKuaC/68vnVf7Zez0bpFS 2QKz5FYlluKMREMt5qLiRABHfkV8EwMAAA== X-Virus-Checked: Checked by ClamAV on apache.org Thanks Curtis and everyone. I have a follow up question around the same thing build. The command line I am using: maven clean install Our 3.1.1 maven build is having issues finding the plugins in our .m2 direct= ory unless I specify on the command line -Pmavencentral which is defined in= our .m2/settings.xml as such: mavencentral mcentral http://sd-repo-2.eng.qpass.net:8081/nexus/content/repositorie= s/central true false mcentral http://sd-repo-2.eng.qpass.net:8081/nexus/content/repositorie= s/central true false Which is our proxy to the public internet mavencentral server. I have tried using the -o and -U switches at the command line when executing= without the -Pmavencentral and I receive the following: [ERROR] Plugin org.apache.maven.plugins:maven-shade-plugin:2.1 or one of its= dependencies could not be resolved: Cannot access qpass-nexus-hosted-releases (http://pd-repo2.eng.qpass.net:8081/nexus= /content/repositories/releases) in offline mode and the artifact org.apache.maven.plugins:maven-shade-plugin:jar:2.1 ha= s not been downloaded from it before. -> [Help 1] I want it to look only in the .m2 repository. Is there another -D setting I= need to speciy? Is there some place I should be looking to see for conflict= ing settings? -----Original Message----- From: ctrueden.wisc@gmail.com [mailto:ctrueden.wisc@gmail.com] On Behalf Of= Curtis Rueden Sent: Friday, December 06, 2013 2:34 PM To: Maven Users List Subject: Re: plugin version ranges errors with Maven 3.1.1 Hi John, You might be able to use profiles to define a different version of maven-sha= de-plugin depending on the version of Maven being used. However, some caveat= s: 1) There is no explicit profile activation for Maven version. The hack peopl= e use is to activate based on the existence of a property known only to e.g.= Maven 3.x. I am not sure what a good property would be for Maven 3.1 specifically (i.e., not known to 3.0.x), but one probably exists. 2) When it comes to profiles, as Stephen Connolly likes to say: "that way ma= dness lies." This hack will get your build done for you, but it is a hack, a= nd you should never forget that it is a hack. Or to put another way: it's technical debt. When the debt must be paid is unclear, but e.g. if the= maven-shade-plugin produces a different binary result depending on which ve= rsion you use, then you may run into apparently bizarre problems with users= who built using Maven 3.1.1 rather than an older version, or vice versa, an= d it may take you some time to diagnose *why* it's happening (surprise: it's because a different version of maven-shade-plugin got select= ed!), and so on. Such problems are why the other posters in this thread are encouraging you t= o just choose a version of maven-shade-plugin that works for you. You *can* put into your POM that it requires a certain minimum Maven version [1]= , and Maven will (IIRC) just fail fast if the version is too old. That is a= lot less mysterious than some subtle inconsistency in shaded artifact build= results. And you'll get truly repeatable builds which are one of the fabulo= us benefits of a well-structured build system. Regards, Curtis [1] http://maven.apache.org/pom.html#Prerequisites On Fri, Dec 6, 2013 at 4:20 PM, John Dix wrote: > We are getting build failures when using 3.1.1 and the 2.0 shade plugin. > It seems to be a documented issue: > > https://issues.apache.org/jira/browse/STANBOL-1212 > > So I wanted to be able to have the same parent pom for our builds that > still require 3.0.5 which currently sets it to 2.0 and does not run > into this error. > > -----Original Message----- > From: Wayne Fay [mailto:waynefay@gmail.com] > Sent: Friday, December 06, 2013 12:51 PM > To: Maven Users List > Subject: Re: plugin version ranges errors with Maven 3.1.1 > > > Agreed however I need to support two builds in our environment one > > that uses Maven 3.0.5 and one that does 3.1.1 without having to > > change > the file every time. > > Sorry for asking the obvious question, but what prevents you from > specifying version [2.0] or whatever and using that with both 3.0.5 > and 3.1.1? Is there some incompatibility I am unaware of presently? > > Wayne > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org > For additional commands, e-mail: users-help@maven.apache.org > > > This message and the information contained herein is proprietary and > confidential and subject to the Amdocs policy statement, you may > review at http://www.amdocs.com/email_disclaimer.asp > This message and the information contained herein is proprietary and confide= ntial and subject to the Amdocs policy statement, you may review at http://www.amdocs.com/email_disclaimer.asp --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@maven.apache.org For additional commands, e-mail: users-help@maven.apache.org