Welcome
In this page, we briefly discuss setting up a productive environment for the assignment. The following pages provide an high-level view of the architecture and main components of the provided source code.
Useful links:
- Subject
- Base code (cloned for you by Github classroom)
- Documentation (this)
- Javadoc
- Moodle
Setting up
Start by accepting the GitHub classroom assignment :
- Go to the invite link
- Select your name in the list to associate it with you github account (there is a particular link that you can follow if you do not appear in the list). This should create a private repository to which only yourself and the teachers have access.
- your repository should be named in the format
{GROUP} {LASTNAME1} / {LASTNAME2}
- your repository should be named in the format
- Clone the repository and get started.
- consider setting up SSH github seems to put more and more restriction on other authentication modes.
Working in IntelliJ
For working on this project, we recommend using the IntelliJ-IDEA development environment. It is available in INSA's
classrooms as well as on montp.insa-toulouse.fr
.
To import the project in IntelliJ (once IntelliJ is running):
- Open a new project :
Open project
orFile > Open
- Select the
pom.xml
file in the cloned repository. - Select
Open as project
.
To run the program in IntelliJ, you can
- Right click on the
src/main/java/jobshop/Main
class in the project view. - Select
Run Main.main()
. The program should execute but complain that some arguments are missing. - Specify the expected command line arguments :
- open the run configuration dialog:
Run > Edit Configuration
- fill in the
Program arguments
text box with--solver basic --instance aaa1 aaa2
(more details on the meaning of the arguments is given in the next documentation page)
- open the run configuration dialog:
Working on the command line (Maven)
Compilation instructions are given for Linux (it should work on Windows as well but you are on your own).
❯ mvn compile # Compiles the project
The project can be executed directly with the mvn
command by specifying the arguments like so:
❯ mvn compile exec:java -Dexec.args="--solver basic --instance aaa1 ft"
You can also build an executable jar file, and run it with the java command. This is especially useful if you want to run it on another machine.
# Create a jar file with all dependencies in as `target/jobshop-1.0-SNAPSHOT-jar-with-dependencies.jar`
❯ mvn package assembly:single
# Run the jar file. Only requires a Java Runtime Environment (JRE)
❯ java -jar target/jobshop-1.0-SNAPSHOT-jar-with-dependencies.jar --solver basic --instance ft06