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 thepackaging
fromjar
topom
- remove the
src
directory
- edit the
- 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.
精彩评论