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 754EC18A1C for ; Thu, 10 Mar 2016 23:55:08 +0000 (UTC) Received: (qmail 93615 invoked by uid 500); 10 Mar 2016 23:55:07 -0000 Delivered-To: apmail-maven-users-archive@maven.apache.org Received: (qmail 93536 invoked by uid 500); 10 Mar 2016 23:55:07 -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 93508 invoked by uid 99); 10 Mar 2016 23:55:06 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 10 Mar 2016 23:55:06 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 5C97AC2446 for ; Thu, 10 Mar 2016 23:55:06 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.822 X-Spam-Level: X-Spam-Status: No, score=-0.822 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=yahoo.com Received: from mx2-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id QmRDDsPwMS94 for ; Thu, 10 Mar 2016 23:55:05 +0000 (UTC) Received: from nm13-vm3.bullet.mail.ne1.yahoo.com (nm13-vm3.bullet.mail.ne1.yahoo.com [98.138.91.143]) by mx2-lw-us.apache.org (ASF Mail Server at mx2-lw-us.apache.org) with ESMTPS id DBDEE5F572 for ; Thu, 10 Mar 2016 23:55:04 +0000 (UTC) Received: from [98.138.100.103] by nm13.bullet.mail.ne1.yahoo.com with NNFMP; 10 Mar 2016 23:54:58 -0000 Received: from [98.138.84.43] by tm102.bullet.mail.ne1.yahoo.com with NNFMP; 10 Mar 2016 23:54:57 -0000 Received: from [127.0.0.1] by smtp111.mail.ne1.yahoo.com with NNFMP; 10 Mar 2016 23:54:57 -0000 X-Yahoo-Newman-Id: 976106.50860.bm@smtp111.mail.ne1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: uhBJHMUVM1nOzlGESWSMn3WTd5p8.mJ2fUnCh4QvSOyau2h 5yepmyr5z5NLT7qC3XnAIC_UyF8j_JnoQosGQSapf8x3s2XnB0ehx4AotVTz .5HRLdhbGrrCZ5UUBaJ9vpiUmwLBRfv7Gu994dvOY5dwKPnWGD.epfl2OOoL jHIvNolO8ozFyUYIZvGZNorIDKds5ExteDGgsvPsmaNffNX0T.5akuSS8YJv ca.P_q1QS9t83YRQSJs1_wK5FVVnz4uux5ruPFI71wim6Qe3d3TxX9GLLiLc M.teU6UT4uPSvMcwCpgnl0nSNH1p8mjjlow9QSEeoS.KXmXZCbO0eT3zpueY groy0G0i7XoXJrcRpwX66.2fQPcl2c3_rqIvpPQywl2wcIZfiMjQ3M18_qQX GAALmCnFC_Bn1psOM6xS7ul7vHwMkNFus9r7U.y4Ej1i1D1S9qbtYQ8Hw.w6 La1wi0_f7KnFt9SgC4z6Apg5CdI23asHWD6b8pNBOsS7iCEjPlllDuLjNMBI VWzTxrFT0ZeqT1_1UdvRMj8RhApLuQtsL3kg- X-Yahoo-SMTP: PKuT8k2swBCeFOHzkGy5rTOUTa2hBxlR Subject: Re: Why isn't maven-dependency-plugin copying my artifacts anymore? To: Maven Users List References: <56E1F5C9.6000102@gmail.com> <56E1FBF0.5080102@yahoo.com> <56E201BF.9010100@gmail.com> <56E204E4.7090107@yahoo.com> <56E206F6.80407@gmail.com> From: Mark Eggers Message-ID: <56E20936.7080003@yahoo.com> Date: Thu, 10 Mar 2016 15:54:30 -0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: <56E206F6.80407@gmail.com> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="WgihQWCeWMRDiuiBsra4sNBFnAn6e0UQi" X-Antivirus: avast! (VPS 160310-3, 03/10/2016), Outbound message X-Antivirus-Status: Clean --WgihQWCeWMRDiuiBsra4sNBFnAn6e0UQi Content-Type: multipart/mixed; boundary="S92JNlIVXJEP3QHFtoLj27vaXIcoGrmQu" From: Mark Eggers To: Maven Users List Message-ID: <56E20936.7080003@yahoo.com> Subject: Re: Why isn't maven-dependency-plugin copying my artifacts anymore? References: <56E1F5C9.6000102@gmail.com> <56E1FBF0.5080102@yahoo.com> <56E201BF.9010100@gmail.com> <56E204E4.7090107@yahoo.com> <56E206F6.80407@gmail.com> In-Reply-To: <56E206F6.80407@gmail.com> --S92JNlIVXJEP3QHFtoLj27vaXIcoGrmQu Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable David, I just upgraded to 3.3.9, and ran the following on one of my projects (twice): mvn clean package In both cases the JAR files were copied to my output directory and included in both the zip and tar.gz files. I guess a little more information is needed?? =2E . . just my two cents /mde/ On 3/10/2016 3:44 PM, David M. Karr wrote: > On 03/10/2016 03:36 PM, Mark Eggers wrote: >> David, >> >> If you're providing a list of dependencies, then yes you'll use the co= py >> instead of copy-dependencies. >> >> See the following for that information: >> >> https://maven.apache.org/plugins/maven-dependency-plugin/index.html >> >> Also, I notice that you don't have outputDirectory specified. If you >> don't, the dependencies will be copied to >> ${project.build.directory}/dependency. >=20 > Actually, I was specifying that individually on each artifactItem, but > it's definitely an improvement to only specify that once. In any case,= > it still makes no difference. It's not writing the artifacts, whether = I > use "copy" or "copy-dependencies", or whether I say to write them to > "libs" or "${project.build.directory}/libs". It ("copy", to be specific= ) > did it the first time I ran this, but never since then. >=20 > I'm using Maven 3.3.9, with JDK 1.8.0_60. >=20 >> >> See the following for that information: >> >> https://maven.apache.org/plugins/maven-dependency-plugin/copy-mojo.htm= l >> >> . . . just my two cents >> /mde/ >> >> On 3/10/2016 3:22 PM, David M. Karr wrote: >>> Thanks, but replacing my "manual" copy goal with "copy-dependencies" = and >>> implicit dependency declarations made no difference. No error at thi= s >>> phase, it just doesn't do anything. >>> >>> On 03/10/2016 02:57 PM, Mark Eggers wrote: >>>> David, >>>> >>>> On 3/10/2016 2:31 PM, David M. Karr wrote: >>>>> Several days ago, on the advice of someone on another list, I >>>>> configured >>>>> the use of the "maven-dependency-plugin" in my POM so that the buil= d >>>>> would copy some dependencies into a local folder, not inside the >>>>> target >>>>> folder. >>>>> >>>>> This worked the very first time I ran the build with it, and I've b= een >>>>> using the results for a while. >>>>> >>>>> Today I started to look at this again, to ensure that these copied >>>>> artifacts would be properly cleaned up from "mvn clean". I first >>>>> tried >>>>> reconfiguring where it wrote the jars, changing it from "libs" to >>>>> "target/libs". For some reason, when I ran the build, it didn't >>>>> create >>>>> "target/libs", nor did it copy the jars. At that point, I thought >>>>> there >>>>> was some issue with writing them into a subfolder of "target". >>>>> >>>>> I then changed it back to "libs", but I implemented additional >>>>> "maven-clean-plugin" configuration to make it delete that folder. >>>>> When I >>>>> ran "mvn clean", it did what I expected, removing that folder, alon= g >>>>> with "target". >>>>> >>>>> However, when I then tried to build the whole thing again, I found >>>>> that >>>>> it wasn't creating the "libs" folder, and it wasn't copying the jar= s >>>>> there. I then tried manually creating "libs", but that didn't >>>>> help. I >>>>> tried adding "--debug", which didn't tell me anything useful. I >>>>> imagine >>>>> the same thing that is making it not copy the jars into "libs" is t= he >>>>> same thing that prevented it writing them into "target/libs", so th= ere >>>>> likely wasn't a real issue with using a subfolder of "target", but >>>>> something else is just preventing it from copying the jars. >>>>> >>>>> This is what I have in the POM for this plugin (eliding the details= of >>>>> each artifact): >>>>> ----------------- >>>>> >>>>> org.apache.maven.plugins >>>>> maven-dependency-plugin >>>>> 2.10 >>>>> >>>>> >>>>> copy >>>>> package >>>>> >>>>> copy >>>>> >>>>> >>>>> >>>>> >>>>> ... >>>>> >>>>> >>>>> ... >>>>> >>>>> >>>>> ... >>>>> >>>>> >>>>> ... >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> ------------------- >>>> My copy looks like this: >>>> >>>> >>>> org.apache.maven.plugins >>>> maven-dependency-plugin >>>> 2.10 >>>> >>>> >>>> prepare-package >>>> >>>> copy-dependencies >>>> >>>> >>>> ${project.build.directory}/lib >>>> compile >>>> >>>> >>>> >>>> >>>> >>>> I'm currently running 3.3.3 and JDK 1.8.0_74. I need to upgrade my >>>> Maven. >>>> >>>> This works as expected, with dependencies getting copied to target/l= ib. >>>> >>>> I have this in my JAR plugin: >>>> >>>> true >>>> lib/ >>>> >>>> along with specifying the main class. >>>> >>>> I create both a zip and a tar.gz file with the assembly plugin. >>>> >>>> An end user just unpacks the archive, changes to the directory where= >>>> the >>>> archive was unpacked, and runs java -jar ${artifactId}.jar. >>>> >>>> Seems to work reasonably well. >>>> >>>> . . . just my two cents >>>> /mde/ --S92JNlIVXJEP3QHFtoLj27vaXIcoGrmQu-- --WgihQWCeWMRDiuiBsra4sNBFnAn6e0UQi Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBAgAGBQJW4glKAAoJEEFGbsYNeTwt8A0IAIu6mTuXfICY0NRbmYx4lO1+ BiUx/P65oCU7XFebfc2AASQ1MJ+NFgr26tId4c2T5nRskXJv1Ya3OIG4dNONgF2k efjJhp+XxIoUawAGmPbl0tWEjUnxdBo1SW0TgaHVB+eZyMDH0NQF5R/wOImn0EcW 09aS3B8+zZPRyLgeGWfImTNYqhEOBNL+fP6TDNx8y/N8AbooJSV55AI0x6cUPV9/ ICht/LCOfWy6vC2LlOzb4B7fw5qksR2zqPwM0cHAoVsccaydA1MwAHPxuJOLEHmQ BbKHICxQ1dEh57kLV2DS2W/McjzH7xHSOFMivcIgrI5xTkFBJqbQEZWDH6I2wAc= =R7Rh -----END PGP SIGNATURE----- --WgihQWCeWMRDiuiBsra4sNBFnAn6e0UQi--