Skip to content

Commit a99bad6

Browse files
authored
Maven Central Dependency (#61)
1 parent aed9efd commit a99bad6

File tree

5 files changed

+171
-53
lines changed

5 files changed

+171
-53
lines changed

.github/workflows/maven.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,14 @@ jobs:
4242
uses: actions/cache@v3
4343
with:
4444
path: ~/.m2/repository
45-
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} # Cache dependencies based on pom.xml changes
45+
key: ${{ runner.os }}-maven-v2-${{ hashFiles('**/pom.xml') }} # Cache dependencies based on pom.xml changes
4646
restore-keys: |
47-
${{ runner.os }}-maven-
47+
${{ runner.os }}-maven-v2-
4848
4949
# Build the project (compiles and packages the code)
5050
- name: Build the project
51-
run: mvn -B -X -e clean install --file pom.xml --batch-mode --fail-fast
51+
run: mvn -B clean install --file pom.xml --batch-mode --fail-fast -Dgpg.skip=true -Dmaven.deploy.skip=true
5252

5353
# Run tests
5454
- name: Run tests
55-
run: mvn test -B -X -e --file pom.xml --batch-mode --fail-fast
55+
run: mvn test -B --file pom.xml --batch-mode --fail-fast

README.md

Lines changed: 28 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,18 @@ This project contains the LiquidJava verifier and its API, as well as some examp
1818

1919
You can find out more about LiquidJava in the following resources:
2020

21-
* [Try it](https://github.com/CatarinaGamboa/liquidjava-examples) with GitHub Codespaces or locally
22-
* [VS Code extension for LiquidJava](https://github.com/CatarinaGamboa/vscode-liquidjava)
23-
* [LiquidJava website](https://catarinagamboa.github.io/liquidjava.html)
24-
* [LiquidJava specification examples for the Java standard library](https://github.com/CatarinaGamboa/liquid-java-external-libs)
21+
* [LiquidJava Website](https://catarinagamboa.github.io/liquidjava.html)
22+
* [VS Code Extension (Marketplace)](https://marketplace.visualstudio.com/items?itemName=AlcidesFonseca.liquid-java)
23+
* [VS Code Extension (Source Code)](https://github.com/CatarinaGamboa/vscode-liquidjava)
24+
* [LiquidJava Examples](https://github.com/CatarinaGamboa/liquidjava-examples)
25+
* [LiquidJava External Libraries Examples](https://github.com/CatarinaGamboa/liquid-java-external-libs)
2526
<!-- * [Formalization of LiquidJava](https://github.com/CatarinaGamboa/liquidjava-formalization) - not opensource yet -->
2627

2728
## Getting Started
2829

2930
### VS Code Extension
3031

31-
The easiest way to use LiquidJava is through its [VS Code extension](https://github.com/CatarinaGamboa/vscode-liquidjava), which uses the LiquidJava verifier directly inside VS Code, with error diagnostics and syntax highlighting for refinements.
32+
The easiest way to use LiquidJava is through its [VS Code extension](https://marketplace.visualstudio.com/items?itemName=AlcidesFonseca.liquid-java), which uses the LiquidJava verifier directly inside VS Code, with real-time error diagnostics and syntax highlighting for refinements.
3233

3334
### Command Line
3435

@@ -41,6 +42,28 @@ Before setting up LiquidJava, ensure you have the following installed:
4142
- Java 20+ - JDK for compiling and running Java programs
4243
- Maven 3.6+ - For building and dependency management
4344

45+
Additionally, you'll need the following dependency, which includes the LiquidJava API annotations:
46+
47+
#### Maven
48+
```xml
49+
<dependency>
50+
<groupId>io.github.rcosta358</groupId>
51+
<artifactId>liquidjava-api</artifactId>
52+
<version>0.0.3</version>
53+
</dependency>
54+
```
55+
56+
#### Gradle
57+
```groovy
58+
repositories {
59+
mavenCentral()
60+
}
61+
62+
dependencies {
63+
implementation 'io.github.rcosta358:liquidjava-api:0.0.3'
64+
}
65+
```
66+
4467
#### Setup
4568

4669
1. Clone the repository: `git clone https://github.com/CatarinaGamboa/liquidjava.git`

liquidjava-api/pom.xml

Lines changed: 135 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -3,50 +3,150 @@
33
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
44
<modelVersion>4.0.0</modelVersion>
55

6-
<parent>
7-
<groupId>liquidjava</groupId>
8-
<artifactId>liquidjava-umbrella</artifactId>
9-
<version>1.0</version>
10-
</parent>
11-
12-
<groupId>liquidjava-api</groupId>
6+
<groupId>io.github.rcosta358</groupId>
137
<artifactId>liquidjava-api</artifactId>
14-
<version>0.0.2-SNAPSHOT</version>
8+
<version>0.0.3</version>
159
<name>liquidjava-api</name>
10+
<description>LiquidJava API</description>
11+
<url>https://github.com/CatarinaGamboa/liquidjava</url>
1612
<packaging>jar</packaging>
1713

14+
<licenses>
15+
<license>
16+
<name>MIT License</name>
17+
<url>https://opensource.org/licenses/MIT</url>
18+
<distribution>repo</distribution>
19+
</license>
20+
</licenses>
21+
22+
<developers>
23+
<developer>
24+
<id>CatarinaGamboa</id>
25+
<name>Catarina Gamboa</name>
26+
<email>CatarinaGamboa@users.noreply.github.com</email>
27+
<url>https://github.com/CatarinaGamboa</url>
28+
</developer>
29+
<developer>
30+
<id>alcides</id>
31+
<name>Alcides Fonseca</name>
32+
<email>alcides@users.noreply.github.com</email>
33+
<url>https://github.com/alcides</url>
34+
</developer>
35+
<developer>
36+
<id>rcosta358</id>
37+
<name>Ricardo Costa</name>
38+
<email>rcosta358@users.noreply.github.com</email>
39+
<url>https://github.com/rcosta358</url>
40+
</developer>
41+
</developers>
42+
43+
<scm>
44+
<connection>scm:git:git://github.com/CatarinaGamboa/liquidjava.git</connection>
45+
<developerConnection>scm:git:ssh://github.com:CatarinaGamboa/liquidjava.git</developerConnection>
46+
<url>https://github.com/CatarinaGamboa/liquidjava/tree/main</url>
47+
</scm>
48+
1849
<build>
19-
<pluginManagement>
20-
<plugins>
21-
<!-- <plugin>
22-
<groupId>fr.inria.gforge.spoon</groupId>
23-
<artifactId>spoon-maven-plugin</artifactId>
24-
<version>3.3</version>
25-
<executions>
26-
<execution>
27-
<phase>generate-sources</phase>
28-
<goals>
29-
<goal>generate</goal>
30-
</goals>
31-
</execution>
32-
</executions>
33-
</plugin> -->
34-
<plugin>
35-
<groupId>org.apache.maven.plugins</groupId>
36-
<artifactId>maven-compiler-plugin</artifactId>
37-
<version>3.8.1</version>
38-
<configuration>
39-
<source>20</source>
40-
<target>20</target>
41-
</configuration>
42-
</plugin>
43-
</plugins>
44-
</pluginManagement>
50+
<plugins>
51+
<plugin>
52+
<groupId>org.apache.maven.plugins</groupId>
53+
<artifactId>maven-compiler-plugin</artifactId>
54+
<version>3.8.1</version>
55+
<configuration>
56+
<source>20</source>
57+
<target>20</target>
58+
</configuration>
59+
</plugin>
60+
61+
<!-- Generate source JAR -->
62+
<plugin>
63+
<groupId>org.apache.maven.plugins</groupId>
64+
<artifactId>maven-source-plugin</artifactId>
65+
<version>3.3.0</version>
66+
<executions>
67+
<execution>
68+
<id>attach-sources</id>
69+
<goals>
70+
<goal>jar-no-fork</goal>
71+
</goals>
72+
</execution>
73+
</executions>
74+
</plugin>
75+
76+
<!-- Generate Javadoc JAR -->
77+
<plugin>
78+
<groupId>org.apache.maven.plugins</groupId>
79+
<artifactId>maven-javadoc-plugin</artifactId>
80+
<version>3.6.0</version>
81+
<executions>
82+
<execution>
83+
<id>attach-javadocs</id>
84+
<goals>
85+
<goal>jar</goal>
86+
</goals>
87+
</execution>
88+
</executions>
89+
<configuration>
90+
<doclint>none</doclint>
91+
<source>20</source>
92+
</configuration>
93+
</plugin>
94+
95+
<!-- GPG Signing -->
96+
<plugin>
97+
<groupId>org.apache.maven.plugins</groupId>
98+
<artifactId>maven-gpg-plugin</artifactId>
99+
<version>3.1.0</version>
100+
<configuration>
101+
<skip>${gpg.skip}</skip>
102+
</configuration>
103+
<executions>
104+
<execution>
105+
<id>sign-artifacts</id>
106+
<phase>verify</phase>
107+
<goals>
108+
<goal>sign</goal>
109+
</goals>
110+
</execution>
111+
</executions>
112+
</plugin>
113+
114+
<!-- Skip default deploy -->
115+
<plugin>
116+
<groupId>org.apache.maven.plugins</groupId>
117+
<artifactId>maven-deploy-plugin</artifactId>
118+
<version>3.1.2</version>
119+
<configuration>
120+
<skip>true</skip>
121+
</configuration>
122+
</plugin>
123+
124+
<!-- Central Publishing Plugin -->
125+
<plugin>
126+
<groupId>org.sonatype.central</groupId>
127+
<artifactId>central-publishing-maven-plugin</artifactId>
128+
<version>0.9.0</version>
129+
<extensions>true</extensions>
130+
<configuration>
131+
<publishingServerId>central</publishingServerId>
132+
<skipPublishing>${maven.deploy.skip}</skipPublishing>
133+
<!-- <autoPublish>true</autoPublish> -->
134+
</configuration>
135+
</plugin>
136+
</plugins>
45137
</build>
46138

139+
<distributionManagement>
140+
<repository>
141+
<id>central</id>
142+
<url>https://central.sonatype.com/api/v1/publisher</url>
143+
</repository>
144+
</distributionManagement>
145+
47146
<properties>
147+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
48148
<javaVersion>20</javaVersion>
49149
<maven.compiler.source>20</maven.compiler.source>
50150
<maven.compiler.target>20</maven.compiler.target>
51151
</properties>
52-
</project>
152+
</project>

liquidjava-example/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@
4848
<version>${version.memcompiler}</version>
4949
</dependency>
5050
<dependency>
51-
<groupId>liquidjava-api</groupId>
51+
<groupId>io.github.rcosta358</groupId>
5252
<artifactId>liquidjava-api</artifactId>
53-
<version>0.0.2-SNAPSHOT</version>
53+
<version>0.0.3</version>
5454
</dependency>
5555
</dependencies>
5656
</project>

liquidjava-verifier/pom.xml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -172,9 +172,9 @@
172172
</dependency>
173173

174174
<dependency>
175-
<groupId>liquidjava-api</groupId>
175+
<groupId>io.github.rcosta358</groupId>
176176
<artifactId>liquidjava-api</artifactId>
177-
<version>0.0.2-SNAPSHOT</version>
177+
<version>0.0.3</version>
178178
</dependency>
179179

180180
<!-- https://mvnrepository.com/artifact/org.antlr/antlr4 -->
@@ -204,11 +204,6 @@
204204
<type>pom</type>
205205
<scope>import</scope>
206206
</dependency>
207-
<dependency>
208-
<groupId>liquidjava-api</groupId>
209-
<artifactId>liquidjava-api</artifactId>
210-
<version>0.0.2-SNAPSHOT</version>
211-
</dependency>
212207
</dependencies>
213208
</dependencyManagement>
214209
</project>

0 commit comments

Comments
 (0)