How to create a swing application using maven?

前端 未结 3 1808
逝去的感伤
逝去的感伤 2020-12-29 05:38

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

  • what
3条回答
  •  执念已碎
    2020-12-29 06:21

    • 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 :)

提交回复
热议问题