Re: Tell maven to not have the parent pom as a dependency?
You don't need N windows, I just add the pom in the maven projects tool window, and have open in my generated IDEA project my core project, plus any F/OSS project I may be forking/working on in the process. Find Anywhere then works across all projects. ![Cloud Email Hosting Security](http://smxemail.com/images/smxsig.png) On 13 Sep 2014, at 3:58, Kevin Burton wrote: Now I have two projects to maintain. And the number is increasing… From an IDE perspective, I have to have N windows and switch between them, and remember which file is in which project.
Re: Tell maven to not have the parent pom as a dependency?
On 14 September 2014 16:01, Mark Derricutt m...@talios.com wrote: You don't need N windows, I just add the pom in the maven projects tool window, and have open in my generated IDEA project my core project, plus any F/OSS project I may be forking/working on in the process. Find Anywhere then works across all projects. This is the fake aggregation project we talked about. This one DOES NOT get checked into the repository. It's just something you create to link all these together for your convenience. The is a vaporware project that would help you manage this stuff, whenever you turned one of your dependencies into a SNAPSHOT then it would download the source for that project and put it correctly in your IDE and update the fake aggregator to include it. But no one has had enough of an itch to work on that project. Sounds like you might find that useful Kevin, want to build it?
Re: Tell maven to not have the parent pom as a dependency?
I think I could probably migrate it down … Maybe cut my dependencies in 1/2 .. However, the version idea is probably the right way to go here :) Thanks for the recommendation! Kevin On Fri, Sep 12, 2014 at 6:31 PM, Barrie Treloar baerr...@gmail.com wrote: On 13 September 2014 02:46, Kevin Burton bur...@spinn3r.com wrote: OK… so this definitely works and the aggregation model compiles my module. But I need a way to bump the version number because I have complex dependencies and updating 10 places every time I change the project version isn’t going to be fun. If you have 10 places where the dependencies need changing you are doing it wrong. You should have zero version definitions in your modules. All version definitions are in the topmost parent pom in the dependencyManagement section. If you have a bunch of things that share versions, you can also create a property and then use something like ${mygroup.version} so that you only need to update the property section once. Have you read the freely available Maven books? It's been long while since I've read them but I think this advice is in there. -- Founder/CEO Spinn3r.com Location: *San Francisco, CA* blog: http://burtonator.wordpress.com … or check out my Google+ profile https://plus.google.com/102718274791889610666/posts http://spinn3r.com
Re: Tell maven to not have the parent pom as a dependency?
The problem I have here is that this would definitely fix my problem. Breaking it out into another OSS project would be sweet… BUT… it would introduce its own set of problems. Now I have two projects to maintain. And the number is increasing… From an IDE perspective, I have to have N windows and switch between them, and remember which file is in which project. I find it’s 100x easier to just keep everything in one project. I could use git-submodules… but IDEA breaks on them and they have a few gotchas. … but perhaps there’s no perfect solution. Just a few solutions that are less horrible than my current solution. Kevin On Thu, Sep 11, 2014 at 10:53 PM, Barrie Treloar baerr...@gmail.com wrote: On 12 September 2014 12:55, Kevin Burton bur...@spinn3r.com wrote: I have an OSS module in a multi-module maven project. I want to post this to a public repo… it’s open source. The problem is that the parent module is not OSS. When I setup a dependency it pulls in my OSS module just fine, but then it tries to pull down the parent module, which isn’t in the repo, and breaks. The parent pom isn’t really a dependency… so I’d like it to not need it is this possible? As Dan says, make it a stand alone project. i.e. Dont make it a module. Being a module has a special meaning - treat this as part of a bigger whole. It also help with syntatic sugar by allowing you to run one command at the top and have it propogate into all the modules. To be complete a module has nothing to do with dependencies or dependency management. The reason your OSS module is pulling in the parent is not because of dependency, but because of inheritance of the parent hierarchy. Usually all modules are released together and will share version identifiers. If they are released independently then you normally wont make them modules, and their version identifiers can do their own thing. There is a recent post Maintaining versions in a multi-module project that Stephen answers, you might also want to search the archives on this topic as well. A parent pom can be used in two ways; 1) to share common information i.e. inheritance 2) keep related artifacts together to make working on a bug that traverses artifacts easier i.e aggregation In your case I dont think you need to use aggregation, you just need to pull out the OSS artifact into its own stand alone location and then include it as a normal dependency in your non-OSS project. If you find that you are also fixing bugs in the OSS project at the same time you are working on the non-OSS one, then you might want to create an aggregate pom that has two modules (one OSS, the other non-OSS) so that you can run maven commands in one place against both projects. Stephen Connolly has some stuff somewhere about that I think. The freely availble Maven books might also go into this in more detail, but it tends to be a more advanced feature not well described. Cheers Barrie -- Founder/CEO Spinn3r.com Location: *San Francisco, CA* blog: http://burtonator.wordpress.com … or check out my Google+ profile https://plus.google.com/102718274791889610666/posts http://spinn3r.com
Re: Tell maven to not have the parent pom as a dependency?
I think you can use an dummy aggregation project to host both of your internal and OSS and make IDE like eclipse happy root aggregate-proj pom.xml your-oss pom.xml your-internal -D pom.xml On Fri, Sep 12, 2014 at 8:58 AM, Kevin Burton bur...@spinn3r.com wrote: The problem I have here is that this would definitely fix my problem. Breaking it out into another OSS project would be sweet… BUT… it would introduce its own set of problems. Now I have two projects to maintain. And the number is increasing… From an IDE perspective, I have to have N windows and switch between them, and remember which file is in which project. I find it’s 100x easier to just keep everything in one project. I could use git-submodules… but IDEA breaks on them and they have a few gotchas. … but perhaps there’s no perfect solution. Just a few solutions that are less horrible than my current solution. Kevin On Thu, Sep 11, 2014 at 10:53 PM, Barrie Treloar baerr...@gmail.com wrote: On 12 September 2014 12:55, Kevin Burton bur...@spinn3r.com wrote: I have an OSS module in a multi-module maven project. I want to post this to a public repo… it’s open source. The problem is that the parent module is not OSS. When I setup a dependency it pulls in my OSS module just fine, but then it tries to pull down the parent module, which isn’t in the repo, and breaks. The parent pom isn’t really a dependency… so I’d like it to not need it is this possible? As Dan says, make it a stand alone project. i.e. Dont make it a module. Being a module has a special meaning - treat this as part of a bigger whole. It also help with syntatic sugar by allowing you to run one command at the top and have it propogate into all the modules. To be complete a module has nothing to do with dependencies or dependency management. The reason your OSS module is pulling in the parent is not because of dependency, but because of inheritance of the parent hierarchy. Usually all modules are released together and will share version identifiers. If they are released independently then you normally wont make them modules, and their version identifiers can do their own thing. There is a recent post Maintaining versions in a multi-module project that Stephen answers, you might also want to search the archives on this topic as well. A parent pom can be used in two ways; 1) to share common information i.e. inheritance 2) keep related artifacts together to make working on a bug that traverses artifacts easier i.e aggregation In your case I dont think you need to use aggregation, you just need to pull out the OSS artifact into its own stand alone location and then include it as a normal dependency in your non-OSS project. If you find that you are also fixing bugs in the OSS project at the same time you are working on the non-OSS one, then you might want to create an aggregate pom that has two modules (one OSS, the other non-OSS) so that you can run maven commands in one place against both projects. Stephen Connolly has some stuff somewhere about that I think. The freely availble Maven books might also go into this in more detail, but it tends to be a more advanced feature not well described. Cheers Barrie -- Founder/CEO Spinn3r.com Location: *San Francisco, CA* blog: http://burtonator.wordpress.com … or check out my Google+ profile https://plus.google.com/102718274791889610666/posts http://spinn3r.com
Re: Tell maven to not have the parent pom as a dependency?
Hi Kevin, I want to post this to a public repo… it’s open source. The problem is that the parent module is not OSS. Child modules of a multi-module build do not need to use the toplevel module as parent. In other words, you can keep using your toplevel pom.xml as an _aggregator_ without it being the _parent_ of your OSS module. http://rostislav-matl.blogspot.com/2011/12/maven-aggregator-vs-parent.html Regards, Curtis On Thu, Sep 11, 2014 at 10:25 PM, Kevin Burton bur...@spinn3r.com wrote: I have an OSS module in a multi-module maven project. I want to post this to a public repo… it’s open source. The problem is that the parent module is not OSS. When I setup a dependency it pulls in my OSS module just fine, but then it tries to pull down the parent module, which isn’t in the repo, and breaks. The parent pom isn’t really a dependency… so I’d like it to not need it is this possible? -- Founder/CEO Spinn3r.com Location: *San Francisco, CA* blog: http://burtonator.wordpress.com … or check out my Google+ profile https://plus.google.com/102718274791889610666/posts http://spinn3r.com
Re: Tell maven to not have the parent pom as a dependency?
In other words, you can keep using your toplevel pom.xml as an _aggregator_ without it being the _parent_ of your OSS module. Ha. That works. But the versions plugin now won’t update the version of the sub-module… This is super fun! :) On Fri, Sep 12, 2014 at 9:33 AM, Curtis Rueden ctrue...@wisc.edu wrote: Hi Kevin, I want to post this to a public repo… it’s open source. The problem is that the parent module is not OSS. Child modules of a multi-module build do not need to use the toplevel module as parent. In other words, you can keep using your toplevel pom.xml as an _aggregator_ without it being the _parent_ of your OSS module. http://rostislav-matl.blogspot.com/2011/12/maven-aggregator-vs-parent.html Regards, Curtis On Thu, Sep 11, 2014 at 10:25 PM, Kevin Burton bur...@spinn3r.com wrote: I have an OSS module in a multi-module maven project. I want to post this to a public repo… it’s open source. The problem is that the parent module is not OSS. When I setup a dependency it pulls in my OSS module just fine, but then it tries to pull down the parent module, which isn’t in the repo, and breaks. The parent pom isn’t really a dependency… so I’d like it to not need it is this possible? -- Founder/CEO Spinn3r.com Location: *San Francisco, CA* blog: http://burtonator.wordpress.com … or check out my Google+ profile https://plus.google.com/102718274791889610666/posts http://spinn3r.com -- Founder/CEO Spinn3r.com Location: *San Francisco, CA* blog: http://burtonator.wordpress.com … or check out my Google+ profile https://plus.google.com/102718274791889610666/posts http://spinn3r.com
Re: Tell maven to not have the parent pom as a dependency?
OK… so this definitely works and the aggregation model compiles my module. But I need a way to bump the version number because I have complex dependencies and updating 10 places every time I change the project version isn’t going to be fun. On Fri, Sep 12, 2014 at 10:03 AM, Kevin Burton bur...@spinn3r.com wrote: In other words, you can keep using your toplevel pom.xml as an _aggregator_ without it being the _parent_ of your OSS module. Ha. That works. But the versions plugin now won’t update the version of the sub-module… This is super fun! :) On Fri, Sep 12, 2014 at 9:33 AM, Curtis Rueden ctrue...@wisc.edu wrote: Hi Kevin, I want to post this to a public repo… it’s open source. The problem is that the parent module is not OSS. Child modules of a multi-module build do not need to use the toplevel module as parent. In other words, you can keep using your toplevel pom.xml as an _aggregator_ without it being the _parent_ of your OSS module. http://rostislav-matl.blogspot.com/2011/12/maven-aggregator-vs-parent.html Regards, Curtis On Thu, Sep 11, 2014 at 10:25 PM, Kevin Burton bur...@spinn3r.com wrote: I have an OSS module in a multi-module maven project. I want to post this to a public repo… it’s open source. The problem is that the parent module is not OSS. When I setup a dependency it pulls in my OSS module just fine, but then it tries to pull down the parent module, which isn’t in the repo, and breaks. The parent pom isn’t really a dependency… so I’d like it to not need it is this possible? -- Founder/CEO Spinn3r.com Location: *San Francisco, CA* blog: http://burtonator.wordpress.com … or check out my Google+ profile https://plus.google.com/102718274791889610666/posts http://spinn3r.com -- Founder/CEO Spinn3r.com Location: *San Francisco, CA* blog: http://burtonator.wordpress.com … or check out my Google+ profile https://plus.google.com/102718274791889610666/posts http://spinn3r.com -- Founder/CEO Spinn3r.com Location: *San Francisco, CA* blog: http://burtonator.wordpress.com … or check out my Google+ profile https://plus.google.com/102718274791889610666/posts http://spinn3r.com
Re: Tell maven to not have the parent pom as a dependency?
You mentioned you were using the versions plugin and it wasn¹t working- did you use it before? Can you describe your use case in terms of the command line you are using, and what versions you want to upgrade? On 9/12/14, 10:16 AM, Kevin Burton bur...@spinn3r.com wrote: OKŠ so this definitely works and the aggregation model compiles my module. But I need a way to bump the version number because I have complex dependencies and updating 10 places every time I change the project version isn¹t going to be fun. On Fri, Sep 12, 2014 at 10:03 AM, Kevin Burton bur...@spinn3r.com wrote: In other words, you can keep using your toplevel pom.xml as an _aggregator_ without it being the _parent_ of your OSS module. Ha. That works. But the versions plugin now won¹t update the version of the sub-moduleŠ This is super fun! :) On Fri, Sep 12, 2014 at 9:33 AM, Curtis Rueden ctrue...@wisc.edu wrote: Hi Kevin, I want to post this to a public repoŠ it¹s open source. The problem is that the parent module is not OSS. Child modules of a multi-module build do not need to use the toplevel module as parent. In other words, you can keep using your toplevel pom.xml as an _aggregator_ without it being the _parent_ of your OSS module. http://rostislav-matl.blogspot.com/2011/12/maven-aggregator-vs-parent.ht ml Regards, Curtis On Thu, Sep 11, 2014 at 10:25 PM, Kevin Burton bur...@spinn3r.com wrote: I have an OSS module in a multi-module maven project. I want to post this to a public repoŠ it¹s open source. The problem is that the parent module is not OSS. When I setup a dependency it pulls in my OSS module just fine, but then it tries to pull down the parent module, which isn¹t in the repo, and breaks. The parent pom isn¹t really a dependencyŠ so I¹d like it to not need it is this possible? -- Founder/CEO Spinn3r.com Location: *San Francisco, CA* blog: http://burtonator.wordpress.com Š or check out my Google+ profile https://plus.google.com/102718274791889610666/posts http://spinn3r.com -- Founder/CEO Spinn3r.com Location: *San Francisco, CA* blog: http://burtonator.wordpress.com Š or check out my Google+ profile https://plus.google.com/102718274791889610666/posts http://spinn3r.com -- Founder/CEO Spinn3r.com Location: *San Francisco, CA* blog: http://burtonator.wordpress.com Š or check out my Google+ profile https://plus.google.com/102718274791889610666/posts http://spinn3r.com - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Tell maven to not have the parent pom as a dependency?
Thanks… I just want to bump the version number on the release. I was using the auto increment fork of the versions number to make it easier… but I can use the versions plugin manually. I mean the general use case is I have about 20 modules and mildly complex inheritance and I don’t want to have to update 30-40 places when I bump a version number :-( On Fri, Sep 12, 2014 at 10:22 AM, Puncel, Robert (393J) robert.pun...@jpl.nasa.gov wrote: You mentioned you were using the versions plugin and it wasn¹t working- did you use it before? Can you describe your use case in terms of the command line you are using, and what versions you want to upgrade? On 9/12/14, 10:16 AM, Kevin Burton bur...@spinn3r.com wrote: OKŠ so this definitely works and the aggregation model compiles my module. But I need a way to bump the version number because I have complex dependencies and updating 10 places every time I change the project version isn¹t going to be fun. On Fri, Sep 12, 2014 at 10:03 AM, Kevin Burton bur...@spinn3r.com wrote: In other words, you can keep using your toplevel pom.xml as an _aggregator_ without it being the _parent_ of your OSS module. Ha. That works. But the versions plugin now won¹t update the version of the sub-moduleŠ This is super fun! :) On Fri, Sep 12, 2014 at 9:33 AM, Curtis Rueden ctrue...@wisc.edu wrote: Hi Kevin, I want to post this to a public repoŠ it¹s open source. The problem is that the parent module is not OSS. Child modules of a multi-module build do not need to use the toplevel module as parent. In other words, you can keep using your toplevel pom.xml as an _aggregator_ without it being the _parent_ of your OSS module. http://rostislav-matl.blogspot.com/2011/12/maven-aggregator-vs-parent.ht ml Regards, Curtis On Thu, Sep 11, 2014 at 10:25 PM, Kevin Burton bur...@spinn3r.com wrote: I have an OSS module in a multi-module maven project. I want to post this to a public repoŠ it¹s open source. The problem is that the parent module is not OSS. When I setup a dependency it pulls in my OSS module just fine, but then it tries to pull down the parent module, which isn¹t in the repo, and breaks. The parent pom isn¹t really a dependencyŠ so I¹d like it to not need it is this possible? -- Founder/CEO Spinn3r.com Location: *San Francisco, CA* blog: http://burtonator.wordpress.com Š or check out my Google+ profile https://plus.google.com/102718274791889610666/posts http://spinn3r.com -- Founder/CEO Spinn3r.com Location: *San Francisco, CA* blog: http://burtonator.wordpress.com Š or check out my Google+ profile https://plus.google.com/102718274791889610666/posts http://spinn3r.com -- Founder/CEO Spinn3r.com Location: *San Francisco, CA* blog: http://burtonator.wordpress.com Š or check out my Google+ profile https://plus.google.com/102718274791889610666/posts http://spinn3r.com - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org -- Founder/CEO Spinn3r.com Location: *San Francisco, CA* blog: http://burtonator.wordpress.com … or check out my Google+ profile https://plus.google.com/102718274791889610666/posts http://spinn3r.com
Re: Tell maven to not have the parent pom as a dependency?
On 13 September 2014 02:46, Kevin Burton bur...@spinn3r.com wrote: OK… so this definitely works and the aggregation model compiles my module. But I need a way to bump the version number because I have complex dependencies and updating 10 places every time I change the project version isn’t going to be fun. If you have 10 places where the dependencies need changing you are doing it wrong. You should have zero version definitions in your modules. All version definitions are in the topmost parent pom in the dependencyManagement section. If you have a bunch of things that share versions, you can also create a property and then use something like ${mygroup.version} so that you only need to update the property section once. Have you read the freely available Maven books? It's been long while since I've read them but I think this advice is in there.
Tell maven to not have the parent pom as a dependency?
I have an OSS module in a multi-module maven project. I want to post this to a public repo… it’s open source. The problem is that the parent module is not OSS. When I setup a dependency it pulls in my OSS module just fine, but then it tries to pull down the parent module, which isn’t in the repo, and breaks. The parent pom isn’t really a dependency… so I’d like it to not need it is this possible? -- Founder/CEO Spinn3r.com Location: *San Francisco, CA* blog: http://burtonator.wordpress.com … or check out my Google+ profile https://plus.google.com/102718274791889610666/posts http://spinn3r.com
Re: Tell maven to not have the parent pom as a dependency?
Move it out as a stand alone project. -D On Thu, Sep 11, 2014 at 8:25 PM, Kevin Burton bur...@spinn3r.com wrote: I have an OSS module in a multi-module maven project. I want to post this to a public repo… it’s open source. The problem is that the parent module is not OSS. When I setup a dependency it pulls in my OSS module just fine, but then it tries to pull down the parent module, which isn’t in the repo, and breaks. The parent pom isn’t really a dependency… so I’d like it to not need it is this possible? -- Founder/CEO Spinn3r.com Location: *San Francisco, CA* blog: http://burtonator.wordpress.com … or check out my Google+ profile https://plus.google.com/102718274791889610666/posts http://spinn3r.com
Re: Tell maven to not have the parent pom as a dependency?
On 12 September 2014 12:55, Kevin Burton bur...@spinn3r.com wrote: I have an OSS module in a multi-module maven project. I want to post this to a public repo… it’s open source. The problem is that the parent module is not OSS. When I setup a dependency it pulls in my OSS module just fine, but then it tries to pull down the parent module, which isn’t in the repo, and breaks. The parent pom isn’t really a dependency… so I’d like it to not need it is this possible? As Dan says, make it a stand alone project. i.e. Dont make it a module. Being a module has a special meaning - treat this as part of a bigger whole. It also help with syntatic sugar by allowing you to run one command at the top and have it propogate into all the modules. To be complete a module has nothing to do with dependencies or dependency management. The reason your OSS module is pulling in the parent is not because of dependency, but because of inheritance of the parent hierarchy. Usually all modules are released together and will share version identifiers. If they are released independently then you normally wont make them modules, and their version identifiers can do their own thing. There is a recent post Maintaining versions in a multi-module project that Stephen answers, you might also want to search the archives on this topic as well. A parent pom can be used in two ways; 1) to share common information i.e. inheritance 2) keep related artifacts together to make working on a bug that traverses artifacts easier i.e aggregation In your case I dont think you need to use aggregation, you just need to pull out the OSS artifact into its own stand alone location and then include it as a normal dependency in your non-OSS project. If you find that you are also fixing bugs in the OSS project at the same time you are working on the non-OSS one, then you might want to create an aggregate pom that has two modules (one OSS, the other non-OSS) so that you can run maven commands in one place against both projects. Stephen Connolly has some stuff somewhere about that I think. The freely availble Maven books might also go into this in more detail, but it tends to be a more advanced feature not well described. Cheers Barrie