Matthew Murdock
Matthew Murdock

Reputation: 761

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 -DinteractiveMode=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).

Upvotes: 2

Views: 1570

Answers (2)

Pascal Thivent
Pascal Thivent

Reputation: 570615

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

Upvotes: 2

duffymo
duffymo

Reputation: 309008

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.

Upvotes: 0

Related Questions