Skip to content
/ maven-scala-java Public template

A playground project for Scala / Java development with Maven

License

Notifications You must be signed in to change notification settings

seralf/maven-scala-java

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

maven-scala-java

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.


local installation

$ mvn install

TODO

  • 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 a maven archetype

  1. creating the archetype
$ mvn archetype:create-from-project
  1. local publishing of the the archetype
$ cd target/generated-sources/archetype/
$ mvn install

example: creating a new project, based on the local archetype

$ 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

About

A playground project for Scala / Java development with Maven

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published