Re: Maven cyclic dependecy issue
Christian Goetze wrote: The trouble is that you need a -reference- to the parent's version in the children, and that reference does not seem to resolve any ${...} substitutions, so it needs to be hard coded. Hmm... Was this the intended design or could this be fixed up in later revisions? Just seems that defining a top-level property should be viewable/overriden by every child pom and hence conforming to the *inheritance* contract touted by Maven. -los _ Get the latest Windows Live Messenger 8.1 Beta version. Join now. http://ideas.live.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Maven cyclic dependecy issue
Hi, Im a bit frustrated on how Maven cycles through its dependency. Currently I have a project consisting of multiple sub projects2 levels deep. Heres a hierarchy: --main -- sub1 -- sub1sub1 -- sub1sub2 -- sub2 The main project has a POM looking like this: project xmlns=http://maven.apache.org/POM/4.0.0; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd; modelVersion4.0.0/modelVersion groupIdcom.project.main/groupId artifactIdmain/artifactId version1.0-SNAPSHOT/version nameMain Project/name urlhttp://maven.apache.org/url packagingpom/packaging properties main.version1.0-SNAPSHOT/main.version /properties modules modulesub1/module modulesub2/module /modules ... /project Now say my sub2 project looks like this: project parent artifactIdmain/artifactId groupIdcom.project.main/groupId version1.0-SNAPSHOT/version /parent modelVersion4.0.0/modelVersion groupIdcom.project.main.core/groupId artifactIdmain-core-api/artifactId nameMain Core API/name version${main.version}/version packagingjar/packaging /project Sub project 1 and its repective subprojects are similar. Now, from my root project (main), I run any mvn command, I get the following error: ### [INFO] Error building POM (may not be this project's POM). Project ID: com.project.main.sub1.sub2:main-sub1-sub2:jar:${main.version} Reason: Cannot find parent: com.project.main.sub1:main-sub1 for project: com.project.main.sub1.sub2:main-sub1-sub2:jar:${main.version} So I go to my sub2 project and run any mvn command, I get the same error. Looks like its not able to figure out the runtime value of {main.version}. Hence I can not continue with any build process. Any help would be appreciated. Thanks in advance. -los _ Fixing up the home? Live Search can help http://imagine-windowslive.com/search/kits/default.aspx?kit=improvelocale=en-USsource=hmemailtaglinenov06FORM=WLMTAG - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Maven cyclic dependecy issue
Thanks for the reply. Well... My most (if not all) of my subprojects will be on the same version. Since I currently have about a dozen sub projects (and there will be more), I hate to go into each sub project and change the version number in the POM. I would rather change it in one place and have it reflected across all sub projects. That's what I thought inheritance of POM's provided. If these sub poms can't inherit the attribute of the super pom's version number, what kind of inheritance is this? Is there another way of doing what I described that works? -los From: Eric Redmond [EMAIL PROTECTED] Reply-To: Maven Users List users@maven.apache.org To: Maven Users List users@maven.apache.org Subject: Re: Maven cyclic dependecy issue Date: Tue, 21 Nov 2006 11:19:02 -0500 I see what you are trying to do... but why? If you do not define a child project's version, it automatically inherits from its parent. Just take version${main.version}/version out. On 11/21/06, Los Morales [EMAIL PROTECTED] wrote: Hi, I'm a bit frustrated on how Maven cycles through its dependency. Currently I have a project consisting of multiple sub projects2 levels deep. Here's a hierarchy: --main -- sub1 -- sub1sub1 -- sub1sub2 -- sub2 The main project has a POM looking like this: project xmlns=http://maven.apache.org/POM/4.0.0; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd; modelVersion4.0.0/modelVersion groupIdcom.project.main/groupId artifactIdmain/artifactId version1.0-SNAPSHOT/version nameMain Project/name urlhttp://maven.apache.org/url packagingpom/packaging properties main.version1.0-SNAPSHOT/main.version /properties modules modulesub1/module modulesub2/module /modules ... /project Now say my sub2 project looks like this: project parent artifactIdmain/artifactId groupIdcom.project.main/groupId version1.0-SNAPSHOT/version /parent modelVersion4.0.0/modelVersion groupIdcom.project.main.core/groupId artifactIdmain-core-api/artifactId nameMain Core API/name version${main.version}/version packagingjar/packaging /project Sub project 1 and its repective subprojects are similar. Now, from my root project (main), I run any mvn command, I get the following error: ### [INFO] Error building POM (may not be this project's POM). Project ID: com.project.main.sub1.sub2:main-sub1-sub2:jar:${main.version} Reason: Cannot find parent: com.project.main.sub1:main-sub1 for project: com.project.main.sub1.sub2:main-sub1-sub2:jar:${main.version} So I go to my sub2 project and run any mvn command, I get the same error. Looks like its not able to figure out the runtime value of {main.version}. Hence I can not continue with any build process. Any help would be appreciated. Thanks in advance. -los _ Fixing up the home? Live Search can help http://imagine-windowslive.com/search/kits/default.aspx?kit=improvelocale=en-USsource=hmemailtaglinenov06FORM=WLMTAG - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Eric Redmond http://codehaus.org/~eredmond _ Get FREE company branded e-mail accounts and business Web site from Microsoft Office Live http://clk.atdmt.com/MRT/go/mcrssaub0050001411mrt/direct/01/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
how to chain maven goals
Hi, I would like to know how to chain a series of maven goals together (much like Ant's dependency function). For example, I want to do this with one command: mvn clean; mvn compile; mvn install; mvn package; mvn install. How do I go about accomplishing this (if its possible). Thanks in advance. -los _ Find a local pizza place, music store, museum and more then map the best route! http://local.live.com?FORM=MGA001 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Confused about Maven 2 Eclipse plugin
I'm currently using Eclipse 3.2 and Maven 2 plugin version 0.0.9. When I enable Maven 2 and right-click on my main project, there are only 2 options for me in the popup menu: 1) Update Source Folders and 2) Add Dependency... Where are the lifecycle phases or custom goals? Seems like the NetBeans plugin works fine but I'm totally frustrated for the one with Eclipse. Everytime I need to clean/compile/package my Eclipse project, I got to do it via the command line. Am I missing something here? Thanks in advance. -los _ Express yourself - download free Windows Live Messenger themes! http://clk.atdmt.com/MSN/go/msnnkwme002001msn/direct/01/?href=http://imagine-msn.com/themes/vibe/default.aspx?locale=en-ussource=hmtagline - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Confused about Maven 2 Eclipse plugin
Hi, Thanks for the tip. Now I tried the lifecycle clean, compile and package on my base project, but it doesn't recurse down to my sub projects. For example, I have this setup: --Main Project --- Project 1 --- pom.xml --- Project 2 --- pom.xml --- pom.xml Now when I run the Maven 2 plugin phase clean from the base directory-- Main Project, I get this: Deleting directory c:\workspaces\test\Main Project\target Deleting directory c:\workspaces\test\Main Project\target\classes Deleting directory c:\workspaces\test\Main Project\target\test-classes ... However, it does not clean up Project 1 and 2's target directories. I know my pom.xml's are good since the command line (mvn clean) works like a charm. Am I'm missing a step or 2? Thanks in advance. -los From: Manuel Ledesma [EMAIL PROTECTED] Reply-To: Maven Users List users@maven.apache.org To: Maven Users List users@maven.apache.org Subject: Re: Confused about Maven 2 Eclipse plugin Date: Thu, 12 Oct 2006 23:12:28 -0400 Look at external tools. You can launch lifecycle and goals from there. Los Morales wrote: I'm currently using Eclipse 3.2 and Maven 2 plugin version 0.0.9. When I enable Maven 2 and right-click on my main project, there are only 2 options for me in the popup menu: 1) Update Source Folders and 2) Add Dependency... Where are the lifecycle phases or custom goals? Seems like the NetBeans plugin works fine but I'm totally frustrated for the one with Eclipse. Everytime I need to clean/compile/package my Eclipse project, I got to do it via the command line. Am I missing something here? Thanks in advance. -los _ Express yourself - download free Windows Live Messenger themes! http://clk.atdmt.com/MSN/go/msnnkwme002001msn/direct/01/?href=http://imagine-msn.com/themes/vibe/default.aspx?locale=en-ussource=hmtagline - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Add fun gadgets and colorful themes to express yourself on Windows Live Spaces http://clk.atdmt.com/MSN/go/msnnkwsp007001msn/direct/01/?href=http://www.get.live.com/spaces/features - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Maven requiring -source 5
Hi, I'm fairly new to Maven 2 and I've just begun to use Mevenide for NetBeans 6 (Dev). When I run my compile phase, maven is complaining about the source level for Java being at 1.3 instead of 6: generics are not supported in -source 1.3 I'm not sure why the source is set to 1.3 when all I have installed on my machine is Java 6 and there is no setting on NetBeans which is forcing 1.3 compliance so I figured it must be a setting in Maven and/or mevenide. How can I force java 6 compliance with Maven compile? thanks in advanced. -los _ Express yourself - download free Windows Live Messenger themes! http://clk.atdmt.com/MSN/go/msnnkwme002001msn/direct/01/?href=http://imagine-msn.com/themes/vibe/default.aspx?locale=en-ussource=hmtagline - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Does maven have something like ant calls?
Thanks for the responses. I've checked the reactor plugin and still see it based on the pom inheritance model with the way it calls the subprojects. As for the multiproject plugin, looks like I will have to do some hacking with the directory structure in eclipse. Let me just restate my issue in more detail and maybe there is an easy way of solving the problem. I'm using eclipse as my IDE. Say I have 3 projects set up in eclipse like this: -- Project A == /build == /conf -- Project B == /build == /src == /conf -- Project C == /build == /src == /web You can consider Project A as a main build project, or parent, that oversees all the other (child) projects. It contains the main build file (under /build) and configuration properties used by all the other projects. Project B can be considered the java middle-tier, housing all the services and business logic. Project C is the webapp, housing source code and web components (JSPs, etc) related to the front-end. Projects B and C also have their own build files, with each build specific to the project. So for the case of Project B, it will compile and jar; for Project C, it will compile and war. Therefore I want Project A to call Project B's build, then call Project C's build which relies on Project B's binaries. Is this possible using Maven and one of its plugins? I'm pretty sure that the reactor plugin can NOT do this from some of the examples I've seen on the web. As for the multiproject plugin, I'm not so sure. I might still have to hack the directory structure in eclipse, which in turn, defeats the purpose. Any suggestions would be much appreciated. Thanks! -los From: Marco Tedone [EMAIL PROTECTED] Reply-To: Marco Tedone [EMAIL PROTECTED] To: Maven Users List [EMAIL PROTECTED] Subject: Re: Does maven have something like ant calls? Date: Fri, 26 Mar 2004 07:34:11 - You may want to see at the reactor and/or the multiproject plugin. With Maven, you can define subprojects (each subproject is defined by a project.xml), although a very high granularity (i.e. a project per package) is descouraged. Maven is also considered as a wrapper around Ant. All you need to do when you want to use Ant, is to define something like that in your maven.xml file: ant:copy todir=.. ant:delete .. HTH, Marco - Original Message - From: Los Morales [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, March 26, 2004 7:27 AM Subject: Does maven have something like ant calls? Hi, I'm new to maven and would like to know if there is a way of creating one main project.xml that calls other project.xml files to do the work. For example, suppose I have 3 projects set up--P1, P2 and P3. P1 is designated as the main project file. Running P1 initializes itself, calls P2 to do its thing which includes jarring itself into the local repository, and finally calls P3 to do its thing which depends on P2's jar to complete. I've looked at the pom inheritance but its more of inheriting the super pom's properties rather than delegating calls to sub poms. The only other way I can think is to create a maven.xml file which embodies ant calls to do the job. I'm not sure how this would work though since I do not see any ant tasks specifiic in invoking maven tasks. Any help would be appreciated. Thanks! -los _ Find a broadband plan that fits. Great local deals on high-speed Internet access. https://broadband.msn.com/?pgmarket=en-us/go/onm00200360ave/direct/01/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Get tax tips, tools and access to IRS forms all in one place at MSN Money! http://moneycentral.msn.com/tax/home.asp - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]