开发者

Can maven-2 help me create Java client-server app?

I am Java and Maven newbie and I want to create a simple client and server app in Java which will communicate trough sockets.

I read a little about Maven, and I managed to create Hello World example using:

 mvn archetype:generate -DgroupId=com.mycompany.app -DartifactId=my-app -DarchetypeArtifactId=maven-archetype-quickstart -D开发者_如何学JAVAinteractiveMode=false

But I was wondering, can I do more with Maven? I already found some Java examples to help me, but I am wondering can Maven help me with this? (like creating a skeleton for client-server project).


Such an application is nothing more than a multi-modules project and there is no other archetype than the maven-archetype-quickstart to create this kind of setup. The steps would involve:

  • create a parent project with the maven-archetype-quickstart
  • cd into the parent project directory
    • edit the pom.xml to change the packaging from jar to pom
    • remove the src directory
  • create a client project from the parent directory with the maven-archetype-quickstart
  • create a server project from the parent directory with the maven-archetype-quickstart


Tools like Maven don't read minds.

There are frameworks to help with creating web CRUD apps, like Grails and Spring Roo. I'm not aware of anything at the raw socket level.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜