Matt Conroy

My NoLedge

  • Home

4

Apr

Compiling an Apache Maven Project

Posted by admin  Published in Java

Compiling a Maven project was pretty darn easy. You simply run the command mvn compile. This command tells maven to compile the source code into classes. The classes end up in the target/classes dir and target/test-classes dir.

Running mvn package will build a jar of the project. The version used in the jar name is contained inside the main level pom.xml.

pom.xml


   xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
4.0.0
com.mattconroy.project
TestProject
jar   1.0-SNAPSHOT
TestProject
http://maven.apache.org


junit
junit
3.8.1
test


Notice the tag sets the jar version name.

So what does this buy us? We can now install our built component into a local or remote respository for use in other projects or run the program to do some business logic. Obviously we are far from having a complete product since we are missing libraries and other meta data needed to have a easily maintainable project, but this gives us a template to build off of.

no comment

4

Apr

Creating an Apache Maven Project

Posted by admin  Published in Java

Well, I am finally taking the plunge into Apache Maven. I have found that managing dependencies is becoming unbearable and Maven is being used by several open source project that I use so… Here I go, one step at a time.

My first question was obvious: How do I create a new Maven project?

After a few minutes of searching I ended up on the Maven website reading the ‘Getting Started‘ faq and found the very cryptic command on starting a project.

mvn archetype:create -DgroupId=com.mattconroy.project -DartificatId=TestProject

After running the above command I ended up with a directory structure that is suppose to magically work to build and maintain a project. Well, we’ll see.

The structure of the project:

TestProject
- pom.xml
- src
- main
- java
- com/mattconroy/project
- App.java
- test
- java
- com/mattconroy/project
- AppTest.java

So this makes sense… One directory for program code and another for program unit tests. I can live with this.

no comment

10

Mar

Goofy Flash Javascript Movie

Posted by admin  Published in Dinking Around

A friend of mine finds things like this all the time. Watch this silent movie. Very witty!

http://users.telenet.be/kixx/

no comment

30

Nov

Quick Kid Match Game in Java

Posted by admin  Published in Dinking Around

This is the source code for a quick color matching game I wrote for fun.
It is very rough, but does demonstrate some examples of using full screen windows.
If you have any questions send me an email. See Java Source Code

no comment

Categories

  • Apache
  • Cool Sites
  • Deterministic Finite Automata
  • Dinking Around
  • Games
  • Java
  • Linux
  • PHP
  • Uncategorized

Recent Posts

  • Multi Factor Security Review
  • Compiling an Apache Maven Project
  • Creating an Apache Maven Project
  • Hello to the World!
  • Arts and Crafts and Other Fun Stuff

Blogroll

  • Rogie King

Links

  • Conroy.cc
  • Kauffman Lane Design
  • Linked IN profile
  • Student Assistance Foundation
  • Twitter

Recent Entries

  • Multi Factor Security Review
  • Compiling an Apache Maven Project
  • Creating an Apache Maven Project
  • Hello to the World!
  • Arts and Crafts and Other Fun Stuff
  • Goofy Flash Javascript Movie
  • Installing SSH on Ubuntu 7.04
  • Regular Grammar Help
  • Finding Large Files Linux
  • VSFTP Users without access to a shell cannot log in

Recent Comments

  • bank online in Multi Factor Security Review
  • Bharat Nair in Multi Factor Security Review
  • Molly in Hello to the World!
  • Molly in Hello to the World!
  • Molly in Hello to the World!
  • Molly in Arts and Crafts and Other Fun Stuff
  • Random Selection of Posts

    • One of the coolest Java/Flash games ever.
    • Hello World PHP
    • Regular Grammar Help
    • Arts and Crafts and Other Fun Stuff
    • Quick Kid Match Game in Java
    • Creating an Apache Maven Project
    • Finding Large Files Linux
© 2008 Matt Conroy is proudly powered by WordPress
Theme designed by Roam2Rome