Interfaces defining how a ViLLE-plugin project should work (vexer-model), some helpers that can be used to implement new exercise-types (vexer-helpers), stub-implementation of ville-exercise-system for testing exercise types (vexer-stub). Also a simple template exercise (vexer-template) and a simple ui for testing the stub (vexer-stub-demo).
For more information on ViLLE see ville.cs.utu.fi
Project is licensed under MIT-license (see LICENSE.txt).
- Install maven to your system ( http://maven.apache.org/users/index.html )
- On command line, navigate to the directory you want the ville-exercise-type project to be created in
- Decide which stub you begin developing on. 3.1. For the normal stub run:
mvn archetype:generate -DarchetypeGroupId=fi.utu.ville.exercises -DarchetypeArtifactId=vexer-archetype -DarchetypeVersion=0.3.21-RELEASE -DarchetypeRepository=https://ville.utu.fi/mvn/
3.2. For the Leveled stub run:
mvn archetype:generate -DarchetypeGroupId=fi.utu.ville.exercises -DarchetypeArtifactId=vexer-archetype-mathlayout -DarchetypeVersion=0.3.21-RELEASE -DarchetypeRepository=https://ville.utu.fi/mvn/
-
After a while you will be asked to provide some information, namely:
- groupId: you can use "fi.utu.ville.exercises"
- artifactId: you can use anything here when testing (eg. "testexer"); if you were to seriously start developing a new Ville-exercise, please contact VilleTeam to ensure that your artifactId is unique
- version: some version number ( the suggested 1.0-SNAPSHOT is fine)
- package: you can use "fi.utu.ville.exercises.'artifactId you used'"
- VilleJavaClassPrefix: if you for example used testexer for artifactId you can use TestExer here
-
Change working directory to the newly generated directory (named after 'artifactId you used')
-
Run:
mvn install
-
Change to "artifactId"-stub sub-directory
-
Run:
mvn jetty:run
-
After you see "[INFO] Started Jetty Server" Open a browser to address http://localhost:8080/
-
You should see Ville-Exercise Stub loaded with the newly generated exercise-type (if nothing shows, try refreshing the browser window)
-
Complete the steps in "give it a test run"
-
You'll find the Java source files for the generated Ville-exercise type in folder "installation dir"/"artifactId/"artifactId"/src/main/java
-
Compile the classes after you have made changes. Compiled .class files must go to "installation dir"/"artifactId"/"artifactId"/target/classes . You can do this (for example) by running:
mvn compile ( in dir "installation dir"/"artifactId"/"artifactId" )
-
The Jetty-server should be configured in such a way, that you can leave it running and it should pick up any changes after compilation of source files to .class files is done
-
Start using some IDE as this will definetely speed-up Java development
- To import the generated project to Eclipse you can use "File>Import>Existing Maven Projects", then select as root directory "installation dir"/"artifactId" and press "Finish"
- There are lots of resources on the internet on integrating Maven to different IDEs
- You can still leave Jetty running in the background, and it should pick up changes you make to Java-sources through an IDE once the IDE has compiled the sources
You can of course use any of your Maven and IDE -skills to set up the project in a different manner. A few points you should notice:
- Exercise types are at the moment looked automatically only from packages starting with fi.utu.ville, if you use some other package for your exercise-type, you must override VilleExerStubUI's method getTypesToLoad() in generated {package}.stub.StubUI in {artifactId}-stub module