logo separator

[mkgmap-dev] Eclipse

From Brian Egge brianegge at gmail.com on Mon Oct 27 03:32:50 GMT 2014

Hi Gerd,

The process for Eclipse should be:
1) checkout the source with an svn client, or use the subclipse plugin
2) Install IvyDE plugin (one time) OR manually configure your classpath
after loading the project
3) Add 'Existing Java Project'

If you are running from Eclipse with IvyDE, you should not need to run the
'ant resolve' step. If you have both Subclipse and IvyDE installed, you
should be able to start work on an existing project just by adding the SVN
url.

Regarding the settings, my workspace default was not Java 1.7. This
required setting project specific settings. Eclipse doesn't let you just
set one project specific setting though, hence it makes a copy of all the
other existing defaults. For projects with multiple Eclipse developers,
it's usually a net benefit for everyone to be using the same set of
settings. Half because it avoid compile problems, and half because it keeps
the styles in sync. For example, you don't want some developers saving
files with encoding CP-1251 and others saving UTF-8.

With the current state of Eclipse, it took me several hours before I had a
build with no compile errors. I'm hoping the patch might save someone else
a bit of time with a new Eclipse setup.

Brian



On Sun Oct 26 2014 at 7:21:31 AM Gerd Petermann <
gpetermann_muenchen at hotmail.com> wrote:

>  Hi Brian,
>
> I played a little bit with the IvyDE plugin. It seems to work well :-)
> Up to now I've always used the "Java Project from Existing Ant Buildfile"
> wizard,
> which is not working that well.
>
> If I got that right, the workflow to start the mkgmap project in Eclipse
> is this:
> - svn checkout mkgmap
> - run "ant resolve"
> - use New|Java Project and specify either the project name (if mkgmap
> sources are
> in the Eclipse workplace, or the path to the project.
>
> I don't know if this is the common way to do it, maybe
> it should be documented in a README.ECLIPSE ?
>
> I am not so sure about the files in .settings
> If I got you right these are meant to set the 1.7 source, but
> they also override diverse other Eclipse settings, e.g. the levels
> of compiler warnings. Is this intended?
>
> Gerd
>
>
> ------------------------------
> From: brianegge at gmail.com
> Date: Fri, 24 Oct 2014 21:49:20 -0400
>
> To: mkgmap-dev at lists.mkgmap.org.uk
> Subject: Re: [mkgmap-dev] Eclipse
>
> Hi Gerd,
>
> When I run ‘ant resolve’, it downloads and places splitter.jar in
> './lib/optional/splitter-412.jar’. To use the jar in Eclipse, you can
> either add it to your classpath or use the IvyDE library. In the patch I
> made a reference to the IvyDE, but this only works if you have the plugin
> installed. In Eclipse, my path looks like this:
>
>
> When I use Eclipse, I let it create it’s workspace in it’s default
> location. I keep all my projects in a completely different area and then
> create references to them in Eclipse.
> If I have multiple branches of a project, I can open them all in the same
> workspace.
>
> It’s not clear to me how your Eclipse is referencing the jars downloaded
> from the ‘ant resolve’ phase.
>
> If it’s simply the .classpath change that is causing difficultly, I’m
> happy to submit a patch without it. I usually don’t keep the .classpath
> under version control anyway.
>
> Brian
>
>
> On Oct 24, 2014, at 4:30 AM, Gerd Petermann <
> gpetermann_muenchen at hotmail.com> wrote:
>
> Hi Brian,
>
> I am not sure how to test this patch because my experience with Eclipse is
> poor.
> I did this:
> - rename my workingd directory d:\eclipse_workspace to
> d:\eclipse_workspace_save
> - create new dir d:\eclipse_workspace
> - checkout mkgmap r3337 to d:\eclipse_workspace\mkgmap-p
> - run ant resolve in that directory
> - start Eclipse, switch to the (empty) workspace and use File|New to add
> project with name mkgmap-p
>
> I expected to get a working version of mkgmap with that procedure, but it
> seems
> that a reference to splitter.jar is missing and
> "uk/me/parabola/mkgmap/reader/dem/optional/" is not marked optional.
>
> I understand the changes in .classpath regarding the jar files, but not
> the rest.
> What changes should I expect?
>
> I am not sure how to handle the dependency on splitter. I think it is okay
> to use the
> jar file and not the splitter sources as long as one doesn't want to
> change the splitter
> sources. I am not sure that the download link will work in the future.
> Regarding the required splitter version: It is much older, don't know if
> that could be important?
>
> Reg. Ecplipse itself: From time to time I try newer releases, e.g. I tried
> Keppler and also Luna 4.4.0 and
> moved back to Juno because something regarding debugging did not work
> (sorry, forgot the details :-(  )
>
> Gerd
>
> > From: brianegge at gmail.com
> > Date: Thu, 23 Oct 2014 23:17:13 -0400
> > To: mkgmap-dev at lists.mkgmap.org.uk
> > Subject: Re: [mkgmap-dev] Eclipse
> >
> > Hello,
> >
> > I’m using Eclipse Luna Service Release 1 (4.4.1) Build id: 20140925-1800
> on OS X 10.10. I don’t think my changes make any difference to where you
> keep your working directory or source, or how you organize your workspace.
> What specific part of the patch do you think would break your eclipse
> setup? Can you apply the patch and identify any issues?
> >
> > I don’t have splitter checked out, so I added any ivy dependency to
> download it. If you have splitter in your workspace you can give that
> priority over ivy.
> >
> > Brian
> >
> >
> > > On Oct 23, 2014, at 3:22 PM, WanMil <wmgcnfg at web.de> wrote:
> > >
> > > Hi Brian, hi Gerd,
> > >
> > > just my two cents:
> > >
> > > I use Eclipse in the following way:
> > > I use one workspace (e.g. c:\workspace).
> > > I'll checkout the projects to this workspace named mkgmap_trunk,
> splitter_trunk etc. After checking out I run the ant target "resolve"
> within eclipse. After that the workspace is completely ready.
> > >
> > > When I want to implement a new feature or I want to try an older
> revision I checkout mkgmap into another directory below c:\workspace and
> run the ant script with "resolve".
> > >
> > > In my mkgmap start scripts I define the directory below the workspace,
> e.g. MKGMAP_DIR=c:\workspace\mkgmap and use this variable in the startup
> call.
> > > It would also be possible to run ant dist first and define the dist
> directory in the workspace as mkgmap directory.
> > >
> > > This makes it easy to switch between different versions and
> development variants.
> > >
> > > WanMil
> > >
> > >
> > >> Hi Brian,
> > >>
> > >> thanks for the patch.
> > >>
> > >> I agree that you can't use the current source in eclipse without
> manual
> > >> work.
> > >> When I started with mkgmap and splitter I also started using eclipse
> > >> (and coding in Java), so
> > >> I did more or less the same you did, but I did not dare to say that my
> > >> solution is "correct", probably it is far away from being a good
> solution.
> > >>
> > >> I am not sure if my environment will continue to work with your patch.
> > >>
> > >> 1) My current environment looks like this:
> > >> - I am using Eclipse "Version: Juno Service Release 2 Build id:
> > >> 20130225-0426" on a Windows 7 64 bit machine
> > >> - I have one directory called d:\eclipse_workspace containing sub
> > >> directories mkgmap, splitter, display and others
> > >> for each project
> > >> - the source directories are located in d:\mkgmap or d:\splitter
> > >>
> > >> 2) When I try to reproduce problems in older mkgmap releases I close
> > >> Eclipse, rename e.g. d:\mkgmp to d:\mkgmap_trunk
> > >> and do a svn checkout of the wanted sources to d:\mkgmap. Next I use
> ant
> > >> dist to build.
> > >> After that I start Eclipse and do a refresh for the whole mkgmap
> > >> project, maybe also a clean.
> > >> Sometimes I have to repeat the ant dist and refresh to be able to
> debug
> > >> mkgmap in Eclipse.
> > >>
> > >> Depending on the release of mkgmap that I am compiling I have to
> modify
> > >> the names of libraries.
> > >>
> > >> If I got it right, you suggest to use the source directory (e.g.
> > >> d:\mkgmap in my case) also as working directory for Eclipse?
> > >>
> > >> Gerd
> > >>
> > >>
> ------------------------------------------------------------------------
> > >> From: brianegge at gmail.com
> > >> Date: Wed, 22 Oct 2014 23:30:18 -0400
> > >> To: mkgmap-dev at lists.mkgmap.org.uk
> > >> Subject: [mkgmap-dev] Eclipse
> > >>
> > >> Hello,
> > >>
> > >> I’ve recently downloaded the mkgmap source. I had no trouble compiling
> > >> it with ant, but getting Eclipse to work took some effort. I’ve
> attached
> > >> a patch file containing changes for Eclipse.
> > >>
> > >> The specific changes are:
> > >> * update classpath to find current version of jars
> > >> * add ivyde settings
> > >> * add Eclipse setting file to specify source=1.7
> > >> * add splitter to ivy to compile ‘optional’ bit
> > >> * update URL of opengeo ivy repository
> > >> * add bin/tmp to ignore list
> > >>
> > >> I see there is a git copy of this project, but it appears all commits
> > >> are going through svn. I’d prefer to create a pull request on github
> > >> than to attach a patch file, but am happy to do whatever works.
> > >>
> > >> Attached is the patch file for review and merging to
> > >> http://svn.mkgmap.org.uk/mkgmap/trunk.
> > >>
> > >>
> > >>
> > >> Regards,
> > >> Brian
> > >>
> > >> _______________________________________________ mkgmap-dev mailing
> list
> > >> mkgmap-dev at lists.mkgmap.org.uk
> > >> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
> > >>
> > >>
> > >> _______________________________________________
> > >> mkgmap-dev mailing list
> > >> mkgmap-dev at lists.mkgmap.org.uk
> > >> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
> > >>
> > >
> > > _______________________________________________
> > > mkgmap-dev mailing list
> > > mkgmap-dev at lists.mkgmap.org.uk
> > > http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
> >
> > _______________________________________________
> > mkgmap-dev mailing list
> > mkgmap-dev at lists.mkgmap.org.uk
> > http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
>  _______________________________________________
> mkgmap-dev mailing list
> mkgmap-dev at lists.mkgmap.org.uk
> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
>
>
>
> _______________________________________________ mkgmap-dev mailing list
> mkgmap-dev at lists.mkgmap.org.uk
> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
> _______________________________________________
> mkgmap-dev mailing list
> mkgmap-dev at lists.mkgmap.org.uk
> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20141027/84e527c0/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PastedGraphic-1.png
Type: image/png
Size: 177151 bytes
Desc: not available
URL: <http://www.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20141027/84e527c0/attachment-0004.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PastedGraphic-2.png
Type: image/png
Size: 45328 bytes
Desc: not available
URL: <http://www.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20141027/84e527c0/attachment-0005.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PastedGraphic-2.png
Type: image/png
Size: 45328 bytes
Desc: not available
URL: <http://www.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20141027/84e527c0/attachment-0006.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PastedGraphic-1.png
Type: image/png
Size: 177151 bytes
Desc: not available
URL: <http://www.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20141027/84e527c0/attachment-0007.png>


More information about the mkgmap-dev mailing list