diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000000000000000000000000000000000000..8d8e64e08550af2ebf8f28a41a8413cd40211410 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,30 @@ +image: maven:3-eclipse-temurin-17 + +variables: + MAVEN_OPTS: "-Dhttps.protocols=TLSv1.2 -Dmaven.repo.local=$CI_PROJECT_DIR/.m2/repository -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=WARN -Dorg.slf4j.simpleLogger.showDateTime=true" + MAVEN_CLI_OPTS: "--batch-mode --errors --fail-at-end" + +cache: + key: "$CI_JOB_NAME" + paths: + - .m2/repository + +stages: + - build + - deploy + +# just check that it builds +build: + stage: build + rules: + - if: '$CI_COMMIT_TAG == null' + script: + - mvn install -s ci_settings.xml + +# deploy the maven packages +deploy: + stage: deploy + rules: + - if: $CI_COMMIT_TAG + script: + - mvn deploy -s ci_settings.xml diff --git a/ci_settings.xml b/ci_settings.xml new file mode 100644 index 0000000000000000000000000000000000000000..59c8c271cb4549ebcad535c1c9e1907839ba440f --- /dev/null +++ b/ci_settings.xml @@ -0,0 +1,16 @@ +<settings xmlns="http://maven.apache.org/SETTINGS/1.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.1.0 http://maven.apache.org/xsd/settings-1.1.0.xsd"> + <servers> + <server> + <id>gitlab-maven</id> + <configuration> + <httpHeaders> + <property> + <name>Job-Token</name> + <value>${env.CI_JOB_TOKEN}</value> + </property> + </httpHeaders> + </configuration> + </server> + </servers> +</settings> diff --git a/pom.xml b/pom.xml index e6b44fcee59e1eb7bf71bf7a76134a48af9494b4..3e79ee17fa63ff81fa6ee7b9df0eb9679159cddf 100644 --- a/pom.xml +++ b/pom.xml @@ -21,6 +21,7 @@ <module>commonmark-ext-heading-anchor</module> <module>commonmark-ext-image-attributes</module> <module>commonmark-ext-ins</module> + <module>commonmark-ext-notifications</module> <module>commonmark-ext-task-list-items</module> <module>commonmark-ext-yaml-front-matter</module> <module>commonmark-integration-test</module> @@ -77,9 +78,22 @@ <artifactId>maven-surefire-plugin</artifactId> <version>2.22.2</version> </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-source-plugin</artifactId> + <version>3.2.1</version> + <executions> + <execution> + <id>attach-sources</id> + <goals> + <goal>jar-no-fork</goal> + </goals> + </execution> + </executions> + </plugin> </plugins> </pluginManagement> - +<!-- <plugins> <plugin> <groupId>org.sonatype.plugins</groupId> @@ -105,6 +119,7 @@ </configuration> </plugin> </plugins> +--> </build> <dependencyManagement> @@ -179,7 +194,7 @@ </dependency> </dependencies> </dependencyManagement> - +<!-- <profiles> <profile> <id>release</id> @@ -223,7 +238,7 @@ </goals> <configuration> <gpgArguments> - <arg>--pinentry-mode</arg> + <arg>- -pinentry-mode</arg> <arg>loopback</arg> </gpgArguments> </configuration> @@ -243,7 +258,6 @@ <version>0.8.8</version> <configuration> <excludes> - <!-- Classes from test-util --> <exclude>org/commonmark/spec/*</exclude> <exclude>org/commonmark/test/*</exclude> </excludes> @@ -285,16 +299,17 @@ <url>https://github.com/commonmark/commonmark-java</url> <tag>HEAD</tag> </scm> +--> <distributionManagement> - <snapshotRepository> - <id>ossrh</id> - <url>https://oss.sonatype.org/content/repositories/snapshots</url> - </snapshotRepository> <repository> - <id>ossrh</id> - <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url> + <id>gitlab-maven</id> + <url>${env.CI_API_V4_URL}/projects/${env.CI_PROJECT_ID}/packages/maven</url> </repository> + <snapshotRepository> + <id>gitlab-maven</id> + <url>${env.CI_API_V4_URL}/projects/${env.CI_PROJECT_ID}/packages/maven</url> + </snapshotRepository> </distributionManagement> </project>