Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [m2e-users] Creating and editing a parent POM in the workspace directory?

> -----Original Message-----
> From: m2e-users-bounces@xxxxxxxxxxx [mailto:m2e-users-
> bounces@xxxxxxxxxxx] On Behalf Of Steinar Bang
> Sent: Tuesday, September 25, 2012 3:28 PM
> To: m2e-users@xxxxxxxxxxx
> Subject: [m2e-users] Creating and editing a parent POM in the workspace
> directory?
> 
> Platform: debian testing ("wheezy"),
>           eclipse 3.8.0,
>           m2e 0.12.1.20110112-1712 (installed from
> http://m2eclipse.sonatype.org/sites/m2e )
> 
> The natural thing for maven projects in a workspace, would be to have a
> parent POM in the workspace itself.
> 
> Is there a way to create and maintain a pom.xml file in the workspace
> directory, using m2e?  And if so: from which version?

If you want to resolve to a pom in the workspace, you have to have a project that contains that pom.  You simply have to have a project with a single file, being that pom file.

> Here is what I've found out:
> If there is a parent POM in the workspace directory, when you create a
> new maven project, the parent POM will be used in the new project, and
> the new project will become a module in the parent POM.
> 
> But there is not (at least I haven't found) any way to create the
> parent
> POM from inside m2e or eclipse...?  Is there a way to do this in newer
> versions of m2e?
> 
> Also, opening the parent POM from the m2e POM editor on the pom.xml
> file
> of the project, won't work.  You get a dialog saying "Could not resolve
> artifact".
> 
> Presumably this means that you could see the parent POM if you haved
> done "mvn install" in the workspace to install that POM in your local
> repository...?  But even if you could open the parent POM in that case,
> you would be editing the wrong POM (a copy, not the original file).
> 
> The eGit explorer will let you open the workspace pom.xml file in an
> editor (which by default is the m2e POM editor).  But the eGit explorer
> won't let you create a pom.xml file if there isn't any there.
> 
> Neither the Project Explorer nor any of the other explorers that relate
> to workspace and projects, will let you see anything in the workspace
> itself.
> 
> Thanks!
> 
> 
> - Steinar
> 
> _______________________________________________
> m2e-users mailing list
> m2e-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/m2e-users


Back to the top