A playground Maven Scala/Java project
The idea is to create a simple boilerplate project/template to simplify the creation of new project with cross-compilation of both Java and Scala code.
NOTE: sbt already handle the cross-compilation by default, no matter if the maven conventions are used.
$ mvn install
- refactorization
- add examples of test using JUnit and ScalaTest
- move the archetype creation idea in a specific folder / project module
- think about publishing the artifact somewhere in order to use the option
-DarchetypeRepository=http://host/maven/repository/
- creating the archetype
$ mvn archetype:create-from-project
- local publishing of the the archetype
$ cd target/generated-sources/archetype/
$ mvn install
$ mvn -B archetype:generate \
-DarchetypeGroupId=it.seralf.development \
-DarchetypeArtifactId=maven-scala-java-archetype \
-DarchetypeVersion=0.0.2 \
-DgroupId=it.seralf.examples \
-DartifactId=example-app \
-Dpackage=it.seralf.development.example
$ mvn -B archetype:generate -DarchetypeGroupId=it.seralf.development -DarchetypeArtifactId=maven-scala-java-archetype -DarchetypeVersion=0.0.2 -DgroupId=it.seralf.web -DartifactId=webask -Dpackage=it.seralf.webask
There is also a small, simple script:
./mvn_create.sh groupId artifactId package