Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [m2e-users] How to correctly get a checked-out project to be a Maven Java project

> -----Original Message-----
> From: m2e-users-bounces@xxxxxxxxxxx [mailto:m2e-users-
> bounces@xxxxxxxxxxx] On Behalf Of Igor Fedorenko
> Sent: Monday, September 10, 2012 3:30 PM
> To: m2e-users@xxxxxxxxxxx
> Subject: Re: [m2e-users] How to correctly get a checked-out project to
> be a Maven Java project
> 
> 
> On 12-09-10 6:03 PM, KARR, DAVID wrote:
> >> -----Original Message-----
> >> From: m2e-users-bounces@xxxxxxxxxxx [mailto:m2e-users-
> >> bounces@xxxxxxxxxxx] On Behalf Of Igor Fedorenko
> >> Sent: Monday, September 10, 2012 2:31 PM
> >> To: m2e-users@xxxxxxxxxxx
> >> Subject: Re: [m2e-users] How to correctly get a checked-out project
> to
> >> be a Maven Java project
> >>
> >> Does everything work as expected if you checkout the project using
> >> command line svn client and then import it as existing maven project
> in
> >> workspace?
> >
> > That provided one trivial improvement and added one big defect and a
> smaller niggle.
> >
> > It automatically created the same .project file that was created when
> I made the first project a Maven project.
> >
> > However, even though I checked out the project from SVN, the imported
> project lost any knowledge of a mapping to SVN.
> >
> > Also, importing the project that way didn't let me give the project a
> different name from its pom artifact name, which I often need.
> >
> > Otherwise, it still left the project without knowledge of its java
> sources or dependencies.
> >
> 
> This proved that the problem is not specific to import from svn but
> some
> other more generic issue either with the project or with m2e
> installation. I will need a small standalone example I can use to
> reproduce the problem locally to say anything more specific.

I have an additional clue.  One of the flaws in this project I'm importing is that it specifies a parent version of LATEST, which is invalid (I didn't think this was valid at all, so that confuses me a bit).  It appears that when I try to update the project when this flaw is still in place, it appears to block registering the source trees.  If I first fix the version reference (to "1.0.0-SNAPSHOT") before doing the update, it correctly registers the source trees.

It's not clear to me whether it's a flaw that I need to update the project at all, but that's at least nicer than manually hacking the .classpath file.

> >> On 12-09-10 5:09 PM, KARR, DAVID wrote:
> >>> I'm trying to check out a project from our SVN repo that is a
> >> subfolder of a multi-module project.  A .project file wasn't stored
> in
> >> SVN, so when I checked it out, it created a new .project file that
> is
> >> almost empty.
> >>>
> >>> I need to figure out what correct steps I need to follow to get
> >> Eclipse to know it's a Maven project with Java source.
> >>>
> >>> I first tried the obvious, doing "Convert to Maven project".  That
> >> changes the .project file to use the Maven2 builder and nature.
> >>>
> >>> It still doesn't know I have Java source files, however.
> >>>
> >>> I then tried making it a "faceted" project, which allowed me to add
> >> the Java facet, which added the reference to the existing
> src/main/java
> >> and src/test/java trees.
> >>>
> >>> At this point, I still had numerous high-level compilation errors.
> >> Although it was now convinced it was a java project, it now
> apparently
> >> didn't know of its maven dependencies.  It didn't even seem like I
> >> could edit the Build Path to add "Maven Dependencies".  I couldn't
> >> figure out what "normal" step would work here.  I finally just
> opened
> >> up the .classpath file and manually added the incantation that I
> copied
> >> from an existing Maven project to define the
> >> "org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER" entry.
> >>>
> >>> That made all the redness go away.
> >>>
> >>> Is it supposed to be this hard?
> >>> _______________________________________________
> >>> m2e-users mailing list
> >>> m2e-users@xxxxxxxxxxx
> >>> https://dev.eclipse.org/mailman/listinfo/m2e-users
> >>>
> >> _______________________________________________
> >> m2e-users mailing list
> >> m2e-users@xxxxxxxxxxx
> >> https://dev.eclipse.org/mailman/listinfo/m2e-users
> > _______________________________________________
> > m2e-users mailing list
> > m2e-users@xxxxxxxxxxx
> > https://dev.eclipse.org/mailman/listinfo/m2e-users
> >
> _______________________________________________
> m2e-users mailing list
> m2e-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/m2e-users


Back to the top