Skip to content

Commit d9fd514

Browse files
committed
doc(snippets): init snippets maven project
# Conflicts: # .github/workflows/release.yml # .github/workflows/snapshot.yml
1 parent 687fe7d commit d9fd514

6 files changed

Lines changed: 99 additions & 3 deletions

File tree

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434

3535
- name: Publish to Maven Central
3636
run: |
37-
./mvnw -B clean deploy -PsonatypeRelease -DskipTests -pl '!jacoco-coverage-aggregate-report'
37+
./mvnw -B clean deploy -PsonatypeRelease -DskipTests -pl '!jacoco-coverage-aggregate-report,!documentation'
3838
env:
3939
MAVEN_USERNAME: ${{ secrets.MAVEN_CENTRAL_USER }}
4040
MAVEN_TOKEN: ${{ secrets.MAVEN_CENTRAL_TOKEN }}

.github/workflows/snapshot.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727

2828
- name: Publish Snapshot to Maven Central
2929
run: |
30-
./mvnw -B clean deploy -PsonatypeSnapshot -DskipTests -pl '!jacoco-coverage-aggregate-report'
30+
./mvnw -B clean deploy -PsonatypeSnapshot -DskipTests -pl '!jacoco-coverage-aggregate-report,!documentation'
3131
env:
3232
MAVEN_USERNAME: ${{ secrets.MAVEN_CENTRAL_USER }}
3333
MAVEN_TOKEN: ${{ secrets.MAVEN_CENTRAL_TOKEN }}

documentation/README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,8 @@ markdown сошлитесь на схему как на обычную markdown-
3232
```markdown
3333
![](../../../../assets/<some-paths>/schema.drawio)
3434
```
35+
36+
### Code Snippets
37+
38+
Сейчас документация настроена на то, что пути snippet файлов обрабатываются относительно директории
39+
`docs/documentation/examples`

documentation/mkdocs.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,9 @@ markdown_extensions:
130130
line_spans: __spanz
131131
pygments_lang_class: true
132132
- pymdownx.inlinehilite
133-
- pymdownx.snippets
133+
- pymdownx.snippets:
134+
check_paths: true
135+
base_path: docs/documentation/examples
134136
- def_list
135137
- pymdownx.tasklist:
136138
custom_checkbox: true

documentation/pom.xml

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5+
<modelVersion>4.0.0</modelVersion>
6+
<parent>
7+
<groupId>io.tarantool</groupId>
8+
<artifactId>tarantool-java-sdk</artifactId>
9+
<version>2.0.0-SNAPSHOT</version>
10+
</parent>
11+
12+
<artifactId>documentation</artifactId>
13+
14+
<properties>
15+
<cartridge-java.version>0.13.0</cartridge-java.version>
16+
<junit.version>5.14.0</junit.version>
17+
<maven.compiler.source>17</maven.compiler.source>
18+
<maven.compiler.target>17</maven.compiler.target>
19+
<license.header.file>${project.parent.basedir}/LICENSE_HEADER.txt</license.header.file>
20+
</properties>
21+
22+
<dependencyManagement>
23+
<dependencies>
24+
<dependency>
25+
<groupId>io.tarantool</groupId>
26+
<artifactId>tarantool-client</artifactId>
27+
<version>2.0.0-SNAPSHOT</version>
28+
<scope>import</scope>
29+
</dependency>
30+
<dependency>
31+
<groupId>io.tarantool</groupId>
32+
<artifactId>testcontainers</artifactId>
33+
<version>2.0.0-SNAPSHOT</version>
34+
<scope>import</scope>
35+
</dependency>
36+
<dependency>
37+
<groupId>org.junit</groupId>
38+
<artifactId>junit-bom</artifactId>
39+
<version>${junit.version}</version>
40+
<scope>import</scope>
41+
<type>pom</type>
42+
</dependency>
43+
<dependency>
44+
<groupId>io.tarantool</groupId>
45+
<artifactId>cartridge-driver</artifactId>
46+
<version>${cartridge-java.version}</version>
47+
<scope>import</scope>
48+
</dependency>
49+
</dependencies>
50+
</dependencyManagement>
51+
52+
<dependencies>
53+
<dependency>
54+
<groupId>io.tarantool</groupId>
55+
<artifactId>tarantool-client</artifactId>
56+
<scope>test</scope>
57+
</dependency>
58+
<dependency>
59+
<groupId>io.tarantool</groupId>
60+
<artifactId>testcontainers</artifactId>
61+
<scope>test</scope>
62+
</dependency>
63+
<dependency>
64+
<groupId>org.junit.jupiter</groupId>
65+
<artifactId>junit-jupiter</artifactId>
66+
<scope>test</scope>
67+
</dependency>
68+
<dependency>
69+
<groupId>ch.qos.logback</groupId>
70+
<artifactId>logback-classic</artifactId>
71+
<scope>test</scope>
72+
</dependency>
73+
<dependency>
74+
<groupId>io.tarantool</groupId>
75+
<artifactId>cartridge-driver</artifactId>
76+
<scope>test</scope>
77+
</dependency>
78+
</dependencies>
79+
80+
<build>
81+
<testSourceDirectory>docs/documentation/examples/src</testSourceDirectory>
82+
<testResources>
83+
<testResource>
84+
<directory>docs/documentation/examples/resources</directory>
85+
</testResource>
86+
</testResources>
87+
</build>
88+
</project>

pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -642,5 +642,6 @@
642642
<module>testcontainers</module>
643643
<module>jacoco-coverage-aggregate-report</module>
644644
<module>testcontainers-autogen</module>
645+
<module>documentation</module>
645646
</modules>
646647
</project>

0 commit comments

Comments
 (0)