RE: Problem when web app is built via Maven
Hey Curtis, Thanks for your reply. I used Beyond Compare, and found out that there is s difference between the war generated by the normal method and the war generated via maven (The war generated in the first case works.) The war that maven generates has just 2 folders WEB-INF and META-INF and no traces of JSPs whatsoever javascript etc, it only has class files. while the normal build has all the files (JSPs ) and folders. Whats happening ? Warm Regards, Jamshed -- View this message in context: http://maven.40175.n5.nabble.com/Problem-when-web-app-is-built-via-Maven-tp4392340p4405753.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
Antwort: maven assembly plugin - chmod question
Hi, My assembly looks like: assembly idjar-with-dependencies/id formats formatzip/format /formats includeBaseDirectoryfalse/includeBaseDirectory dependencySets dependencySet unpackfalse/unpack scoperuntime/scope outputDirectorylib/outputDirectory useProjectArtifacttrue/useProjectArtifact fileMode755/fileMode /dependencySet /dependencySets files file source${project.build.directory}/${project.build.finalName}.jar/source /file /files /assembly So the fileMode works on the sub-elements. Each item in my LIB director gets a 755 CHMOD. But the actual LIB folder itself stays 777. Is there a way to make the LIB folder also get a 755? What about directoryMode755/directoryMode at the same hierarchy level as fileMode? See http://maven.apache.org/xsd/assembly-1.1.2.xsd Regards Thorsten
Re: overriding properties via -D
Hi, To be sure that properties are correctly overridden, you can use maven-help-plugin with the goal effective-pom, like this : 1) mvn help:effective-pom -Doutput=pom-default.xml 2) mvn help:effective-pom -Dfoo=bar -Doutput=pom-override.xml 3) mvn help:effective-pom -P profil -Dfoo=bar -Doutput=pom-profil-override.xml 4) mvn help:effective-pom -P profil -Doutput=pom-profil.xml Then compare the foo properties in this files. Regards. Maxime Gréau. mgreau.com *Auteur du livre **Apache Maven - Maîtriser l'infrastructure d'un projet Java EE* http://goo.gl/ivCZW 2011/5/17 EJ Ciramella ecirame...@casenetinc.com For what it's worth, I've stumbled across a series of bugs surrounding this issue. This one either duplicates or is duplicated: http://jira.codehaus.org/browse/MNG-1992 -Original Message- From: EJ Ciramella [mailto:ecirame...@casenetinc.com] Sent: Tuesday, May 17, 2011 11:08 AM To: users@maven.apache.org Subject: overriding properties via -D Hi all - I've googled around and searched the mailing lists as I think this is a pretty simple thing to do, but didn't find a clear answer. If there is a profile that has a properties stanza in it and in turn is setting a property, are you not allowed to override that setting via a -Dfoo=bar commandline option? There are a couple of places where instead of defining a whole new profiles with just the value I'd like to change is inefficient. CONFIDENTIALITY NOTICE: This e-mail and the information transmitted within including any attachments is only for the recipient(s) to which it is intended and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of; or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please send the e-mail back by replying to the sender and permanently delete the entire message and its attachments from all computers and network systems involved in its receipt. CONFIDENTIALITY NOTICE: This e-mail and the information transmitted within including any attachments is only for the recipient(s) to which it is intended and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of; or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please send the e-mail back by replying to the sender and permanently delete the entire message and its attachments from all computers and network systems involved in its receipt. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Problem when web app is built via Maven
Make sure your web components (like jsps, js, css, images, etc) are under src/main/webapp folder. If you're not using the standard folder, you may try to configure maven war plugin to inform the folder you are using. Check [1] to understande how to configure it (it's the warSourceDirectory tag). [1] http://maven.apache.org/plugins/maven-war-plugin/war-mojo.html On Wed, May 18, 2011 at 3:41 AM, Jamshed Katta jamshed.ka...@wwindia.comwrote: Hey Curtis, Thanks for your reply. I used Beyond Compare, and found out that there is s difference between the war generated by the normal method and the war generated via maven (The war generated in the first case works.) The war that maven generates has just 2 folders WEB-INF and META-INF and no traces of JSPs whatsoever javascript etc, it only has class files. while the normal build has all the files (JSPs ) and folders. Whats happening ? Warm Regards, Jamshed -- View this message in context: http://maven.40175.n5.nabble.com/Problem-when-web-app-is-built-via-Maven-tp4392340p4405753.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: [REPOST] Can I avoid a dependency cycle with one edge being a test dependency?
On Tue, May 17, 2011 at 7:44 PM, Benson Margulies bimargul...@gmail.comwrote: At very least, a polite request to look at the SO question, Oh I'm so sorry you didn't like my post. I could have certainly copy-pasted the question details in here, it's just that I'm so adverse to code duplication and so preferred to use the pointer. Would pointer + polite request be okay? Of course, I'm not trying to divert traffic to SO and expect an answer on the mailing list (and would add a pointer to it in SO). It's just that those active there too could prefer to answer there, and I just multiply my chances of getting my answer. perhaps accompanied by leaving off the incomprehensible anti-spam math? On Tue, May 17, 2011 at 1:29 PM, Wayne Fay wayne...@gmail.com wrote: http://stackoverflow.com/questions/6034513/can-i-avoid-a- dependency-cycle-with-one-edge-being-a-test-dependency This list does not generally respond well to questions posed in this manner. This is probably why you haven't gotten any replies. Wayne - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org -- Regards, K. Gabriele
Re: Help with multiple executions
On Tue, May 17, 2011 at 6:13 PM, Stephen Connolly stephen.alan.conno...@gmail.com wrote: I'd use war overlays... executions will not do what you think it will do From what I just read, it looks like war overlays are made to merge two WAR, or ZIP, files. In this case, would it make sense to use a ZIP file with a directory structure like |-- WEB-INF |- lib '--- activation-1.1.1.jar '--- mail-1.4.1.jar -- Greg Akins http://twitter.com/akinsgre - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Help with multiple executions
multi-module project module a is the war for WL (the one without the extra files) module b is the war with the extra files needed for tomcat and it depends on module a you test in TC with module b and deploy module a to WL. if I have things the wrong way around then you test with module a and deploy module b to WL On 18 May 2011 12:05, Greg Akins angryg...@gmail.com wrote: On Tue, May 17, 2011 at 6:13 PM, Stephen Connolly stephen.alan.conno...@gmail.com wrote: I'd use war overlays... executions will not do what you think it will do From what I just read, it looks like war overlays are made to merge two WAR, or ZIP, files. In this case, would it make sense to use a ZIP file with a directory structure like |-- WEB-INF |- lib '--- activation-1.1.1.jar '--- mail-1.4.1.jar -- Greg Akins http://twitter.com/akinsgre
Re: Help with multiple executions
On Wed, May 18, 2011 at 7:41 AM, Stephen Connolly stephen.alan.conno...@gmail.com wrote: multi-module project module a is the war for WL (the one without the extra files) module b is the war with the extra files needed for tomcat and it depends on module a you test in TC with module b and deploy module a to WL. That's exactly what I need. Thanks! -- Greg Akins http://twitter.com/akinsgre - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Assembly Advice
I have a maven project with several modules. In order to create some uber jars I use the assembly plug-in during the package phase. However, the modules with uber jars depend on other modules, which I have set up dependencies for. The problem I am having is that those modules that are depended on are not archived until the install phase, so when the assembly plug-in is run, it will pick up state artifacts from the other modules. Is there some way for me to configure things so that before the assembly plug-in is run, it forces all dependent modules to be run with the install target first? Or is it more common practice to do assembly in the install phase? How can I guarantee that modules I depend on are installed first? Cheers, Eric - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Assembly Advice
Hi, you have to define dependencies in your assembly module to the other modules ...than maven will handle the correct order I assume you have a structure like this. +-- pom.xml ! +--- mod1 +--- mod2 +--- mod3 +--- mod-ass +--- pom.xml (dependencies to mod1, mod2 and mod3) Kind regards Karl Heinz Marbaise - Kind regards Karl Heinz Marbaise http://www.soebes.de http://www.skmwiki.de http://supose.org/wiki/supose -- View this message in context: http://maven.40175.n5.nabble.com/Assembly-Advice-tp4406394p4406656.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
How do I add filtered properties to my pom.xml?
I use the following setup to have maven inject filtered property values into my application configuration files, such as the Spring applicationContext.xml: File System: src/main/filters/filter-test.properties src/main/filters/filter-live.properties src/main/resources/applicationContext.xml and in my pom.xml I do this: // use profiles to setup env property value as either test or live ... build filters filter${basedir}/src/main/filters/filter-${env}.properties/filter /filters resources resource directorysrc/main/resources/directory filteringtrue/filtering /resource /build Now this works fine, but I would like to have my filter property files also have properties entered into my pom.xml itself. For example, later in my pom.xml I use a weblogic deployment plugin which deploys my war to the server. This of course requires properties which are environment specific. I wish I could have these properties in my separate filter-env.properties files as well, because right now the only thing I seem to get working is if I set these properties within my profiles setup. I dont want it in the pom.xml though, I want maven to load them from my environment specific property file. Is there any way I can do this? So that when I configure my weblogic plugin with for example: adminServerHostName${weblogic.host.name}/adminServerHostName And I ran the pom.xml with my test profile activated, then maven should pull the value of that property from my filter-test.properties file: weblogic.host.name=testserver or whatever. -- View this message in context: http://maven.40175.n5.nabble.com/How-do-I-add-filtered-properties-to-my-pom-xml-tp4406945p4406945.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: Assembly Advice
My current structure is +-- pom.xml ! +--- mod1 +--- mod2 needs an assembly and depends on mod1 mod3 +--- mod3 +--- mod4 needs an assembly and depends on mod1 mod3 Are you saying I need to define something like +-- pom.xml ! +--- mod1 +--- mod2 +--- mod3 +--- mod4 +--- mod-ass2 +--- pom.xml (dependencies to mod1, mod2 and mod3) +--- mod-ass4 +--- pom.xml (dependencies to mod1, mod3 and mod4) How will that ensure that mod1, mod2, mod3, mod4 will pass through the install phase, before mod-ass2 and mod-ass4 pass through the package phase.? Cheers, Eric On 2011-05-18 7:42 AM, Karl Heinz Marbaise wrote: Hi, you have to define dependencies in your assembly module to the other modules ...than maven will handle the correct order I assume you have a structure like this. +-- pom.xml ! +--- mod1 +--- mod2 +--- mod3 +--- mod-ass +--- pom.xml (dependencies to mod1, mod2 and mod3) Kind regards Karl Heinz Marbaise - Kind regards Karl Heinz Marbaise http://www.soebes.de http://www.skmwiki.de http://supose.org/wiki/supose -- View this message in context: http://maven.40175.n5.nabble.com/Assembly-Advice-tp4406394p4406656.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 - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: why I love the maven-dependency plugin
On Tue, May 17, 2011 at 3:50 PM, Russ Tremain ru...@releasetools.org wrote: I use the maven-dependency plugin for jar and war packaging. It is flexible and non-judgmental. This is particularly important when you are converting a large project over to maven and cannot follow some maven conventions - you may be constrained to recreate identical or near-identical artifacts using maven. Here is a pattern that works for wars: 1) create a war-resource jar that has all libs and resources pre-configured for dumping to WEB-INF. You can use the dependency plugin to create the exact names you need to match the project you are converting. For example, you may need to change the name of an artifact. Or you may need to eliminate version numbers in the names of the artifacts. The maven-dependency plugin can do it all. You can use multiple executions to sweep in artifacts - perhaps one with version names, one without, and then explicit renaming of any remaining artifacts. Use antrun to do any additional processing - e.g. to copy or rename a resource. (The standard maven resources plugin will not do this for you). 2) In the war project, which automatically uses the maven-war plugin, just unpack your resource jar using the maven-dependency plugin unpack goal. Do not declare any dependencies in the war pom, as they will get automatically copied without possibility for intervention. The unpack specification can be declared in a parent pom, which makes your war packaging project very small. For example, in the parent pom: build plugins plugin artifactIdmaven-dependency-plugin/artifactId executions execution id${project.artifactId}-unpack-war-resources/id phaseprocess-resources/phase goalsgoalunpack/goal/goals configuration artifactItems artifactItem groupIdcom.foo/groupId artifactId${project.artifactId}-resources/artifactId version${someVersion}/version outputDirectory${project.build.directory}/${project.build.finalName}/outputDirectory /artifactItem /artifactItems /configuration /execution ... The only trick is to use a standard name for the associated resource jar (${project.artifactId}-resources in this example). The war pom is now trivial, for example: project parent artifactIdbuild-common-webapps/artifactId groupIdcom.foo/groupId version1.0/version relativePath../../../build-common/webapps/relativePath /parent modelVersion4.0.0/modelVersion groupIdcom.foo/groupId artifactIdmywebapp/artifactId packagingwar/packaging version${someVersion}/version /project 3) create separate projects for compiling the war code, jsps, or any other work. These projects are then added to the resource package (as jars, or unpacked as classes, or whatever you need). 4) wire the projects together using a multi-project pom, creating sub-directories for the auxiliary packaging and build poms. Some advocate the use of the assembly plugin for doing this sort of work, but I prefer the simplicity of the dependency plugin approach, reserving the assembly plugin for producing final distribution bundles. Heh, that's the original use case I had when I started the plugin. Mostly I didn't want to have to have key configuration of some manipulations external to my pom in an assembly.xml. Glad you like the plugin ;-) -Russ - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: How do I add filtered properties to my pom.xml?
I believe it would work if you changed a little bit the way you configure the filters... you could have a profile for each filter you want to use (instead of using the ${env} property to determine the filter you will use).. so it would be something like: profile idenv.test/id activation property nameenv/name valuetest/value /property /activation build fillters filter${basedir}/src/main/filters/filter-test.properties/filter /filters /build /profile profile idenv.live/id activation property nameenv/name valuelive/value /property /activation build fillters filter${basedir}/src/main/filters/filter-live.properties/filter /filters /build /profile This way, when ${env} is evaluated to test, the env.test profile will be activated and properties defined in ${basedir}/src/main/filters/filter-test.properties will be available. While when ${env} is evaluated to live, the env.live profile will be activated and properties defined in ${basedir}/src/main/filters/filter-live.properties will be available. On Wed, May 18, 2011 at 1:14 PM, trant mmo...@webatrocity.com wrote: I use the following setup to have maven inject filtered property values into my application configuration files, such as the Spring applicationContext.xml: File System: src/main/filters/filter-test.properties src/main/filters/filter-live.properties src/main/resources/applicationContext.xml and in my pom.xml I do this: // use profiles to setup env property value as either test or live ... build filters filter${basedir}/src/main/filters/filter-${env}.properties/filter /filters resources resource directorysrc/main/resources/directory filteringtrue/filtering /resource /build Now this works fine, but I would like to have my filter property files also have properties entered into my pom.xml itself. For example, later in my pom.xml I use a weblogic deployment plugin which deploys my war to the server. This of course requires properties which are environment specific. I wish I could have these properties in my separate filter-env.properties files as well, because right now the only thing I seem to get working is if I set these properties within my profiles setup. I dont want it in the pom.xml though, I want maven to load them from my environment specific property file. Is there any way I can do this? So that when I configure my weblogic plugin with for example: adminServerHostName${weblogic.host.name}/adminServerHostName And I ran the pom.xml with my test profile activated, then maven should pull the value of that property from my filter-test.properties file: weblogic.host.name=testserver or whatever. -- View this message in context: http://maven.40175.n5.nabble.com/How-do-I-add-filtered-properties-to-my-pom-xml-tp4406945p4406945.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
How to run tests in jetty
Hi - I am wondering if there is any way to tell maven 3 to launch jetty and then execute some unit testers, and finally tear down jetty? What is the best way to do this? Thanks Victor
RE: How to run tests in jetty
Google around, there are some recent articles about this using stuff like Failsafe and hooking into the Verify phase of the build lifecycle Curt Yanko | Continuous Integration Services | UnitedHealth Group IT Making IT Happen, one build at a time, 600 times a day -Original Message- From: Victor Grazi [mailto:vgr...@gmail.com] Sent: Wednesday, May 18, 2011 1:20 PM To: Maven Users List Subject: How to run tests in jetty Hi - I am wondering if there is any way to tell maven 3 to launch jetty and then execute some unit testers, and finally tear down jetty? What is the best way to do this? Thanks Victor This e-mail, including attachments, may include confidential and/or proprietary information, and may be used only by the person or entity to which it is addressed. If the reader of this e-mail is not the intended recipient or his or her authorized agent, the reader is hereby notified that any dissemination, distribution or copying of this e-mail is prohibited. If you have received this e-mail in error, please notify the sender by replying to this message and delete this e-mail immediately. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
RE: How do I add filtered properties to my pom.xml?
http://haroon.sis.utoronto.ca/zarar/properties-maven-plugin/index.html Martin __ Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen. Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni. Date: Wed, 18 May 2011 09:14:19 -0700 From: mmo...@webatrocity.com To: users@maven.apache.org Subject: How do I add filtered properties to my pom.xml? I use the following setup to have maven inject filtered property values into my application configuration files, such as the Spring applicationContext.xml: File System: src/main/filters/filter-test.properties src/main/filters/filter-live.properties src/main/resources/applicationContext.xml and in my pom.xml I do this: // use profiles to setup env property value as either test or live ... build filters filter${basedir}/src/main/filters/filter-${env}.properties/filter /filters resources resource directorysrc/main/resources/directory filteringtrue/filtering /resource /build Now this works fine, but I would like to have my filter property files also have properties entered into my pom.xml itself. For example, later in my pom.xml I use a weblogic deployment plugin which deploys my war to the server. This of course requires properties which are environment specific. I wish I could have these properties in my separate filter-env.properties files as well, because right now the only thing I seem to get working is if I set these properties within my profiles setup. I dont want it in the pom.xml though, I want maven to load them from my environment specific property file. Is there any way I can do this? So that when I configure my weblogic plugin with for example: adminServerHostName${weblogic.host.name}/adminServerHostName And I ran the pom.xml with my test profile activated, then maven should pull the value of that property from my filter-test.properties file: weblogic.host.name=testserver or whatever. -- View this message in context: http://maven.40175.n5.nabble.com/How-do-I-add-filtered-properties-to-my-pom-xml-tp4406945p4406945.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: How to run tests in jetty
I'm not using Maven3, but am not sure that would change much. I use Cargo to start the server and run functional tests. The tests run in Tomcat, but could run in any container that Cargo supports. On Wed, May 18, 2011 at 1:42 PM, Yanko, Curtis curt_ya...@uhc.com wrote: Google around, there are some recent articles about this using stuff like Failsafe and hooking into the Verify phase of the build lifecycle Curt Yanko | Continuous Integration Services | UnitedHealth Group IT Making IT Happen, one build at a time, 600 times a day -Original Message- From: Victor Grazi [mailto:vgr...@gmail.com] Sent: Wednesday, May 18, 2011 1:20 PM To: Maven Users List Subject: How to run tests in jetty Hi - I am wondering if there is any way to tell maven 3 to launch jetty and then execute some unit testers, and finally tear down jetty? What is the best way to do this? Thanks Victor This e-mail, including attachments, may include confidential and/or proprietary information, and may be used only by the person or entity to which it is addressed. If the reader of this e-mail is not the intended recipient or his or her authorized agent, the reader is hereby notified that any dissemination, distribution or copying of this e-mail is prohibited. If you have received this e-mail in error, please notify the sender by replying to this message and delete this e-mail immediately. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org -- Greg Akins http://twitter.com/akinsgre - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
RE: How do I add filtered properties to my pom.xml?
Martin, Thank you for that link. It works! -- View this message in context: http://maven.40175.n5.nabble.com/How-do-I-add-filtered-properties-to-my-pom-xml-tp4406945p4407382.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: exclusions from a typetest-jar/type dependency in maven 3
I the exact same project shows a difference between Maven 2.2.1 and Maven 3.0.3, you should create a jira ticket about a regression. /Anders On Wed, May 18, 2011 at 03:01, Garrett Wu wugarr...@gmail.com wrote: When upgrading to maven 3.0.3, I noticed that exclusions are not really excluded from dependencies with typetest-jar/type. Is this intended behavior? If so, I how should I achieve the same effect as maven2? I have a project maven-test-jar that has a compile scope dependency on org.apache.hadoop:avro:1.3.1. groupIdcom.foocorp.maven/groupId artifactIdmaven-test-jar/artifactId !-- ... -- dependencies dependency groupIdorg.apache.hadoop/groupId artifactIdavro/artifactId version1.3.1/version scopecompile/scope /dependency /dependencies I have another project that depends on maven-test-jar's tests, and I would like to use org.apache.avro:avro:1.4.1 instead of org.apache.hadoop:avro:1.3.1. !-- ... -- dependencies dependency groupIdcom.foocorp.maven/groupId artifactIdmaven-test-jar/artifactId version1.0-SNAPSHOT/version scopetest/scope typetest-jar/type exclusions exclusion groupIdorg.apache.hadoop/groupId artifactIdavro/artifactId /exclusion /exclusions /dependency dependency groupIdorg.apache.avro/groupId artifactIdavro/artifactId version1.4.1/version scopecompile/scope /dependency /dependencies However, a dependency:list shows that it still uses org.apache.hadoop:avro:1.3.1 for the test scope: $ mvn dependency:list ... [INFO]org.apache.avro:avro:jar:1.4.1:compile [INFO]org.apache.hadoop:avro:jar:1.3.1:test ... In maven 2, org.apache.hadoop:avro:jar:1.3.1:test is omitted as I would expect. Thanks, Garrett
Multiple webapps - running individually
Hello all, I've got a project I'm working on right now where we have a main maven project that contains 3 modules. The core module contains all of the business services, DAOs, etc., and two webapp modules being built on top of core (basically skinning, some different functionality). Each of the webapps are dependent on core. The problem is I cannot figure out how to deploy the projects individually. If I run package, it will package both of the webapp projects into wars in their target directory; however if I try to use the tomcat plugin, it will only deploy one, no matter what is in each individual pom (I think the tomcat plugin blocks maven's execution while tomcat runs). Does anyone have a solution to run one webapp or the other selectively in tomcat locally? Thanks, Luke -- View this message in context: http://maven.40175.n5.nabble.com/Multiple-webapps-running-individually-tp4407661p4407661.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: How to run tests in jetty
On 18 May 2011 18:19, Victor Grazi wrote: Hi - I am wondering if there is any way to tell maven 3 to launch jetty and then execute some unit testers, and finally tear down jetty? What is the best way to do this? http://docs.codehaus.org/display/JETTY/Maven+Jetty+Plugin Automatic execution of the plugin cheers Tim -- Tim Pizey - http://pizey.net/~timp Centre for Genomics and Global Health - http://cggh.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Bootstraping a repository manager
Hi Folks, The list archives return hundreds or thousands of not very relevant results when I search them, so this may have been answered, but I can't find it. In any case, I'm also somewhat new to maven so I'm possibly asking silly questions for that reason too. In either case I apologize in advance... I've got a project, that is derived from another project that was set up with maven (else, I'd probably still be using ant). In our company, our policies make it very important that I know exactly what is going into the project, so I can't just let maven go slurping things up from anywhere it feels like on the web. To this end, I'm testing out the free version of artifactory, which looks like a nice solution to that problem. I've managed to get my maven pointed at artifactory, and wiped out my local repository. I also deleted artifactory's references to the outside world. Now my builds complain that I can't find stuff, and the messages are clearly looking at my artifactory. Perfect so far. However, as pleased as I am to have broken my build, now I need to get it going again :-). My first challenge seems to be getting the basic maven plugins into the repository. I can't seem to find a place to download something that I can upload directly to artifactory, so I tried to start with the first plugin that was failing, and build that and see if mvn deploy would deploy it to artifactory. (First, question... is that a reasonable idea?) Unfortunately, as soon as I did svn checkout http://svn.apache.org/repos/asf/maven/plugins/tags/maven-clean-plugin-2. 4.1 maven-clean-plugin cd maven-clean-plugin mvn deploy I got [INFO] Scanning for projects... Downloading: http://heckp2.corp.aspentech.com:8080/artifactory/libs-release/org/apach e/maven/plugins/maven-plugins/18/maven-plugins-18.pom Downloading: http://heckp2.corp.aspentech.com:8080/artifactory/libs-snapshot/org/apac he/maven/plugins/maven-plugins/18/maven-plugins-18.pom [ERROR] The build could not read 1 project - [Help 1] [ERROR] [ERROR] The project org.apache.maven.plugins:maven-clean-plugin:2.4.1 (C:\cygwin\home\gus\maven\plugins\maven-clean-plugin\pom.xml) has 1 error [ERROR] Non-resolvable parent POM: Could not find artifact org.apache.maven.plugins:maven-plugins:pom:18 in central (http://heckp2.corp.aspentech.com:8080/artifactory/libs-release) and 'parent.relativePath' points at wrong local POM @ line 25, column 11 - [Help 2] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingExceptio n [ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelExcept ion bash-4.1$ So I went and looked at the subversion repository and I found maven-plugins-18, but when I tried to build that I got.. [INFO] Scanning for projects... Downloading: http://heckp2.corp.aspentech.com:8080/artifactory/libs-release/org/apach e/maven/maven-parent/16/maven-parent-16.pom Downloading: http://heckp2.corp.aspentech.com:8080/artifactory/libs-snapshot/org/apac he/maven/maven-parent/16/maven-parent-16.pom [ERROR] The build could not read 1 project - [Help 1] [ERROR] [ERROR] The project org.apache.maven.plugins:maven-plugins:18 (C:\cygwin\home\gus\maven\plugins\maven-plugins\pom.xml) has 1 error [ERROR] Non-resolvable parent POM: Could not find artifact org.apache.maven:maven-parent:pom:16 in central (http://heckp2.corp.aspentech.com:8080/artifactory/libs-release) and 'parent.relativePath' points at wrong local POM @ line 23, column 11 - [Help 2] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingExceptio n [ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelExcept ion When I look in subversion, I don't see a maven-parent... So, now I don't see any clear path to walk up to wherever the root of this is... What is the best way to get fresh clean maven plugins for installation into a repository manager without allowing it to just go download whatever it wants from the web? -Gus This e-mail and any attachments are intended only for use by the addressee(s) named herein and may contain legally privileged and/or confidential information. If you are not the intended recipient of this e-mail, you are hereby notified any dissemination, distribution or copying of this email, and any attachments thereto, is strictly prohibited. If you receive this email in error please immediately notify the sender and permanently
Re: Bootstraping a repository manager
You don't need to bootsrap it, just setup a repo like Nexus and let it proxy on demand the things you need. In that case a bootstrap might simply mean run all our builds and/or run mvn dependency:go-offline to resolve everything you need. On Wed, May 18, 2011 at 5:21 PM, Heck, Gus (Patrick) gus.h...@aspentech.com wrote: Hi Folks, The list archives return hundreds or thousands of not very relevant results when I search them, so this may have been answered, but I can't find it. In any case, I'm also somewhat new to maven so I'm possibly asking silly questions for that reason too. In either case I apologize in advance... I've got a project, that is derived from another project that was set up with maven (else, I'd probably still be using ant). In our company, our policies make it very important that I know exactly what is going into the project, so I can't just let maven go slurping things up from anywhere it feels like on the web. To this end, I'm testing out the free version of artifactory, which looks like a nice solution to that problem. I've managed to get my maven pointed at artifactory, and wiped out my local repository. I also deleted artifactory's references to the outside world. Now my builds complain that I can't find stuff, and the messages are clearly looking at my artifactory. Perfect so far. However, as pleased as I am to have broken my build, now I need to get it going again :-). My first challenge seems to be getting the basic maven plugins into the repository. I can't seem to find a place to download something that I can upload directly to artifactory, so I tried to start with the first plugin that was failing, and build that and see if mvn deploy would deploy it to artifactory. (First, question... is that a reasonable idea?) Unfortunately, as soon as I did svn checkout http://svn.apache.org/repos/asf/maven/plugins/tags/maven-clean-plugin-2. 4.1 maven-clean-plugin cd maven-clean-plugin mvn deploy I got [INFO] Scanning for projects... Downloading: http://heckp2.corp.aspentech.com:8080/artifactory/libs-release/org/apach e/maven/plugins/maven-plugins/18/maven-plugins-18.pom Downloading: http://heckp2.corp.aspentech.com:8080/artifactory/libs-snapshot/org/apac he/maven/plugins/maven-plugins/18/maven-plugins-18.pom [ERROR] The build could not read 1 project - [Help 1] [ERROR] [ERROR] The project org.apache.maven.plugins:maven-clean-plugin:2.4.1 (C:\cygwin\home\gus\maven\plugins\maven-clean-plugin\pom.xml) has 1 error [ERROR] Non-resolvable parent POM: Could not find artifact org.apache.maven.plugins:maven-plugins:pom:18 in central (http://heckp2.corp.aspentech.com:8080/artifactory/libs-release) and 'parent.relativePath' points at wrong local POM @ line 25, column 11 - [Help 2] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingExceptio n [ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelExcept ion bash-4.1$ So I went and looked at the subversion repository and I found maven-plugins-18, but when I tried to build that I got.. [INFO] Scanning for projects... Downloading: http://heckp2.corp.aspentech.com:8080/artifactory/libs-release/org/apach e/maven/maven-parent/16/maven-parent-16.pom Downloading: http://heckp2.corp.aspentech.com:8080/artifactory/libs-snapshot/org/apac he/maven/maven-parent/16/maven-parent-16.pom [ERROR] The build could not read 1 project - [Help 1] [ERROR] [ERROR] The project org.apache.maven.plugins:maven-plugins:18 (C:\cygwin\home\gus\maven\plugins\maven-plugins\pom.xml) has 1 error [ERROR] Non-resolvable parent POM: Could not find artifact org.apache.maven:maven-parent:pom:16 in central (http://heckp2.corp.aspentech.com:8080/artifactory/libs-release) and 'parent.relativePath' points at wrong local POM @ line 23, column 11 - [Help 2] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingExceptio n [ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelExcept ion When I look in subversion, I don't see a maven-parent... So, now I don't see any clear path to walk up to wherever the root of this is... What is the best way to get fresh clean maven plugins for installation into a repository manager without allowing it to just go download whatever it wants from the web? -Gus This e-mail and any
Re: central repo?
I just wanted to close the loop on this, http://search.maven.org is now updated incrementally in lockstep with the contents of Central. On Fri, May 6, 2011 at 9:53 AM, Brian Fox bri...@infinity.nu wrote: On Fri, May 6, 2011 at 3:54 AM, Nord, James jn...@nds.com wrote: Hi Brian, we incorporate the feedback we received and ensure the index used to render the browse is completely in lockstep with the contents. Interesting... Are all the mirrors updated atomically with repo1 (I didn't think they where) so the engineering effort in this must be huge :-) I won't go and say it's completely atomic but here's what happens: All of the inbound syncs run on a staging machine. Some repos are pulled hourly (forges), others daily. Once this process is complete, the updated contents are indexed and then the staging location is pushed out simultaneously to the UK, the live Central machine, and a US production failover folder on the staging machine. We will push the indexes at the same time to the search server so the window between contents arriving on Central and appearing on Search is minimal. Just don't want it forgotten that just as it is in repo1.m.o it may not be in uk.m.o (and if it is in the process of being synced could be only be partially there?) Thanks for the quick workaround. /James -Original Message- From: Brian Fox [mailto:bri...@infinity.nu] Sent: 05 May 2011 17:53 To: Maven Users List Subject: Re: central repo? Than you, i'll let the team know. http://repo2.maven.org/maven2/org/ Also, we've adjusted how the redirects work and included a static page so people don't feel like the repo was hijacked: Deeper links to artifact folders will show the older index view for now until we incorporate the feedback we received and ensure the index used to render the browse is completely in lockstep with the contents. On Thu, May 5, 2011 at 12:17 PM, Jim McCaskey jim.mccas...@pervasive.com wrote: So, I'm not sure anyone here will care about this. But Maven Central does not work with IE9. You get an error like this: When a website causes a failure or crash, Internet Explorer attempts to restore the site. It stops after two tries to avoid an endless loop. And the URL switches to this: res://ieframe.dll/acr_error.htm#maven.org,http://search.maven.org/#bro wse I had a friend try his system with IE8 and it worked fine. Needless to say Chrome and FF work just fine. -Jim -Original Message- From: Brian Fox [mailto:bri...@infinity.nu] Sent: Thursday, May 05, 2011 8:50 AM To: Maven Users List Subject: Re: central repo? On Thu, May 5, 2011 at 7:09 AM, Anders Hammar and...@hammar.net wrote: Regarding the m2e indexes, at what time are they updated? 3:22 CST daily. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org ** This message is confidential and intended only for the addressee. If you have received this message in error, please immediately notify the postmas...@nds.com and delete it from your system as well as any copies. The content of e-mails as well as traffic data may be monitored by NDS for employment and security purposes. To protect the environment please do not print this e-mail unless necessary. NDS Limited. Registered Office: One London Road, Staines, Middlesex, TW18 4EX, United Kingdom. A company registered in England and Wales. Registered no. 3080780. VAT no. GB 603 8808 40-00 ** - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
RE: Bootstraping a repository manager
Hi Brian, I think you missed the entire point of the exercise. The point is to NOT allow it to pull from outside sources, as a proxy or not. The intent is to load it up manually and never ever let it fetch serve any dependency or plugin I haven't personally uploaded, and intentionally provided for use. This relates to a coming set of network access restrictions as well as overseas developers not accidentally downloading export controlled, or locally illegal software. Also, you will note that I am currently working with artifactory. -Gus -Original Message- From: Brian Fox [mailto:bri...@infinity.nu] Sent: Wednesday, May 18, 2011 5:26 PM To: Maven Users List Subject: Re: Bootstraping a repository manager You don't need to bootsrap it, just setup a repo like Nexus and let it proxy on demand the things you need. In that case a bootstrap might simply mean run all our builds and/or run mvn dependency:go-offline to resolve everything you need. On Wed, May 18, 2011 at 5:21 PM, Heck, Gus (Patrick) gus.h...@aspentech.com wrote: Hi Folks, The list archives return hundreds or thousands of not very relevant results when I search them, so this may have been answered, but I can't find it. In any case, I'm also somewhat new to maven so I'm possibly asking silly questions for that reason too. In either case I apologize in advance... I've got a project, that is derived from another project that was set up with maven (else, I'd probably still be using ant). In our company, our policies make it very important that I know exactly what is going into the project, so I can't just let maven go slurping things up from anywhere it feels like on the web. To this end, I'm testing out the free version of artifactory, which looks like a nice solution to that problem. I've managed to get my maven pointed at artifactory, and wiped out my local repository. I also deleted artifactory's references to the outside world. Now my builds complain that I can't find stuff, and the messages are clearly looking at my artifactory. Perfect so far. However, as pleased as I am to have broken my build, now I need to get it going again :-). My first challenge seems to be getting the basic maven plugins into the repository. I can't seem to find a place to download something that I can upload directly to artifactory, so I tried to start with the first plugin that was failing, and build that and see if mvn deploy would deploy it to artifactory. (First, question... is that a reasonable idea?) Unfortunately, as soon as I did svn checkout http://svn.apache.org/repos/asf/maven/plugins/tags/maven-clean-plugin-2. 4.1 maven-clean-plugin cd maven-clean-plugin mvn deploy I got [INFO] Scanning for projects... Downloading: http://heckp2.corp.aspentech.com:8080/artifactory/libs-release/org/apach e/maven/plugins/maven-plugins/18/maven-plugins-18.pom Downloading: http://heckp2.corp.aspentech.com:8080/artifactory/libs-snapshot/org/apac he/maven/plugins/maven-plugins/18/maven-plugins-18.pom [ERROR] The build could not read 1 project - [Help 1] [ERROR] [ERROR] The project org.apache.maven.plugins:maven-clean-plugin:2.4.1 (C:\cygwin\home\gus\maven\plugins\maven-clean-plugin\pom.xml) has 1 error [ERROR] Non-resolvable parent POM: Could not find artifact org.apache.maven.plugins:maven-plugins:pom:18 in central (http://heckp2.corp.aspentech.com:8080/artifactory/libs-release) and 'parent.relativePath' points at wrong local POM @ line 25, column 11 - [Help 2] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingExceptio n [ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelExcept ion bash-4.1$ So I went and looked at the subversion repository and I found maven-plugins-18, but when I tried to build that I got.. [INFO] Scanning for projects... Downloading: http://heckp2.corp.aspentech.com:8080/artifactory/libs-release/org/apach e/maven/maven-parent/16/maven-parent-16.pom Downloading: http://heckp2.corp.aspentech.com:8080/artifactory/libs-snapshot/org/apac he/maven/maven-parent/16/maven-parent-16.pom [ERROR] The build could not read 1 project - [Help 1] [ERROR] [ERROR] The project org.apache.maven.plugins:maven-plugins:18 (C:\cygwin\home\gus\maven\plugins\maven-plugins\pom.xml) has 1 error [ERROR] Non-resolvable parent POM: Could not find artifact org.apache.maven:maven-parent:pom:16 in central (http://heckp2.corp.aspentech.com:8080/artifactory/libs-release) and 'parent.relativePath' points at wrong local POM @ line 23, column 11 - [Help 2] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
Re: Bootstraping a repository manager
Am 18.05.2011 23:21, schrieb Heck, Gus (Patrick): In our company, our policies make it very important that I know exactly what is going into the project, so I can't just let maven go slurping things up from anywhere it feels like on the web. In a network allowed to access the outside world: - clean out your local repository (rm -rf ~/.m2/repository) - run your build - review what's inside your local repository and decide whether that's okay according to your policies The other way round (upload everything which is needed manually) completely thwarts the idea of automatic dependency management. To make it short: this is probably a dead end. The approach you outlined would mean to download and build from source each and every project your build is depending upon. Unless you are a world-class-superhero-build-and-release-manager with a lot of spare time, or your project has only a tiny set of (transitive) dependencies, this probably won't work. I doubt one person can accrue the knowledge required to build all these software modules which get deployed to the central maven repository in a reasonable time. If you don't believe, run mvn dependency:tree on your project, this will give you the dependency tree for compile-time dependencies. Add to this the test-dependencies needed to execute the tests of your compile-time dependencies which happens before packaging (i. e. you won't get a JAR if the tests don't run). If this is not enough to stop you from pursuing your initial approach, add all the maven plugins which make up your build system, and their dependencies. Best regards Ansgar - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Bootstraping a repository manager
On Wed, May 18, 2011 at 5:21 PM, Heck, Gus (Patrick) gus.h...@aspentech.com wrote: I can't seem to find a place to download something that I can upload directly to artifactory, so I tried to start with the first plugin that was failing, and build that and see if mvn deploy would deploy it to artifactory. (First, question... is that a reasonable idea?) That would be: http://repo1.maven.org/maven2 However it is not going to be fun to find each thing you need and upload it to your internal repository manager. (I work with a company that does it this way.) Especially for plugins. Is there any middle ground? Let the repository manager proxy into a segregated directory, vet everything in there and then move it to the pristine internal repo? Unfortunately, as soon as I did svn checkout http://svn.apache.org/repos/asf/maven/plugins/tags/maven-clean-plugin-2. 4.1 maven-clean-plugin cd maven-clean-plugin mvn deploy Hmm... first, do you *really* have a requirement to build everything from source? -- Wendy - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Bootstraping a repository manager
Am 18.05.2011 23:36, schrieb Heck, Gus (Patrick): This relates to a coming set of network access restrictions as well as overseas developers not accidentally downloading export controlled, or locally illegal software. Hi, regarding the overseas developers: try a repository manager with decent support for access control. I know that Sonatype Nexus does support quite fine-grained control over who can access which artifacts. You could have two roles for your developers, one which is allowed to download export-controlled artifacts, the other one is not. You would have to instruct your developers how to set up their maven settings.xml, so that maven knows which login credentials to present to the repository manager. Best regards Ansgar - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
RE: Bootstraping a repository manager
Hi Wendy, I don't have a requirement to build from source, but in the case of the maven plugins, nowhere on the web seems to point to a place where I can download the finished product (aside from letting maven find it, and who knows what other dependencies). I am adverse to letting maven just pull things because then I have a very long list of items to check and verify arranged in a tree, and it's all too easy to miss a subtree and think I've got everything covered. Basically the problem is I make a really crappy computer when it comes to tree-traversals and not losing my place when someone comes over to chat, I go to lunch, or I have to go home at the end of the day. :-) I don't want to trust that I won't make a mistake, I'd rather take a bit more time and let the build system ensure that I didn't miss anything. If I act as gatekeeper, I know that the project won't build properly until I've applied each dependency required to build the project. (and then same for test... etc). This shouldn't be any more burdensome than finding the transitive dependencies for a good sized ant project, which I've done many times before, except that maven plug-in folks seem to squirrel their stuff away where only maven can find it, so I'm having trouble getting maven working to start with. -Gus -Original Message- From: Wendy Smoak [mailto:wsm...@gmail.com] Sent: Wednesday, May 18, 2011 6:35 PM To: Maven Users List Subject: Re: Bootstraping a repository manager On Wed, May 18, 2011 at 5:21 PM, Heck, Gus (Patrick) gus.h...@aspentech.com wrote: I can't seem to find a place to download something that I can upload directly to artifactory, so I tried to start with the first plugin that was failing, and build that and see if mvn deploy would deploy it to artifactory. (First, question... is that a reasonable idea?) That would be: http://repo1.maven.org/maven2 However it is not going to be fun to find each thing you need and upload it to your internal repository manager. (I work with a company that does it this way.) Especially for plugins. Is there any middle ground? Let the repository manager proxy into a segregated directory, vet everything in there and then move it to the pristine internal repo? Unfortunately, as soon as I did svn checkout http://svn.apache.org/repos/asf/maven/plugins/tags/maven-clean-plugin-2. 4.1 maven-clean-plugin cd maven-clean-plugin mvn deploy Hmm... first, do you *really* have a requirement to build everything from source? -- Wendy - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org This e-mail and any attachments are intended only for use by the addressee(s) named herein and may contain legally privileged and/or confidential information. If you are not the intended recipient of this e-mail, you are hereby notified any dissemination, distribution or copying of this email, and any attachments thereto, is strictly prohibited. If you receive this email in error please immediately notify the sender and permanently delete the original copy and any copy of any e-mail, and any printout thereof. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Bootstraping a repository manager
Managing a maven build under these constraints is prohibitively expensive for a small operation if you apply it to maven itself. The thing you are building may have a modest enough dependency collection, but maven itself? I think you are looking an an inventory in the hundreds. It's a gigantic undertaking. Hmm, maybe someone could make some money selling 'trusted maven' -- a canned repo full of plugins and their deps where the seller takes legal responsibility for license and provenance :-) Again, a question here is provenance versus license. Say that you carefully set up an environment to load dependencies only from central. You run a build. You use the available tools to load the contents of your repo into a repo manager, and you tell everyone else to configure maven to load from that and nowhere else. Now you have provenance settled (if you trust central). Maven doesn't 'load things from anywhere'. It loads things from where you tell it to load things from. By default, that's central, period. Could a rogue developer circumvent? Of course, on their local machine. Can they push unwanted things into your repo? Not if you set the access control properly. Next you have dependency licenses to worry about. Well, even if you converted back to ant, you'd still have dependencies to worry about. At least maven will make you a nice report of the licenses of the dependencies as declared in the pom. With ant, you'd be googling away tracking down the original sources and licenses of all the dependencies. So I don't see how the maven-ness of this thing makes your problem materially harder. It's a big problem either way. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
RE: Bootstraping a repository manager
Ansgar, I'm not new to building stuff, just new to maven. Unrolling transitive dependencies is old hat for folks who grew up on ant :). It's more work, but in the end there's no question of what is or is not in your project, and I want to be sure that I only pull the dependencies I actually need, since I will likely wind up filling out an approval form for each of them at some point. Another concern of course is which FOS licenses are being depended upon. Another facet of this is the need to provide a location that can be scanned with a tool that detects GPL'd code, or other such problems. I don't understand your bit about test dependencies. I don't need to run the tests for things I am using. The release engineers for those projects presumably did that already. Note that the only reason I went to the source for the plugin was I couldn't find a binary. -Gus -Original Message- From: Ansgar Konermann [mailto:ansgar.konerm...@googlemail.com] Sent: Wednesday, May 18, 2011 6:34 PM To: users@maven.apache.org Subject: Re: Bootstraping a repository manager Am 18.05.2011 23:21, schrieb Heck, Gus (Patrick): In our company, our policies make it very important that I know exactly what is going into the project, so I can't just let maven go slurping things up from anywhere it feels like on the web. In a network allowed to access the outside world: - clean out your local repository (rm -rf ~/.m2/repository) - run your build - review what's inside your local repository and decide whether that's okay according to your policies The other way round (upload everything which is needed manually) completely thwarts the idea of automatic dependency management. To make it short: this is probably a dead end. The approach you outlined would mean to download and build from source each and every project your build is depending upon. Unless you are a world-class-superhero-build-and-release-manager with a lot of spare time, or your project has only a tiny set of (transitive) dependencies, this probably won't work. I doubt one person can accrue the knowledge required to build all these software modules which get deployed to the central maven repository in a reasonable time. If you don't believe, run mvn dependency:tree on your project, this will give you the dependency tree for compile-time dependencies. Add to this the test-dependencies needed to execute the tests of your compile-time dependencies which happens before packaging (i. e. you won't get a JAR if the tests don't run). If this is not enough to stop you from pursuing your initial approach, add all the maven plugins which make up your build system, and their dependencies. Best regards Ansgar - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org This e-mail and any attachments are intended only for use by the addressee(s) named herein and may contain legally privileged and/or confidential information. If you are not the intended recipient of this e-mail, you are hereby notified any dissemination, distribution or copying of this email, and any attachments thereto, is strictly prohibited. If you receive this email in error please immediately notify the sender and permanently delete the original copy and any copy of any e-mail, and any printout thereof. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Bootstraping a repository manager
1) Connect to the Internet, 2) Set up your repo to point to the external repos that you trust. 3) Load your repo by doing builds that you do not install or deploy. 4) Upload the 3rd party libraries that are not available from public Maven Repos - software with license restrictions 5) Disconnect from the internet 6) Delete any libraries that you want to disallow - can't imagine what these would be since you did put them in a POM for a reason. 7) Fix the poms that call up disallowed libraries to use different libraries. 8) Start building We have done other things to restrict the libraries that users use. I have bored people to death here describing this approach so you can likely find it in the archives. Ron On 18/05/2011 5:36 PM, Heck, Gus (Patrick) wrote: Hi Brian, I think you missed the entire point of the exercise. The point is to NOT allow it to pull from outside sources, as a proxy or not. The intent is to load it up manually and never ever let it fetch serve any dependency or plugin I haven't personally uploaded, and intentionally provided for use. This relates to a coming set of network access restrictions as well as overseas developers not accidentally downloading export controlled, or locally illegal software. Also, you will note that I am currently working with artifactory. -Gus -Original Message- From: Brian Fox [mailto:bri...@infinity.nu] Sent: Wednesday, May 18, 2011 5:26 PM To: Maven Users List Subject: Re: Bootstraping a repository manager You don't need to bootsrap it, just setup a repo like Nexus and let it proxy on demand the things you need. In that case a bootstrap might simply mean run all our builds and/or run mvn dependency:go-offline to resolve everything you need. On Wed, May 18, 2011 at 5:21 PM, Heck, Gus (Patrick) gus.h...@aspentech.com wrote: Hi Folks, The list archives return hundreds or thousands of not very relevant results when I search them, so this may have been answered, but I can't find it. In any case, I'm also somewhat new to maven so I'm possibly asking silly questions for that reason too. In either case I apologize in advance... I've got a project, that is derived from another project that was set up with maven (else, I'd probably still be using ant). In our company, our policies make it very important that I know exactly what is going into the project, so I can't just let maven go slurping things up from anywhere it feels like on the web. To this end, I'm testing out the free version of artifactory, which looks like a nice solution to that problem. I've managed to get my maven pointed at artifactory, and wiped out my local repository. I also deleted artifactory's references to the outside world. Now my builds complain that I can't find stuff, and the messages are clearly looking at my artifactory. Perfect so far. However, as pleased as I am to have broken my build, now I need to get it going again :-). My first challenge seems to be getting the basic maven plugins into the repository. I can't seem to find a place to download something that I can upload directly to artifactory, so I tried to start with the first plugin that was failing, and build that and see if mvn deploy would deploy it to artifactory. (First, question... is that a reasonable idea?) Unfortunately, as soon as I did svn checkout http://svn.apache.org/repos/asf/maven/plugins/tags/maven-clean-plugin-2. 4.1 maven-clean-plugin cd maven-clean-plugin mvn deploy I got [INFO] Scanning for projects... Downloading: http://heckp2.corp.aspentech.com:8080/artifactory/libs-release/org/apach e/maven/plugins/maven-plugins/18/maven-plugins-18.pom Downloading: http://heckp2.corp.aspentech.com:8080/artifactory/libs-snapshot/org/apac he/maven/plugins/maven-plugins/18/maven-plugins-18.pom [ERROR] The build could not read 1 project - [Help 1] [ERROR] [ERROR] The project org.apache.maven.plugins:maven-clean-plugin:2.4.1 (C:\cygwin\home\gus\maven\plugins\maven-clean-plugin\pom.xml) has 1 error [ERROR] Non-resolvable parent POM: Could not find artifact org.apache.maven.plugins:maven-plugins:pom:18 in central (http://heckp2.corp.aspentech.com:8080/artifactory/libs-release) and 'parent.relativePath' points at wrong local POM @ line 25, column 11 - [Help 2] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingExceptio n [ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelExcept ion bash-4.1$ So I went and looked at the subversion repository and I found maven-plugins-18, but when I tried to build that I got.. [INFO] Scanning for projects... Downloading: http://heckp2.corp.aspentech.com:8080/artifactory/libs-release/org/apach
RE: Bootstraping a repository manager
As I explained in another response, I want the software to tell me when I've got enough stuff to build (much like test driven development), rather than trusting I covered everything post-hoc. As for doing it with ant projects, I've certainly been there. At one job I wrote a custom ant task that looked at /lib, a properties file and a directory called /licenses. If the jar in lib didn't have an entry in the properties file, or the value for that jar in the properties file didn't match the name of a file in /licenses, the build failed. Not really that hard to implement. As you say, the big time sink is in hunting down the licenses, but in the current job I have to do that anyway to include a copy of the license with the approval form for the lawyers... nothing maven can do about that. The only irritation is that some basic artifacts seem to be hard to find and instead of an answer such as the artifacts you need can be found here I get a chorus of don't do that By the way, I am a bit irritated that maven put's the repository information out on the developer's settings.xml. I'd much rather be able to manage that centrally, and not leave it as something that they could screw up, or forget to do after their hard drive fails and the set things up a second time. Is there a way to lock things into a single repository without settings.xml? Malicious circumvention is of course a whole different topic, and would be impossible to prevent without an encrypted form of the pom anyway. -Gus -Original Message- From: Benson Margulies [mailto:bimargul...@gmail.com] Sent: Wednesday, May 18, 2011 7:35 PM To: Maven Users List Subject: Re: Bootstraping a repository manager Managing a maven build under these constraints is prohibitively expensive for a small operation if you apply it to maven itself. The thing you are building may have a modest enough dependency collection, but maven itself? I think you are looking an an inventory in the hundreds. It's a gigantic undertaking. Hmm, maybe someone could make some money selling 'trusted maven' -- a canned repo full of plugins and their deps where the seller takes legal responsibility for license and provenance :-) Again, a question here is provenance versus license. Say that you carefully set up an environment to load dependencies only from central. You run a build. You use the available tools to load the contents of your repo into a repo manager, and you tell everyone else to configure maven to load from that and nowhere else. Now you have provenance settled (if you trust central). Maven doesn't 'load things from anywhere'. It loads things from where you tell it to load things from. By default, that's central, period. Could a rogue developer circumvent? Of course, on their local machine. Can they push unwanted things into your repo? Not if you set the access control properly. Next you have dependency licenses to worry about. Well, even if you converted back to ant, you'd still have dependencies to worry about. At least maven will make you a nice report of the licenses of the dependencies as declared in the pom. With ant, you'd be googling away tracking down the original sources and licenses of all the dependencies. So I don't see how the maven-ness of this thing makes your problem materially harder. It's a big problem either way. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org This e-mail and any attachments are intended only for use by the addressee(s) named herein and may contain legally privileged and/or confidential information. If you are not the intended recipient of this e-mail, you are hereby notified any dissemination, distribution or copying of this email, and any attachments thereto, is strictly prohibited. If you receive this email in error please immediately notify the sender and permanently delete the original copy and any copy of any e-mail, and any printout thereof.
Re: Bootstraping a repository manager
On Wed, May 18, 2011 at 7:56 PM, Heck, Gus (Patrick) gus.h...@aspentech.com wrote: As I explained in another response, I want the software to tell me when I've got enough stuff to build (much like test driven development), rather than trusting I covered everything post-hoc. As for doing it with ant projects, I've certainly been there. At one job I wrote a custom ant task that looked at /lib, a properties file and a directory called /licenses. If the jar in lib didn't have an entry in the properties file, or the value for that jar in the properties file didn't match the name of a file in /licenses, the build failed. Not really that hard to implement. As you say, the big time sink is in hunting down the licenses, but in the current job I have to do that anyway to include a copy of the license with the approval form for the lawyers... nothing maven can do about that. The only irritation is that some basic artifacts seem to be hard to find and instead of an answer such as the artifacts you need can be found here I get a chorus of don't do that Hm? I already told you where the things are. In the central repository. (And you need both the jar and the pom for it to work.) Typically the only organizations that can afford to be this paranoid are really big ones. I work with one of those. The internal Maven repo does not talk to the internet. Instead, developers fill out a web form to request a new artifact to be uploaded, someone approves it if it's in the standards, or sends them off to the reference architecture team to explain why they need it, and then someone else presses the buttons in Archiva to upload it. Plugins are a special case. Those we handle within the build team, as they typically want all kinds of dependencies. So for those we connect to the internet and use the Maven Assembly plugin to create a repository bundle by listing the plugin as a dependency. Maven goes off and gets everything that plugin needs, and the whole bundle is uploaded. Those artifacts generally aren't going to get into your end product, they are just used during the build. By the way, I am a bit irritated that maven put's the repository information out on the developer's settings.xml. I'd much rather be able to manage that centrally, and not leave it as something that they could screw up, or forget to do after their hard drive fails and the set things up a second time. Is there a way to lock things into a single repository without settings.xml? That's where it's done, with a mirror in settings.xml. You can create your own Maven distribution with the settings.xml you want them to use packaged inside it (in the /conf directory.) I assume if you're this strict about dependencies, developers are not downloading random software from the internet and installing it on their machines, so provide the Maven distro you want them to use. -- Wendy - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Bootstraping a repository manager
The other nice thing about Maven is that no matter what one is building or how unusual one thinks their environment is, someone has already built something similar and someone has already worked out a best practice in a similar environment. It is also supported by a great forum where you get advice that you could not find or afford and it is free here. Ron On 18/05/2011 9:32 PM, Wendy Smoak wrote: On Wed, May 18, 2011 at 7:56 PM, Heck, Gus (Patrick) gus.h...@aspentech.com wrote: As I explained in another response, I want the software to tell me when I've got enough stuff to build (much like test driven development), rather than trusting I covered everything post-hoc. As for doing it with ant projects, I've certainly been there. At one job I wrote a custom ant task that looked at /lib, a properties file and a directory called /licenses. If the jar in lib didn't have an entry in the properties file, or the value for that jar in the properties file didn't match the name of a file in /licenses, the build failed. Not really that hard to implement. As you say, the big time sink is in hunting down the licenses, but in the current job I have to do that anyway to include a copy of the license with the approval form for the lawyers... nothing maven can do about that. The only irritation is that some basic artifacts seem to be hard to find and instead of an answer such as the artifacts you need can be found here I get a chorus of don't do that Hm? I already told you where the things are. In the central repository. (And you need both the jar and the pom for it to work.) Typically the only organizations that can afford to be this paranoid are really big ones. I work with one of those. The internal Maven repo does not talk to the internet. Instead, developers fill out a web form to request a new artifact to be uploaded, someone approves it if it's in the standards, or sends them off to the reference architecture team to explain why they need it, and then someone else presses the buttons in Archiva to upload it. Plugins are a special case. Those we handle within the build team, as they typically want all kinds of dependencies. So for those we connect to the internet and use the Maven Assembly plugin to create a repository bundle by listing the plugin as a dependency. Maven goes off and gets everything that plugin needs, and the whole bundle is uploaded. Those artifacts generally aren't going to get into your end product, they are just used during the build. By the way, I am a bit irritated that maven put's the repository information out on the developer's settings.xml. I'd much rather be able to manage that centrally, and not leave it as something that they could screw up, or forget to do after their hard drive fails and the set things up a second time. Is there a way to lock things into a single repository without settings.xml? That's where it's done, with a mirror in settings.xml. You can create your own Maven distribution with the settings.xml you want them to use packaged inside it (in the /conf directory.) I assume if you're this strict about dependencies, developers are not downloading random software from the internet and installing it on their machines, so provide the Maven distro you want them to use. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Maven unnecessarily downloads all dependencies from parent, POM's dependencyManagement?
Apologies - I was wrong about this. Maven does only download those lt;dependencyManagementgt; dependencies necessary for the current child POM, not unrelated ones. It was just downloading much more than I expected! Richard. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org