![]() ![]() Package $ main - class - package $ import /** Directory structureĪt first, we’ll need to create a few directories: Some files and directories are required by Greenfoot. The plugins are needed because we need a valid manifest (generated by maven-jar-plugin) and all the dependencies are required to be present in the jar file (handled by maven-assembly-plugin). The pom.xml above has been updated to use cleanfoot. On macOS, you can find the greenfoot.jar at /Applications/Greenfoot.app/Resources/Java/extensions/greenfoot.jar and you’ll have to download the greenfoot source code and build the bluej project with ant jar-core to get the bluej.jar.Īs you can see, it’s a lot more convenient to just use the Maven dependencies.ĮDIT: I have shut down my Nexus and as such also lost the JAR files.Īn alternative is the cleanfoot project I created, which is a fork of greenfoot where I patched out the analytics. The repository is needed, because the dependencies are not available anywhere else for Maven. 4.0.0 $package-group$ $package-artifact$ 1.0-SNAPSHOT jitpack.io cleanfoot 3.6.1 maven-compiler-plugin 1.8 1.8 maven-jar-plugin **/log4j.properties $main-class$ maven-assembly-plugin $main-class$ jar-with-dependencies make-assembly package single Repository and Dependencies Let’s start by creating the project directory and going into it: REMEMBER TO REPLACE THOSE PLACEHOLDERS! Preparation $actor-image$ - The file name of the image to use as world background - some-dude.jpg.$actor-class-path$ - The location of the actor class relative to src/main/java - io/lerk/demo/actors.$actor-class-package$ - Only the package of the class - io.$actor-class-name$ - Only the name of the class - MyActor.$actor-class$ - The full identifier of the main World class - io.$world-image$ - The file name of the image to use as world background - crumpled-paper.jpg.$world-class-path$ - The location of the world class relative to src/main/java - io/lerk/demo/worlds.$world-class-package$ - Only the package of the class - io.$world-class-name$ - Only the name of the main world class - MyWorld.$world-class$ - The full identifier of the main World class - io.$main-class$ - The full identifier of the class containing the main method (including full package name).$project-name$ - The name of your project - greenfoot-maven-demo. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |