Skip to content

Commit 084dbef

Browse files
Merge pull request BuildCLI#163 from BuildCLI/develop
Develop to Main
2 parents 06248c9 + 91cc11b commit 084dbef

40 files changed

+863
-50
lines changed

.github/workflows/maven.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ jobs:
2121

2222
steps:
2323
- uses: actions/checkout@v4
24-
- name: Set up JDK 17
24+
- name: Set up JDK 21
2525
uses: actions/setup-java@v4
2626
with:
27-
java-version: '17'
27+
java-version: '21'
2828
distribution: 'temurin'
2929
cache: maven
3030
- name: Build with Maven

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,4 @@ dependency-reduced-pom.xml
3939

4040
app.jar
4141
buildcli.jar
42-
Dockerfile
42+
Dockefile

Dockerfile

Lines changed: 0 additions & 6 deletions
This file was deleted.

README.md

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,28 @@ Welcome to BuildCLI - Java Project Management!
5656
mvn package
5757
```
5858

59-
3. **Set up BuildCLI for Global Access**:
60-
- Copy the `buildcli` file to a directory in your system PATH, such as `~/bin`:
61-
```bash
62-
cp target/BuildCLI-1.0-SNAPSHOT.jar ~/bin/buildcli
63-
chmod +x ~/bin/buildcli
64-
```
59+
3. **Set up BuildCLI for Global Access**:
60+
- Copy the `buildcli` file to a directory in your system PATH, such as `~/bin`:
61+
```bash
62+
cp target/buildcli.jar ~/bin/
63+
```
64+
- Create a wrapper script:
65+
```bash
66+
nano ~/bin/buildcli
67+
```
68+
- Insert the following content into the file:
69+
```bash
70+
#!/bin/bash
71+
java -jar "$HOME/bin/buildcli.jar.jar" "$@"
72+
```
73+
- Save and exit Nano:
74+
- Press CTRL + O, then Enter to save.
75+
- Press CTRL + X to exit.
76+
77+
- Make the script executable:
78+
```bash
79+
chmod +x ~/bin/buildcli
80+
```
6581

6682
Now `BuildCLI` is ready to use. Test the `buildcli` command in the terminal.
6783

pom.xml

Lines changed: 32 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
<version>1.0-SNAPSHOT</version>
1010

1111
<properties>
12-
<maven.compiler.source>17</maven.compiler.source>
13-
<maven.compiler.target>17</maven.compiler.target>
12+
<maven.compiler.source>21</maven.compiler.source>
13+
<maven.compiler.target>21</maven.compiler.target>
1414
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
1515
</properties>
1616

@@ -58,6 +58,7 @@
5858
<artifactId>junit-jupiter-api</artifactId>
5959
<scope>test</scope>
6060
</dependency>
61+
6162
<dependency>
6263
<groupId>ch.qos.logback</groupId>
6364
<artifactId>logback-core</artifactId>
@@ -82,6 +83,17 @@
8283
<version>6.6.1.202309021850-r</version>
8384
</dependency>
8485

86+
<!-- Langchain4j dependencies group -->
87+
<dependency>
88+
<groupId>dev.langchain4j</groupId>
89+
<artifactId>langchain4j-ollama</artifactId>
90+
<version>0.36.1</version>
91+
</dependency>
92+
<dependency>
93+
<groupId>dev.langchain4j</groupId>
94+
<artifactId>langchain4j-jlama</artifactId>
95+
<version>0.36.1</version>
96+
</dependency>
8597
</dependencies>
8698

8799
<build>
@@ -129,14 +141,28 @@
129141
<artifactId>versions-maven-plugin</artifactId>
130142
<version>2.18.0</version>
131143
</plugin>
144+
<plugin>
145+
<groupId>org.apache.maven.plugins</groupId>
146+
<artifactId>maven-compiler-plugin</artifactId>
147+
<configuration>
148+
<source>21</source>
149+
<target>21</target>
150+
</configuration>
151+
</plugin>
132152
<plugin>
133153
<groupId>org.apache.maven.plugins</groupId>
134-
<artifactId>maven-compiler-plugin</artifactId>
154+
<artifactId>maven-surefire-plugin</artifactId>
135155
<configuration>
136-
<source>17</source>
137-
<target>17</target>
156+
<forkCount>1</forkCount>
157+
<argLine>
158+
--add-modules=jdk.incubator.vector
159+
--add-exports java.base/sun.nio.ch=ALL-UNNAMED
160+
--enable-preview
161+
--enable-native-access=ALL-UNNAMED
162+
--add-exports java.base/jdk.internal.vm.vector=ALL-UNNAMED
163+
</argLine>
138164
</configuration>
139165
</plugin>
140-
</plugins>
166+
</plugins>
141167
</build>
142168
</project>

src/main/java/org/buildcli/OptionCommand.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import picocli.CommandLine.Option;
55
import picocli.CommandLine.Spec;
66

7+
@Deprecated(forRemoval = true)
78
public class OptionCommand {
89

910
@Spec

src/main/java/org/buildcli/OptionCommandMap.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import java.util.HashMap;
44

5+
@Deprecated(forRemoval = true)
56
public class OptionCommandMap extends HashMap<String, CommandExecutor> {
67

78
private static final long serialVersionUID = 1L;
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
package org.buildcli.actions.ai;
2+
3+
import org.buildcli.constants.AIConstants;
4+
5+
import java.util.UUID;
6+
7+
public class AIChat {
8+
private final UUID chatId = UUID.randomUUID();
9+
private final String systemMessage;
10+
private final String userMessage;
11+
12+
public AIChat(String systemMessage, String userMessage) {
13+
this.systemMessage = systemMessage;
14+
this.userMessage = userMessage;
15+
}
16+
17+
public AIChat(String userMessage) {
18+
this(AIConstants.COMMENT_CODE_PROMPT, userMessage);
19+
}
20+
21+
22+
public UUID getChatId() {
23+
return chatId;
24+
}
25+
26+
public String getUserMessage() {
27+
return userMessage;
28+
}
29+
30+
public String getSystemMessage() {
31+
return systemMessage;
32+
}
33+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
package org.buildcli.actions.ai;
2+
3+
public interface AIService {
4+
String generate(AIChat chat);
5+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
package org.buildcli.actions.ai;
2+
3+
import java.util.Optional;
4+
5+
public interface AIServiceParams {
6+
Optional<String> model();
7+
String vendor();
8+
}

0 commit comments

Comments
 (0)