Re: Dependency scope - provided or optional.. ?
Which of your dependencies do you need help with? I did the POM for Commons Logging 1.1.1, so I have a pretty good idea of what's needed. I had marked all the other dependencies for log4j as optional, because prior to Maven, that is technically what people had been doing naturally anyway ("Oh, SMTPAppender needs javax.mail, I'll get that included"). There was some debate about provided/optional, so I wanted to have my facts straight should the discussion come up again. Provided did not sit right with me, but I couldn't find the docs on optional. I wonder if the Maven dependency scope documentation should be amended to add a reference to that flag, given relevance in making the decision on scope (especially for new people)> I'd love to see a working POM for log4j, see my patches to the issue mentioned above. Me too, it's a long time in coming. I'm planning on committing your patch shortly, the very least for the whitespace tidy up! :) Paul - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Dependency scope - provided or optional.. ?
On 10/05/2008, at 9:38 AM, Brianefox wrote: Provided means to include in the compile do but not in the package (war) Optional means that it wont be pulled in transitively by users of your jar From this, I gather Optional is actually what we want. Would it be fair to say that Optional is a sort of extension to provided. Whereas Provided indicates that it is actually needed downstream, but the downstream projects need to arrange their own bundling of it. A dependency marked as Provided still indicates to the downstream project that they need it to run it. Would you agree that Optional is what we want for log4j? cheers, Paul - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Dependency scope - provided or optional.. ?
Could some explain the difference between the dependency scope "provided" versus "optional" if there actually is any.. We have converted log4j over to Maven recently and accidently forgot to mark a few dependencies with flags indicating that, while needing for compile time, should not necessarily be enforced on the end user. I refer people to this issue: https://issues.apache.org/bugzilla/show_bug.cgi?id=43304 I originally used 'optional' because I saw this being used in the ActiveMQ project, but now I can't find any real definitive reference to what that means. I've read: http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html and that makes no mention of the 'optional' scope type. Is it a legacy marker? If someone could provide advice here I would appreciate it. cheers, Paul - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Feedback on maven repository managers
On 14/08/2007, at 5:05 PM, Brett Porter wrote: http://mail-archives.apache.org/mod_mbox/maven-users/200707.mbox/% [EMAIL PROTECTED] I have some more detailed notes I've been meaning to post, will get around to it some time this month. Archiva has just had another (beta) release too, and is now feature complete for an upcoming 1.0 and the known issues are pretty well covered in JIRA. - Brett I'd have to give Archiva a +1 too, despite having a couple of niggly UI issues, and being bitten by this one (we are starting to use the 'mvn release' plugin ): http://jira.codehaus.org/browse/MRM-432 it's damn handy, particularly if you're not near the Central Maven Repo anyway (being in Australia, we literally are on the other side of the world). If you have a nicely cached Archiva, that first install of Maven on a new box is beautifully fast with the mirrors set to Archiva. cheers, Paul Smith Core Engineering Manager Aconex The easy way to save time and money on your project 696 Bourke Street, Melbourne, VIC 3000, Australia Tel: +61 3 9240 0200 Fax: +61 3 9240 0299 Email: [EMAIL PROTECTED] www.aconex.com This email and any attachments are intended solely for the addressee. The contents may be privileged, confidential and/or subject to copyright or other applicable law. No confidentiality or privilege is lost by an erroneous transmission. If you have received this e-mail in error, please let us know by reply e-mail and delete or destroy this mail and all copies. If you are not the intended recipient of this message you must not disseminate, copy or take any action in reliance on it. The sender takes no responsibility for the effect of this message upon the recipient's computer system.
Re: Very odd central maven repo problem
It looks like your running a *nix, but can you tell us specifically what OS, JDK version, Maven version, etc? We've had Windows users run into similar problems who were having troubles due to overzealous antivirus software, etc. maven 2.0.6 running on both OSX and RedHat EL3 (happens across everything at the moment). If I manually install that 2.0.6 pom from the one copy I have locally (I must have retrieved it successfully through maven at one point) it works fine, obviously because it doesn't have to download it. Can someone please try moving aside their 2.0.6 maven plugin pom directory and seeing if they get the same thing? Paul - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Very odd central maven repo problem
On 01/08/2007, at 4:01 PM, Milos Kleint wrote: AFAIK that's intentional. To avoid people downloading the whole repo through wget. rsynch is the preferred method I think. Then why is curl not rejected? Why is Archiva failing? Why is my local mvn retrieval also failing? I'm happy to rsync, but I don't understand why I have to do this, given it should be one of the initial things that a fresh maven install would need to pull down? cheers, Paul - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Very odd central maven repo problem
This has happened before, and then appeared to magically resolve itself, but it's quite sticky at the moment. It seems to stem from this weirdness. Given a URL on the central Repo: http://repo1.maven.org/maven2/org/apache/maven/maven/2.0.6/ maven-2.0.6.pom 1) I can browse using Firefox - OK 2) I can use command line 'curl' to view (curl http://repo1.maven.org/ maven2/org/apache/maven/maven/2.0.6/maven-2.0.6.pom) 3) I CANNOT use 'wget' to retrieve it (wget http://repo1.maven.org/ maven2/org/apache/maven/maven/2.0.6/maven-2.0.6.pom) wget reports 403 Forbidden: [EMAIL PROTECTED] tmp]$ wget http://repo1.maven.org/maven2/org/apache/ maven/maven/2.0.4/maven-2.0.4.pom-2.0.4.pom --15:37:16-- http://repo1.maven.org/maven2/org/apache/maven/maven/ 2.0.4/maven-2.0.4.pom => `maven-2.0.4.pom' Resolving repo1.maven.org... 63.246.20.112 Connecting to repo1.maven.org|63.246.20.112|:80... connected. HTTP request sent, awaiting response... 403 Forbidden 15:37:18 ERROR 403: Forbidden. [EMAIL PROTECTED] tmp]$ wget http://repo1.maven.org/maven2/org/apache/ maven/maven/2.0.6/maven-2.0.6.pom --15:38:22-- http://repo1.maven.org/maven2/org/apache/maven/maven/ 2.0.6/maven-2.0.6.pom => `maven-2.0.6.pom' Resolving repo1.maven.org... 63.246.20.112 Connecting to repo1.maven.org|63.246.20.112|:80... connected. HTTP request sent, awaiting response... 403 Forbidden 15:38:22 ERROR 403: Forbidden. [ I think this is why our Archiva repo says this: 337271615 [SocketListener0-0] ERROR org.apache.maven.archiva.policies.PreDownloadPolicy:cache-failures - Unknown checksum policyCode [cache] 337271615 [SocketListener0-0] INFO org.apache.maven.archiva.proxy.RepositoryProxyConnectors:default - Failed pre-download policies - /volume2/maven2/org/apache/maven/maven/ 2.0.6/maven-2.0.6.pom 337273843 [SocketListener0-0] WARN org.apache.maven.archiva.policies.PostDownloadPolicy:checksum - SHA1 is incorrect for /volume2/maven2/org/apache/maven/maven/2.0.6/ maven-2.0.6.pom 337273843 [SocketListener0-0] WARN org.apache.maven.archiva.policies.PostDownloadPolicy:checksum - MD5 is incorrect for /volume2/maven2/org/apache/maven/maven/2.0.6/ maven-2.0.6.pom 337273843 [SocketListener0-0] INFO org.apache.maven.archiva.proxy.RepositoryProxyConnectors:default - Failed post-download policies - /volume2/maven2/org/apache/maven/ maven/2.0.6/maven-2.0.6.pom And why when I temporarily remove the mirror settings to archiva and manually move an originally downloaded 2.0.6 set of pom details, I still get this: [WARNING] *** CHECKSUM FAILED - Checksum failed on download: local = '1991be0ed3e1820e135201406d5acabf8c08d426'; remote = '218016709d90d14b64bfb1de3a86a2247e8873db' - RETRYING Downloading: http://repo1.maven.org/maven2/org/apache/maven/maven/ 2.0.6/maven-2.0.6.pom 8K downloaded [WARNING] *** CHECKSUM FAILED - Checksum failed on download: local = '1991be0ed3e1820e135201406d5acabf8c08d426'; remote = '218016709d90d14b64bfb1de3a86a2247e8873db' - IGNORING Is there something wacky with the repository? It seems to eventually go away. Paul Smith Core Engineering Manager Aconex The easy way to save time and money on your project 696 Bourke Street, Melbourne, VIC 3000, Australia Tel: +61 3 9240 0200 Fax: +61 3 9240 0299 Email: [EMAIL PROTECTED] www.aconex.com This email and any attachments are intended solely for the addressee. The contents may be privileged, confidential and/or subject to copyright or other applicable law. No confidentiality or privilege is lost by an erroneous transmission. If you have received this e-mail in error, please let us know by reply e-mail and delete or destroy this mail and all copies. If you are not the intended recipient of this message you must not disseminate, copy or take any action in reliance on it. The sender takes no responsibility for the effect of this message upon the recipient's computer system.
Re: Stumped with dependency problem
On 24/07/2007, at 5:16 PM, Paul Smith wrote: I've been (slowly) porting our application to Maven 2.0.x. Run up against a very weird dependency problem with a project that refuses to build anymore. See the full mvn -X output, but the snippet that appears to me to be the problem is this: [INFO] [resources:resources] [INFO] Using default encoding to copy filtered resources. Downloading: http://forge.engr.acx:8080/archiva/repository/ internal//xmlbeans/xmlbeans-jsr173-api/2.0-dev/xmlbeans-jsr173- api-2.0-dev.pom Downloading: http://public.planetmirror.com.au/maven2/xmlbeans/ xmlbeans-jsr173-api/2.0-dev/xmlbeans-jsr173-api-2.0-dev.pom Downloading: http://forge.engr.acx:8080/archiva/repository/internal/ xmlbeans/xmlbeans-jsr173-api/2.0-dev/xmlbeans-jsr173-api-2.0-dev.pom [INFO] -- -- [ERROR] BUILD ERROR [INFO] -- -- [INFO] Failed to resolve artifact. No versions are present in the repository for the artifact with a range [1.4,) commons-beanutils:commons-beanutils:jar:null Ok, after playing around and having some guesses as to what the -X output is actually telling me, I tried upgrading the Jasperreports artifact from 1.2.0->1.3.4 (latest), and now it no longer complains. I've now hit a similar problem in a different area, so I think it's a matter of finding the right version of things. I think the error message could do with some extra detail in this case, because one can only see which dependency is being manipulated through though the -X. I think the error message should include the parent dependency that (might) be the root of the problem. cheers, Paul - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Stumped with dependency problem
I'm not sure whether it's the xmlbeans bit that it's worried about but then complaining about commons-beanutils, I've specifically excluded xmlbeans-jsr173 in my pom from the dependency I _think_ it's coming from: I managed to 'find' a version of xmlbeans-jsr173 and deployed that to Archiva with the standard mvn deploy:deploy-file syntax to get rid of that, but it still complains with the commons-beanutils bit. Totally stumped. I've even had enough caffeine today. cheers, Paul - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: I must be doing something dumb, surely
Can you point out where you read that? Michael is correct. Right now, it should be dav:http:// for deployment. Ok, now I'm starting to think I ate some bad cheese and was hallucinating. the dav:http://... works.I had tried "dav://..." and "http://"; but not "dav:http://";. I was probably just tired when reading things. Thanks for your help peoples. cheers, Paul
I must be doing something dumb, surely
I tried the archiva alpha-2 distribution and trunk, but I'm having trouble do a simple 'mvn deploy' to an Archiva snapshot repo that has been freshly setup with just the admin user. I get this output: [INFO] [deploy:deploy] altDeploymentRepository = null [INFO] Retrieving previous build number from aconex.snapshots Uploading: http://forge.engr.acx:9091/archiva/repository/snapshots/ com/aconex/tomcat/SessionPersistence/1.0.1-SNAPSHOT/ SessionPersistence-1.0.1-20070717.080731-1.jar 4K uploaded [INFO] [ERROR] BUILD ERROR [INFO] [INFO] Error deploying artifact: Failed to transfer file: http:// forge.engr.acx:9091/archiva/repository/snapshots/com/aconex/tomcat/ SessionPersistence/1.0.1-SNAPSHOT/ SessionPersistence-1.0.1-20070717.080731-1.jar. Return code is: 405 What I don't get is any logging output is the Archiva console under a 'mvn clean jetty:run'. I have verified with a Windows Webdav client that I can write to the repository using the same username/password combo as defined via settings.xml, and I'm pretty sure that my distributionManagement matches the ones that are intimated (save for the 'dav://' reference, I've searched and found it still should be http://) in the Maven configuration guide. Any ideas? 405 is Method not Allowed. [my pom.xml snippet] aconex Aconex Internal Repository http://forge.engr.acx:9091/archiva/repository/internal aconex.snapshots Aconex Internal Snapshot Repository http://forge.engr.acx:9091/archiva/repository/snapshotsurl> [just to verify that I'm using the correct wagon-webdav bit] .. org.apache.maven.wagon wagon-webdav 1.0-beta-2 [my settings.xml snippet] ... Aconex Repository Proxy true aconex Archiva Managed Internal Repository http://forge.engr.acx:9091/archiva/repository/ internal true false aconex.snapshots Archiva Managed Snapshot Repository http://forge.engr.acx:9091/archiva/repository/ snapshots false true ... aconex admin *cough* aconex.snapshots admin *cough*
Re: Profile activation hierarchy question
and to be clear (sorry), the build still completes ok, but the resulting filtering is using the one derived from settings.xml, and not the explicit profile asked for on the command line.. Paul On 06/06/2007, at 9:56 AM, Paul Smith wrote: mvn 2.0.4 I'm sure this is plainly my misunderstanding or something I'm doing wrong, but I have the following setup (see below). I'm trying to configure it such that by default, the local settings.xml gets used by default, unless you specify the -P setting to use one specified in the pom.xml. I'd like it such that: mvn package builds the native one based on the activeProfile defined in settings.xml, BUT if I do this: mvn-Pfrontend_au_prod package It ignores the active profile in settings.xml, and uses the one specified on the command line: Using mvn help:active-profiles shows that it looks like it might work: mvn help:active-profiles The following profiles are active: - frontend-au (source: settings.xml) -- mvn -Pfrontend_au_prod help:active-profiles .. The following profiles are active: - frontend_au_prod (source: pom) - frontend-au (source: settings.xml) I thought the pom.xml one was supposed to take precedence.. ? I'm extremely new to Maven, so this just may be a misunderstanding. Any help appreciated. [MY SETUP] settings.xml: ... frontend-au au devunix frontend-au in my pom.xml: .. frontend_au_prod au prod frontend_uk_prod uk prod ... Paul Smith Core Engineering Manager Aconex The easy way to save time and money on your project 696 Bourke Street, Melbourne, VIC 3000, Australia Tel: +61 3 9240 0200 Fax: +61 3 9240 0299 Email: [EMAIL PROTECTED] www.aconex.com This email and any attachments are intended solely for the addressee. The contents may be privileged, confidential and/or subject to copyright or other applicable law. No confidentiality or privilege is lost by an erroneous transmission. If you have received this e-mail in error, please let us know by reply e-mail and delete or destroy this mail and all copies. If you are not the intended recipient of this message you must not disseminate, copy or take any action in reliance on it. The sender takes no responsibility for the effect of this message upon the recipient's computer system. Paul Smith Core Engineering Manager Aconex The easy way to save time and money on your project 696 Bourke Street, Melbourne, VIC 3000, Australia Tel: +61 3 9240 0200 Fax: +61 3 9240 0299 Email: [EMAIL PROTECTED] www.aconex.com This email and any attachments are intended solely for the addressee. The contents may be privileged, confidential and/or subject to copyright or other applicable law. No confidentiality or privilege is lost by an erroneous transmission. If you have received this e-mail in error, please let us know by reply e-mail and delete or destroy this mail and all copies. If you are not the intended recipient of this message you must not disseminate, copy or take any action in reliance on it. The sender takes no responsibility for the effect of this message upon the recipient's computer system.
Profile activation hierarchy question
mvn 2.0.4 I'm sure this is plainly my misunderstanding or something I'm doing wrong, but I have the following setup (see below). I'm trying to configure it such that by default, the local settings.xml gets used by default, unless you specify the -P setting to use one specified in the pom.xml. I'd like it such that: mvn package builds the native one based on the activeProfile defined in settings.xml, BUT if I do this: mvn-Pfrontend_au_prod package It ignores the active profile in settings.xml, and uses the one specified on the command line: Using mvn help:active-profiles shows that it looks like it might work: mvn help:active-profiles The following profiles are active: - frontend-au (source: settings.xml) -- mvn -Pfrontend_au_prod help:active-profiles .. The following profiles are active: - frontend_au_prod (source: pom) - frontend-au (source: settings.xml) I thought the pom.xml one was supposed to take precedence.. ? I'm extremely new to Maven, so this just may be a misunderstanding. Any help appreciated. [MY SETUP] settings.xml: ... frontend-au au devunix frontend-au in my pom.xml: .. frontend_au_prod au prod frontend_uk_prod uk prod ... Paul Smith Core Engineering Manager Aconex The easy way to save time and money on your project 696 Bourke Street, Melbourne, VIC 3000, Australia Tel: +61 3 9240 0200 Fax: +61 3 9240 0299 Email: [EMAIL PROTECTED] www.aconex.com This email and any attachments are intended solely for the addressee. The contents may be privileged, confidential and/or subject to copyright or other applicable law. No confidentiality or privilege is lost by an erroneous transmission. If you have received this e-mail in error, please let us know by reply e-mail and delete or destroy this mail and all copies. If you are not the intended recipient of this message you must not disseminate, copy or take any action in reliance on it. The sender takes no responsibility for the effect of this message upon the recipient's computer system.