doc(build): add instructions

This commit is contained in:
Paul ALNET 2024-03-25 08:41:41 +01:00
parent 32f99dba49
commit 1677a89a05

View file

@ -1,62 +1,52 @@
# Graph & Algorithm project — INSA Toulouse # Graph & Algorithm project — INSA Toulouse
## How to start? ## Building
You will not be able to use this repository to save your work, you need to copy / import / fork it to The instructions below are an attempt at using java from the command line.
your favorite Git platform. These efforts were in vain (~3 man-hours + help from 2 teachers). The
"solution" was to use [VScode][vscode]. The instructions are left below for
posterity.
### Importing to [Github](https://github.com), [Bitbucket](https://bitbucket.org) or [Gitlab](https://gitlab.com): [vscode]: https://code.visualstudio.com/docs/setup/linux
You first need to register and then log in to the platform you want. The steps to import the project are detailed below: ### Prerequisites
#### Github This project makes use of [Maven][maven]. On a debian-like system, install Maven :
1. In the upper-right corner of any page, click the **"+"** icon, then click **Import repository**, or go to [https://github.com/new/import](https://github.com/new/import). ```
2. Paste the following URL in the first input: sudo apt-get install maven
[https://gitea.typename.fr/INSA/be-graphes.git](https://gitea.typename.fr/INSA/be-graphes.git) ```
3. Choose the name you want for the repository.
4. Click *Begin import*.
5. Wait for completion... Done!
#### Bitbucket [maven]: https://maven.apache.org/guides/getting-started/maven-in-five-minutes.html
1. On the left panel of any page, click the **"+"** icon, then **Repository**, and then **Import**, or directly go to [https://bitbucket.org/repo/import](https://bitbucket.org/repo/import). ### Compiling
2. Paste the following URL in the first input (select Git as source if not already selected):
[https://gitea.typename.fr/INSA/be-graphes.git](https://gitea.typename.fr/INSA/be-graphes.git)
3. Choose the name you want for repository, and select Git as the *Version control system*.
4. Click *Import repository*.
5. Wait for completion... Done!
#### Gitlab In the project root directory :
1. In the upper-right corner of any page, click the **"+"** icon, then **New project**, or directly go to [https://gitlab.com/projects/new](https://gitlab.com/projects/new). ```
2. Select the **Import project** tab, and then click **Repo by URL** (right-most option). mvn compile
3. Paste the following URL in the first input: ```
[https://gitea.typename.fr/INSA/be-graphes.git](https://gitea.typename.fr/INSA/be-graphes.git)
4. Choose the name you want for the repository.
5. Click *Create project*.
6. Wait for completion... Done!
### Importing to another repository provider: ### Packaging
1. Create a new **empty** repository (no README, no LICENSE) on your provider. Let's assume the URL of your repository is `$URL_REPOSITORY`. In the project root directory :
2. Clone this repository somewhere:
```bash ```
git clone https://gitea.typename.fr/INSA/be-graphes.git mvn package
``` ```
3. Go inside the newly cloned repository and update the **remote**:
```bash
cd be-graphes
git remote set-url origin $URL_REPOSITORY
```
4. Push to your repository:
```bash Or skip tests :
push -u origin master
``` ```
mvn package -Dmaven.test.skip=true
Another way is to do a bare clone and then mirror it to your repository: [https://help.github.com/articles/importing-a-git-repository-using-the-command-line/](https://help.github.com/articles/importing-a-git-repository-using-the-command-line/) ```
The output jar files will be in the `<project>/target/` directory of each project.
### Testing
In the root directory, start all tests :
```
mvn test
```