Skip to content

Commit

Permalink
chore: simplify mvn install process
Browse files Browse the repository at this point in the history
  • Loading branch information
double-beep committed Aug 4, 2024
1 parent 40fbd28 commit 4defab0
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 35 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,5 @@ jobs:
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Install swagger jar
run: mvn -B install:install-file -Dfile="./lib/swagger-java-client-1.0.0.jar" -DgroupId="io.swagger" -DartifactId="swagger-java-client" -Dversion="1.0.0" -Dpackaging="jar" -DgeneratePom="true"
- name: Build project
run: mvn -B clean install
18 changes: 6 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,30 +67,24 @@ A sample image of a report is:

#### Run

- Clone the repository and build it with Maven:
- Clone the repository:

git clone https://github.com/SOBotics/Belisarius
cd Belisarius

- Install the swagger-java-client jar, which is used to communicate with Higgs, and build:
- Install dependencies:

mvn -B install:install-file -Dfile="./lib/swagger-java-client-1.0.0.jar" \
-DgroupId="io.swagger" \
-DartifactId="swagger-java-client" \
-Dversion="1.0.0" \
-Dpackaging="jar" \
-DgeneratePom="true"
mvn clean install

- Edit the `properties/login.properties` file with the information you like.
- Run the bot with the following command:
- Fill in `properties/login.properties`.
- Start the bot:

java -cp target/belisarius-1.7.1.jar:./lib/* bugs.stackoverflow.belisarius.Application

-----

If you want to changes the log location, then edit `src/main/resources/log4j.xml` and change the path in line 16.
However, you should build the project again with `mvn install`, so that the changes are applied.
If you want to change the location of the log file, edit `src/main/resources/log4j.xml` and change the path in line 16.
Please note that the project should be rebuilt (`mvn install`), for the changes to be applied.

The source code is available on [GitHub][8] and suggestions are welcome.

Expand Down
18 changes: 6 additions & 12 deletions docs/run.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,27 +8,21 @@

#### Compile and run

- Clone the repository and build it with Maven:
- Clone the repository:

git clone https://github.com/SOBotics/Belisarius
cd Belisarius

- Install the swagger-java-client jar, which is used to communicate with Higgs, and build:
- Install dependencies:

mvn -B install:install-file -Dfile="./lib/swagger-java-client-1.0.0.jar" \
-DgroupId="io.swagger" \
-DartifactId="swagger-java-client" \
-Dversion="1.0.0" \
-Dpackaging="jar" \
-DgeneratePom="true"
mvn clean install

- Edit the `properties/login.properties` file with the information you like.
- Run the bot with the following command:
- Fill in `properties/login.properties`.
- Start the bot:

java -cp target/belisarius-1.7.1.jar:./lib/* bugs.stackoverflow.belisarius.Application

-----

If you want to changes the log location, then edit `src/main/resources/log4j.xml` and change the path in line 16.
However, you should build the project again with `mvn install`, so that the changes are applied.
If you want to change the location of the log file, edit `src/main/resources/log4j.xml` and change the path in line 16.
Please note that the project should be rebuilt (`mvn install`), for the changes to be applied.
27 changes: 18 additions & 9 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,18 @@
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
</properties>

<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>

<dependencies>
<dependency>
<groupId>org.sobotics</groupId>
<groupId>com.github.sobotics</groupId>
<artifactId>chatexchange</artifactId>
<version>2.0.0</version>
<version>605ffcb</version>
</dependency>
<dependency>
<groupId>info.debatty</groupId>
Expand All @@ -40,12 +47,6 @@
<artifactId>sqlite-jdbc</artifactId>
<version>3.46.0.1</version>
</dependency>
<dependency>
<groupId>io.swagger</groupId>
<artifactId>swagger-java-client</artifactId>
<version>1.0.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.threeten</groupId>
<artifactId>threetenbp</artifactId>
Expand All @@ -72,7 +73,15 @@
<artifactId>redunda-lib</artifactId>
<version>1.0.0</version>
</dependency>
</dependencies>
<dependency>
<groupId>io.swagger</groupId>
<artifactId>swagger-java-client</artifactId>
<version>1.0.0</version>
<scope>system</scope>
<systemPath>${pom.basedir}/lib/swagger-java-client-1.0.0.jar</systemPath>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
Expand Down

0 comments on commit 4defab0

Please sign in to comment.