Tuesday, February 3, 2015

Learning Ant

I understand that there are probably many problems with the way I have my project set up. One of these is that, there are multiple project that are dependent of each other (This is not by itself a problem), but rather than referencing the actual project, I have to export it to a jar, and put it in my tomcat lib folder (this is the part that I believe is probably not ideal). This ofter involves me realizing I forgot to run eclipse as an adminstrator, and having to restart the program. After this happening one to many times I decided to try find a way to automate my build process, and copy the files for me. And so I found Ant.

I had seen Ant as an option in eclipse, but I never new anything about it. When I was searching for a solution to my problem though, it looked as though Ant is what I needed so I decided to try to learn what it can do. I was able to use a tutorial I found here, To get a pretty basic understanding of how to use a basic ant script to build a library. That was all I needed to do for my base projects, that doesn't depend on any of my other projects, but for the ones that depended on it, I had to do a little extra searching to figure out how to copy a file (the *.jar), to my lib folder. The answer was just a copy tag, with a fileset child, i.e.
   <copy todir="${lib.dir}">
      <fileset dir="${util.dir}">
   </fileset>
    </copy>

After writting one of these for each of my projects, I began looking into how to get the all to run at once. It looked like it was just a matter of referencing the other Ant files I wanted to run, and giving them dependencies on each other so they run in the correct order. But then I realized that they are run in the directory of the first file, so the relative paths were incorrect. I spent a little time looking for how to do an equivilent of cd, but most sites said I shouldn't need to. So I believe this is another instance were the structure of my project is causing some problems. I also at that point saw some people recomending using Maven instead of Ant. I think I will make do with multiple ant files for now, but if I ever decided that that is to much of a hassle as well, I fill start looking into trying to learn the basics of Maven as well.

I think my next step will be to add Google Authentication to my application, so that I can give users different levels of access to various features.

Friday, January 9, 2015

Finally done with the setup

I was finishing getting my rasp pi, and by using the walkthrough here: http://www.git-scm.com/book/en/v2/Git-on-the-Server-Setting-Up-the-Server, I was able to get the server set up how I needed. I did run into a little difficulty, because I am using a Windows, rather than linux as my client. Since I don't currently understand Git as well as tfs or svn, I decided to learn a little more, before looking into getting a third party GUI, so to start I had to learn Git GUI which was included with the Git install. after running the program, I used it to create a New Repository in the folders that I wanted to add, commit the files, and then push the local repository to the bare one that I had set up on the raspberry pi. I chose accidentally chose to have Git use open ssh rather than putty, which is what I normally use, and I was unable to import the existing rsa key from putty to the Git GUI, so I had to generate a new one.

After getting that set up, I decided to look into integration with Eclipse, as that is the IDE I use when developing in Java. I found Egit pretty quickly, and was able to get it set up with very minimal problems. At that point I was able to get back to writting my code. The first thing I started doing was writing methods to act as linq equivilents. I'll talk about that more next time.