maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stephen Connolly <stephen.alan.conno...@gmail.com>
Subject Re: Import Submodule into Maven Project in IntelliJ
Date Mon, 21 Mar 2016 09:24:33 GMT
I use local aggregator projects all the time to work on multiple loosely
related projects.

I will typically use <module>../../foo/bar</module> references

The parent tag will be left unmodufied

I use it also outside of the IDE as that lets me run maven without going as
far as the install phase which pollutes the local repo cache

On Sunday 20 March 2016, Jason Franklin <j_fra@fastmail.us> wrote:

> I decided to just go with the inelegant solution of building a new
> project and adding submodules into which I clicked and dragged the
> source code I needed. So the problem is solved.
>
> It looks like this in IDEA now:
>
> -- parent
>     -- sub-module 1
>     -- sub-module 2
>     -- etc.
>
> Perhaps I'm not using Maven in the spirit it was intended... I noticed
> in the POM reference that you can declare a parent project and, in the
> <module /> element, specify its aggregated projects with a relative
> pathname (meaning the modules don't need to be  subdirectories of the
> parent). Similarly, I saw that an inheriting pom.xml can use relative
> pathnames in its <parent /> element.
>
> So, it is possible to "relate" projects strongly without unifying them
> into a directory hierarchy of IDEA project files. Then, the user can
> import multiple projects that are then shown as a list in the project
> explorer. I was hoping that the IDEA Maven plugin would unify all of my
> projects for me when I declared the relationship. However, given the
> observation in the previous paragraph, there must be situations in which
> this behavior is undesirable. And, there are probably very few
> situations where this is really required given Maven's ability to relate
> projects with such flexibility.
>
> Maven by Example makes it seem as though the directory hierarchy for
> parent/submodule projects is highly desirable (if not required).
>
> Correct analysis?
>
> --
>   Jason Franklin
>   j_fra@fastmail.us <javascript:;>
>
> On Sun, Mar 20, 2016, at 07:00 AM, Jason van Zyl wrote:
> > I generally use Eclipse but I believe what you want is what’s referred to
> > a workspace in Eclipse. A graph of loosely related projects in the
> > workspace where you resolve against the version in your workspace as
> > opposed to resolving the dependency from the repository system. If I
> > recall there is a “+” button hidden in the Maven view that allows you to
> > add more Maven projects to a single workspace so that you don’t have to
> > make aggregrator POMs or have multiple windows open. I remember it being
> > extremely hard to find. If you can’t see it I’ll fire up IDEA and try to
> > put together an example.
> >
> > > On Mar 17, 2016, at 11:50 AM, Jason Franklin <j_fra@fastmail.us
> <javascript:;>> wrote:
> > >
> > > Greetings,
> > >
> > > I'm new to Maven, and I've taken the time over the past week to read
> > > "Maven by Example." I'm trying to join two independent projects as
> > > submodules in a third project serving as the parent project. Is there a
> > > way to create a parent project in IntelliJ and import two previously
> > > independent projects as submodules without simply moving the
> directories
> > > and changing the pom.xml files manually?
> > >
> > > --
> > >  Jason Franklin
> > >  j_fra@fastmail.us <javascript:;>
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> <javascript:;>
> > > For additional commands, e-mail: users-help@maven.apache.org
> <javascript:;>
> > >
> >
> > Thanks,
> >
> > Jason
> >
> > ----------------------------------------------------------
> > Jason van Zyl
> > Founder, Takari and Apache Maven
> > http://twitter.com/jvanzyl
> > http://twitter.com/takari_io
> > ---------------------------------------------------------
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> <javascript:;>
> > For additional commands, e-mail: users-help@maven.apache.org
> <javascript:;>
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org <javascript:;>
> For additional commands, e-mail: users-help@maven.apache.org
> <javascript:;>
>
>

-- 
Sent from my phone

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message