filePermissions ignored during site-deploy with SCP
Hi, I'm quite new to Maven and facing an issue I could not workaround. I'm using Maven 2.2.0, and using site-deploy to deploy my generated site to a webserver, through scp. Here are the settings server I use : GGS-website mylogin D:\Documents and Settings\mylogin\.ssh\id_rsa 777 777 My distribution management section : GGS-website Site webserver for GGS projects scp://${site.host}/opt/apache2/htdocs/projects/${project.groupId} Deployment works well, except that whatever I put in filePermissions or directoryPermissions, my files get created with permissions 644 on the webserver. I tried to use wagon-ssh in version 1.0-beta-6 as I saw issues close to mine, but it did not correct the issue. In logs following line confirm rights are set that do not match what I want : Executing command: chmod -Rf g+w,a+rX /opt/apache2/htdocs/projects/... This is blocking issue for me, as it prevents anyone else from publishing the same website again, as there is no common group assigned on the webserver (and I can't change that). I really don't know how to investigate ... How can I check what wagon version is used for SCP ? I see nothing else in logs, and although I added extension for 1.0-beta-6, still some dependencies on 1.0-beta-2 are retrieved and I'm quite confused. Thanks for help, Jeremie -- View this message in context: http://www.nabble.com/filePermissions-ignored-during-site-deploy-with-SCP-tp24804640p24804640.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Copy groups of dependencies with dependency plugin
Hi, I think the following configuration should do the trick : maven-dependency-plugin 2.0 unpack-jetty package unpack-dependencies org.mortbay.jetty target/lib/jetty unpack-metro package unpack-dependencies com.sun.xml.ws target/lib/metro unpack-others package unpack-dependencies org.mortbay.jetty,com.sun.xml.ws target/lib I think also groupIds are exact match, I'm not sure you could use "*" inside pattern. It worked for me, but I adapted it to your sample, so you might have to adjust some bits. Hope this helps, Jeremie Shef wrote: > > I'm having a rough time finding the magic syntax to get > maven-dependency-plugin to copy dependencies to the right places. What I > want to do is: > > 1. Copy dependencies with common groupIds to particular subdirectories. > 2. Copy the rest of the compile-scope dependencies to the main /lib > directory. > > Example output: > > /target >/lib > /jetty >(jetty and transitives go here, groupid="org.mortbay.jetty") > /metro >(glassfish and transitives go here, groupid="com.sun.xml.ws") >commons-collections.jar >commons-logging.jar >etc. -- rest of compile-scope dependencies here > > I don't want to have to specify every artifact and its version in the > configuration, because all that's already in the section > of the pom. > > > - > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org > For additional commands, e-mail: users-h...@maven.apache.org > > > -- View this message in context: http://www.nabble.com/Copy-groups-of-dependencies-with-dependency-plugin-tp2476p24805528.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: filePermissions ignored during site-deploy with SCP
Hi and thanks for reply, I'm trying to test this but fail since now. I added repository for apache snapshots in my archiva proxy connectors list, but now it seems nothing works anymore ... My build downloads .pom and metadata for maven-site-plugin 2.1-SNAPSHOT, but it's not able to download the jar in any way. Installing manually the .jar seem to make things progress, but still my build is not able to download any SNAPSHOT dependency of site-plugin from my archiva server. Logs show only a bunch of "Read time out". I really do not understand a thing of what's happening :/ ltheussl wrote: > > > The permission settings in server are not used anymore since maven 2.1 > [1]. The > chmod command is optional and configurable in the current > site-plugin-2.1-SNAPSHOT > [2], you can test it eg like > > > g+w,a+rX > -Rf > > Note however that there are some pitholes [3]. > > HTH, > -Lukas > > > [1] http://jira.codehaus.org/browse/MNG-3600 > [2] http://jira.codehaus.org/browse/MSITE-141 > [3] http://jira.codehaus.org/browse/MSITE-330 > -- View this message in context: http://www.nabble.com/filePermissions-ignored-during-site-deploy-with-SCP-tp24804640p24810428.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Copy groups of dependencies with dependency plugin
Shef wrote: > > Now a new problem: it copies over the dependencies with a particular > groupId, but not the transitive dependencies. I guess what I really want > is jetty plus everything it depends on to go in a directory. Possible > without having to list every transitive dependency explicitly? > It's strange because transitive dependencies seem to be included by default (see http://maven.apache.org/plugins/maven-dependency-plugin/unpack-dependencies-mojo.html here ) You might try to add false, maybe, or else it's another problem... Maybe only transitive dependencies with same groupId are included ? -- View this message in context: http://www.nabble.com/Copy-groups-of-dependencies-with-dependency-plugin-tp2476p24815731.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: filePermissions ignored during site-deploy with SCP
It works now I declared a separate repository in archiva for plugins snapshots. Not sure it was from Archiva, maybe what was missing also is that it was not declared as a "pluginRepository" in maven. BTW now as expected permissions are managed the way I wanted by site plugin :) -- View this message in context: http://www.nabble.com/filePermissions-ignored-during-site-deploy-with-SCP-tp24804640p24823841.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Why is maven looking for snapshot plugins ?
Hi, I want to build and site-deploy a project, using maven-site-plugin 2.1-SNAPSHOT (in order to be able to manage permissions correctly through its configuration). I have a corporate parent pom, in which I declare maven-site-plugin 2.1-SNAPSHOT, as well as my reporting plugins and their dependencies (pmd, taglist, jxr...). If I let maven decide for these versions, site:site will fail with NPE, while with site plugin 2.0-beta-7 it worked well. So I fixed all versions to what was used with maven-site-plugin 2.0-beta-7 and it works. When I install my corporate pom, all dependencies are downloaded in correct versions, and when I site-deploy a child everything is ok. Now if at this stage I delete my local repository and try to site-deploy a child (what users will do), maven will complain about missing taglist-maven-plugin version 2.4-SNAPSHOT, though in corporate pom parent I specified to use 2.3 (in plugins, pluginManagement and reporting sections). I really do not understand why maven bothers with this snapshot version instead of using the one specified ? I believe it should work if I add a plugin section listing maven-site-plugin in the child, but I don't want to have to update the childs in the field (and I don't believe I should). If I re-deploy the corporate parent pom, correct plugins versions are downloaded, and then later used by childs (who do not complain about taglist-maven-plugin anymore). Note : to be able to build against snapshot site plugin, I added the following to my corporate pom (it points to an archiva repository proxy-ing apache snapshots), and tried to set updatePolicies to never to avoid maven looking for snapshot of other plugins (with no success) : never never true plugin-snapshots http://varsovie:8080/archiva/repository/plugins-staged-releases Note2 : in fact chain of inheritance is "corp pom" --> "parent pom" --> "child pom", but "parent pom" does not define anything about plugins. Following is an extract of debug logs for "mvn clean install site-deploy -X -e" on one of the childs : [DEBUG] Connecting to repository: 'GGS repository' with url: 'http://varsovie:8080/archiva/repository/GGS'. [DEBUG] taglist-maven-plugin: resolved to version 2.4-SNAPSHOT from repository central [DEBUG] Skipping disabled repository central [DEBUG] taglist-maven-plugin: using locally installed snapshot [DEBUG] Skipping disabled repository central [DEBUG] Using mirror: http://varsovie:8080/archiva/repository/GGS (id: GGS repository) [INFO] [ERROR] BUILD ERROR [INFO] [INFO] Error building POM (may not be this project's POM). Project ID: org.codehaus.mojo:taglist-maven-plugin Reason: Error getting POM for 'org.codehaus.mojo:taglist-maven-plugin' from the repository: Failed to resolve artifact, possibly due to a repository list that is not appropriately equipped for this artifact's metadata. org.codehaus.mojo:taglist-maven-plugin:pom:2.4-SNAPSHOT -- View this message in context: http://www.nabble.com/Why-is-maven-looking-for-snapshot-plugins---tp24840838p24840838.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Why is maven looking for snapshot plugins ?
I think my request is not very clear, this is what I did more clearly (I hope so) : 1- add a managed repository for staged-releases in archiva, proxy of central snapshots 2- add this repository in my repository group 3- declare my repository group as a pluginRepository in my corporate pom 4- change version of maven-site-plugin from 2.0-beta-7 to 2.1-SNAPSHOT in corporate pom 5- install corporate pom 6- run "site-deploy" on a child of corporate pom --> ok 7- removed proxy connector from my staged-releases repository (to avoid non wanted plugins to be downloaded) 8- re-run step 6 to check --> still ok 9- deleted my local repository 10- re-run step 6 --> fails and complains about taglist-maven-plugin not finding 2.4-SNAPSHOT version, while 2.3 is specified eveywhere -- View this message in context: http://www.nabble.com/Why-is-maven-looking-for-snapshot-plugins---tp24840838p24844830.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
RE: Why is maven looking for snapshot plugins ?
Sorry if I did not precise it exhaustively, but in fact taglist 2.3 is declared in , in , in , in and in sections as well... (in the corporate pom). maven-site-plugin is declared only in section. I also deleted anything about this snapshot version of taglist (metadata and jar) from my archiva managed repositories, with no change. What I don't understand is this log : "[DEBUG] taglist-maven-plugin: resolved to version 2.4-SNAPSHOT from repository central" ...because this version is NOT in central repository... I really miss some understanding on maven plugins way of working I'm afraid :( I understand it's retrieving youngest version, but it should not as I declared a specific version ? mkr wrote: > > You have to specify the version > of the > plugin in the "reporting"/"plugins" *also*, it is not enough to put the > version in the > "pluginManagement" or "build"/"plugins" section. > > The other thing is I believe for plugins Maven is going to retrieve the > youngest version > (regardless of SNAPSHOT or RELEASE). cheers > -- View this message in context: http://www.nabble.com/Why-is-maven-looking-for-snapshot-plugins---tp24840838p24864407.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Why is maven looking for snapshot plugins ?
Logs won't be necessary, I must say I feel quite stupid right now ... :/ Have a closer look at my description : JeremieB wrote: > > [...] > 5- install corporate pom > [...] > 9- deleted my local repository > [...] > So, I happily deleted my local repository, including the correct corporate pom I just installed... You understand easily the strange behaviour. Now it works like a charm - as it always did. Sorry for this... :( And thanks for help anyway ! -- View this message in context: http://www.nabble.com/Why-is-maven-looking-for-snapshot-plugins---tp24840838p24866606.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Issue with assembly plugin executions and phase binding (prepare-package)
In fact, my solution does not work at all ... My package is correctly generated with wanted files generated by antrun inside of it, but I believe as I use goal "assembly" instead of "single", the related tar.gz is not attached and so not deployed. I see the following logs : "[WARNING] Removing: assembly from forked lifecycle, to prevent recursive invocation" So it's not usable, as I want this file to be deployed as it was. Is there any way to achieve the following order of operations in a pom ? : - assembly:directory-single to generate a folder - antrun:run to generate checksums against it - assembly:single to package final tar.gz archive I don't want to achieve this in multiple modules, as it is supposed to keep simple and to become the default for our module archetypes ... But it seems impossible to put something else between two assembly executions. -- View this message in context: http://old.nabble.com/Issue-with-assembly-plugin-executions-and-phase-binding--%28prepare-package%29-tp26607839p26791178.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Issue with assembly plugin executions and phase binding (prepare-package)
SOLVED Ok I understood my mistake ... The error was normal, as it was bound to a phase before package, my assembly wasn't able to found the jar file generated during ... package. So the error, not related to directory-single. So I could simply remove the error by doing the following bindings in this order : - jar:jar bound to prepare-package - antrun:run bound to package - assembly:directory-single bound to prepare-package - assembly:single bound to package So when launching "mvn package", everything is generated at the right time and in the right place :) The result, of course, is a bit convoluted and complex... :/ And I hope that binding "jar" to another phase will not have unexpected side-effects. -- View this message in context: http://old.nabble.com/Issue-with-assembly-plugin-executions-and-phase-binding--%28prepare-package%29-tp26607839p26792351.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Conditionnal adding of section in generated archetype
Hello, I created an archetype to create a new project (a project root pom), and another one to create a module of some kind. I want them separated - I don't want a multi-module archetype. My use-case is when I create a new module from archetype, in a folder already containing my project root pom. If I specify a section in the template pom.xml (in archetype-resources) of the module archetype, when I create it from archetype, this parent section is copied as is in generated module pom.xml (this parent is my corporate master pom). If I do not specify a section in the template pom.xml of the module archetype, then automatically the project root pom is added as parent in generated module pom.xml. I would like to find a solution, to make it "smart", ie: - I specify a (my corporate master pom) in my module archetype source pom.xml - Upon module creation from archetype - if there is a project parent, then it is replaced in module pom.xml - if there is no project parent (so this is an independent module that is created), then the corporate pom parent is kept Objective obviously being that whatever situation I try to enforce usage of my corporate master pom, without forcing everyone to inherit it by default in all project/modules/submodules poms. I succeeded in adding some conditions in my archetype pom with Velocity, but I don't know if I have a possibility to test for a parent pom being in parent folder at archetype creation time ? Thanks, Jeremie -- View this message in context: http://maven.40175.n5.nabble.com/Conditionnal-adding-of-parent-section-in-generated-archetype-tp5779105.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Use "quiet reference" notation for properties
Hello, I wonder if there is any easy way to do the equivalent of Velocity "quiet references" with Maven poms ... ? Here is my use-case (in a corporate pom): - I set a property "label" containing some versions and reference to "${buildNumber}" - This property "${buildNumber}" is optionally set by the buildnumber-maven-plugin, ie the plugin is declared or not in the build depending on projects, ie if they want to use a build number or not The idea is to provide in a corporate pom a default label naming scheme, including a build number but only if it is used and defined by inheriting project. Problem is that if buildnumber-maven-plugin is not declared in a project, the "label" property contains "${buildNumber}" literally, whereas if undefined I would prefer it to be resolved as an empty string. In Velocity I would write something like: ${project.version}-$!{buildNumber} If I set a default value to empty string to the buildNumber property, then the buildnumber-maven-plugin doesn't override this value, so this is not a solution either. I could workaround this by using buildhelper:regex-property to remove the "${buildNumber}" literal expression if it wasn't resolved, but it seems a bit convoluted in a corporate pom, and requires proper ordering of plugins executions so I don't find this very reliable or maintainable. I kept it though, as all other solutions I could think of, imply more manual actions from users, or slow down the build too much... My main objective in the corporate pom being to be the least obtrusive possible. Solutions I thought about: - run the buildnumber-maven-plugin all the time, and set "revisionOnScmFailure" to empty string --> slows down all builds for an optional feature - add this buildnumber-maven-plugin declaration in a profile, and set "buildNumber" property to empty string if this profile is not activated --> complex profiles activation/deactivation requiring CLI switches Do you think there's something better that I didn't think about ? Thanks, Jeremie -- View this message in context: http://maven.40175.n5.nabble.com/Use-quiet-reference-notation-for-properties-tp5806363.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Generation of checksums of files included in assembly
Hi, Thanks but I'm not sure it goes really far from generating checksum of a unique file, and my problem is more how to generate checksums of inner content of tar.gz or zip archive ... And where to locate this in maven life-cycle. I had this idea, but I'm not sure on feasibility, implemented in a maven plugin : 1- associate this new plugin execution to prepare-package 2- in this maven plugin, add @execute goal="assembly:single" (or "assembly:directory" would be fine but deprecated) to generate tar.gz (or zip) during prepare-package 3- add java/groovy in execute() to unpack the archive, compute checksums and generate summary file for inner content 4- copy this file somewhere it will be picked up by the assembly during tar.gz (or zip) generation I'm really not sure of the @execute in a maven plugin mojo ... I'm assuming it's a way to call another goal of another plugin from within my custom plugin execution, but is this really likely to work ? I'm not sure also if "assembly:single" will then be called during "package" phase, as it should ? I imagine I could also call gmaven-plugin and execute some groovy script to do the job ... Any comments welcome ... -- View this message in context: http://maven.40175.n5.nabble.com/Generation-of-checksums-of-files-included-in-assembly-tp4708215p4715512.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Questions about Doxia-converter for apt/xhtml to rtf ...
Hi, Using doxia-converter I have several questions ... 1- apt to rtf generates a readable rtf with word 2007, while xhtml to rtf will show plenty of non-parsed tags when opened with word 2007 ... (I use the .html page generated by maven from the .apt ...) Example : "\pard\sb200\plain\f0\fs20 {\rtf1\ansi\ansicpg1252\deff0 ..." 2- If I don't remove the "DOCTYPE" header of my xhtml page before, doxia-converter tries to validate the content against referenced DTD, leading to IOExceptions / time out because proxy is not configured (and I don't know where to configure it for doxia). Is there a way to either remove xhtml validation from doxia, or not to add DOCTYPE element in apt/xhtml conversion with maven-site ? 3- When I try to call doxia-converter from a maven (groovy) plugin I'm writing, it results in the following at runtime (plugin execution) : "[DEBUG] The following artifacts were filtered out for plugin: com.plugins:maven-xhtml2doc-plugin:1.0-SNAPSHOT because they're already in the core of Maven: org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-30:runtime [...] java.lang.NoClassDefFoundError: org/codehaus/plexus/ContainerConfiguration at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:169) at com.plugins.xhtml2doc.ConvertMojo.class$(ConvertMojo.groovy) at com.plugins.xhtml2doc.ConvertMojo.execute(ConvertMojo.groovy:56) ..." It does not happen while in unit-testing, only when running the plugin through maven ... And I believe it's not really this class that is not found, as it's available in plexus-container-default already, but I don't know wich class is missing ... Thanks for help, Jeremie -- View this message in context: http://maven.40175.n5.nabble.com/Questions-about-Doxia-converter-for-apt-xhtml-to-rtf-tp4729658p4729658.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Questions about Doxia-converter for apt/xhtml to rtf ...
So I managed to workaround points 1) and 2) because I work on toto.apt.vm, and use velocity inside my plugin to generate toto.apt. In this case conversion to rtf is ok (or nearly). I'm still stuck with point 3) when I try to launch my plugin in maven context ... Another thing for velocity engine : in case of execution in maven context, I'd like to do the same kind of conversion that does the site plugin, that is, replace properties with values set in pom.xml, if they exist. How can I retrieve (or start) a velocity engine fed with these properties in the context of my mojo ? -- View this message in context: http://maven.40175.n5.nabble.com/Questions-about-Doxia-converter-for-apt-xhtml-to-rtf-tp4729658p4730685.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Maven SCM 1.6 and new integrity provider
Hello, Using the brand new SCM 1.6, particularly for the new provider (See http://jira.codehaus.org/browse/SCM-630 SCM-630 ) "integrity". I have some remarks/issues : - the documentation of SCM plugin is not up-to-date with this new provider "integrity" (url formats, providers list...) - Jira does not propose a specific component for this provider Then about the plugin itself : - most errors are logged as "Can't login", even if error is not linked to login (for example, referring to a non-existing project in scm urls) - the scm urls for integrity provider seem not to support "@" in passwords. '@' is used as separator ("login/password@host:port"), but if user password contains a '@' character, I couldn't find a way to escape it ('\' does not work) - I couldn't have the plugin work under a Linux (RH4) environment. Command "scm:status" for a project worked well under windows, on linux returned a "java.lang.UnsatisfiedLinkError: Cannot load apiclientrunner" (in CmdRunnerCreatorImpl.createCmdRunner). MKS client is installed though and "si connect" command connects successfully to same server/credentials. I can log JIRAs for the last, if a specific component is added (or can I add them directly to "SCM" component level ?) Apart from that very nice and promising (and long-awaited ...) plugin ! :) Thanks for help, Jeremie -- View this message in context: http://maven.40175.n5.nabble.com/Maven-SCM-1-6-and-new-integrity-provider-tp5048971p5048971.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org