views:

517

answers:

3

I was trying to start new swing application using maven 2 so I started searching on maven documentation but (frustratingly) found no clue so I'm asking:

  • what is the archtype used?
  • what are the dependances?
  • how to build swing app in maven [is there is plugin to do so ]?
A: 

Check these links if you have problems finding documentation about maven Better builds with Maven and Maven: The Definitive Guide. Then you will figure out that you can build any kind of app like swing using maven. Maven is not a framework is project management and comprehension tool.

javier
A: 

Basically, if you are only using Swing (I mean if you do not want additional features such as SwingX for example), then you will not need to add specific information in your pom.xml file, as everything needed for Swing development is already embedded in the JDK.

Concerning the build process, there is also nothing specific additions here. However, you may need be interesed in:

romaintaz
+2  A: 
  • what is the archetype used?

A swing application is a standard JAR so just use the standard archetype:

mvn archetype:generate -DgroupId=com.mycompany.app \
                       -DartifactId=myswingapp     \
                       -Dversion=1.0-SNAPSHOT
  • what are the dependencies?

If you plan to use the standard Swing API only, there aren't no extra dependencies to declare. But if you want to use things like JGoodies, MiGLayout, SwingX, Flamingo, SwingFX etc then you'll have to add the appropriate artifacts and repositories. But there is no universal answer to your question.

  • how to build swing app in maven [is there is plugin to do so ]?

A Swing app is not really particular. I would maybe just consider using Java Web Start (and the Maven Webstart plugin) or maybe a cross platform installer like IzPack (and the Maven IzPack Plugin). But you have time for that, you need an application before :)

Pascal Thivent
thanksthis was very helpful :)
Mustafa Zidan