Re: Need help.. How to configure POM for multi-module checkout

2019-03-25 Thread garym
Yeah,  that's a good idea... 

On 2019/03/24 14:38:25, Kyle Marek  wrote: 
> You can arbitrarily switch to other tags and branches with submodules.
> It is just a simple `git checkout X` from the submodule's directory.
> 
> -Kyle
> 
> On 3/24/19 9:51 AM, ga...@oedata.com wrote:
> > Hi Nick,
> >
> > Thank you for that suggestion. That was also suggested on stackoverflow by 
> > Karl. That method is better suited for static-ish configurations.   I need 
> > a BOM type system where I can dynamically switch between tags and branches 
> > for different modules, much like clear case.  I'll be moving to a different 
> > structure and tool chain in 6 months.
> >
> > cheer
> >
> > On 2019/03/24 01:45:50, Kyle Marek  wrote: 
> >> Not sure that it will help with version number matches, but you could
> >> also use Git submodules to bring multiple repositories together in a
> >> single tree.
> >>
> >> See: https://git-scm.com/book/en/v2/Git-Tools-Submodules
> >>
> >> On 3/23/19 9:26 PM, ga...@oedata.com wrote:
> >>> Hi Karl,
> >>>
> >>> Thank you for replying on mail server. and thanks for sending me the 
> >>> links to you project poms. They look awesome.
> >>>
> >>> The is a difference between your projects and my situation. Your projects 
> >>> all the modules reside in the same repository. In my case, they reside in 
> >>> different repositories.  
> >>>
> >>> I elected to use the scm plugin because it allows me to select branches 
> >>> and tags, based on the project and development requirements. I didn't 
> >>> suspect reactor would check for poms before executing the life cycle. 
> >>>
> >>> I'm sure this has been solved  by someone in the past. I just don't know 
> >>> how to solve it using maven. I can solve it with a bunch of execute 
> >>> blocks, but that is very ugly. I'm going to look at the release plugin 
> >>> and a few others
> >>>
> >>> It's likely I'm using the wrong plugin or I'm missing a plugin. 
> >>>
> >>> BTW, I like your iterator plugin 
> >>>
> >>> cheers
> >>> gary
> >>>
> >>>
> >>>
> >>>
> >>> On 2019/03/23 23:56:48, Karl Heinz Marbaise  wrote: 
>  Hi,
> 
>  I will give you the same answer as on StackOverflow.
> 
>  The way you are going sounds wrong...
> 
>  As I already suggested is the way to go creating a multi module build
>  which comprises of several modules which is located within a single Git
>  repository. this can be build by using a single command.
> 
> 
>  mvn clean package
> 
>  from the root location..
> 
>  https://github.com/khmarbaise/javaee
>  https://github.com/khmarbaise/supose
> 
>  Kind regards
>  Karl Heinz Marbaise
> 
>  On 24.03.19 00:35, Gary M wrote:
> > Hi,
> >
> > I need some help with scm checking out multiple modules and building 
> > them.
> > I have several projects I'm consolidating into  a single jar.  Reactor
> > checks for module poms before generate-sources executes.
> >
> > How do I fix this issue ?
> >
> > thanks..
> > g
> >
> > POM sample to give you an idea of what I've done.
> >
> >  
> >org.apache.maven.plugins
> >maven-scm-plugin
> >1.9.4
> >
> >  
> >mod-1
> >generate-sources
> >
> >  ${mod-1.url}
> >  ${mod-1.versionType}
> >  ${mod-1.version}
> >  ${mod-1.directory}
> >
> >
> >  checkout
> >
> >  
> >  
> >mod-2
> >generate-sources
> >
> >  ${mod-2.url}
> >  ${mod-2.versionType}
> >  ${mod-2.version}
> >  ${mod-2.directory}
> >
> >
> >  checkout
> >
> >  
> >
> >
> > .
> >
> > 
> >
>  -
>  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
> 
> 

-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: A import B and B should import A where it is included

2019-03-25 Thread Anthony Whitford
You can specify a dependency version using an expression like this:  
${project.version}

${project.version} refers to the POM’s project/version value.

Note that you can declare project properties, and use those in expressions too. 
 See this for more details:
 - 
https://books.sonatype.com/mvnref-book/reference/resource-filtering-sect-properties.html
 



Having said that…. It sounds like you have a chicken-egg problem and that 
really needs to be fixed.  While Maven certainly supports dynamic dependency 
management, it will highlight and prevent poor software engineering practices 
such as cyclic dependencies.  You will discover that even if you can get a 
cyclic build working, the release process will be broken.  And, you will 
undoubtedly run into build race conditions and other bad things.

So, you need to figure out how to isolate the common dependencies into a third 
library to break the cyclic dependency.  Instead of something like this:
 -  A depends on B, B depends on A (BAD!)
How about:
 -  A depends on C, B depends on C (OK!)

C may be just Interfaces — maybe no implementation.
Your Tess can depend on A — but A should not depend on the Tests — it defeats 
the value of isolating the Tests.


Hope this helps,

Anthony


> On Mar 25, 2019, at 11:28 AM, Philipp Kraus  
> wrote:
> 
> Hello,
> 
> I am building an additional testing framework for my framework. I now have 
> the following cyclic import of the dependencies "MyFramework imports 
> MyTestingFramework" and "MyTestingFramework imports MyFramework".
> For example, if MyFramework is version 0.2.1-SNAPSHOT, then 
> MyTestingFramework should use the version 0.2.1-SNAPSHOT. Is there a way to 
> get the dependency dynamically?
> 
> I hope it was understandable
> Thanks a lot
> 
> Phil
> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
> 



A import B and B should import A where it is included

2019-03-25 Thread Philipp Kraus
Hello,

I am building an additional testing framework for my framework. I now have the 
following cyclic import of the dependencies "MyFramework imports 
MyTestingFramework" and "MyTestingFramework imports MyFramework".
For example, if MyFramework is version 0.2.1-SNAPSHOT, then MyTestingFramework 
should use the version 0.2.1-SNAPSHOT. Is there a way to get the dependency 
dynamically?

I hope it was understandable
Thanks a lot

Phil


-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org