Skip to content

Commit 04415c6

Browse files
committed
polishing pom
1 parent d7f28a1 commit 04415c6

File tree

4 files changed

+145
-35
lines changed

4 files changed

+145
-35
lines changed

.travis.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
language: java
2+
jdk:
3+
- openjdk8
4+
5+
script:
6+
- mvn clean -P jdk-tools org.jacoco:jacoco-maven-plugin:prepare-agent package sonar:sonar -Dsonar.issue.ignore.multicriteria="e1" -Dsonar.issue.ignore.multicriteria.e1.ruleKey="squid:S00119" -Dsonar.issue.ignore.multicriteria.e1.resourceKey="**/*.java"
7+
8+
9+
addons:
10+
sonarcloud:
11+
organization: "antkorwin-github"
12+
token:
13+
secure: $SONAR_CLOUD_KEY
14+
15+
after_success:
16+
- bash <(curl -s https://codecov.io/bash)

pom.xml

Lines changed: 125 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,32 @@
11
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
22
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
33
<modelVersion>4.0.0</modelVersion>
4+
45
<groupId>com.antkorwin</groupId>
56
<artifactId>better-strings</artifactId>
67
<packaging>jar</packaging>
7-
<version>1.5</version>
8+
<version>1.0</version>
9+
10+
<!-- region Info -->
811
<name>BetterStrings Java Plugin</name>
912
<description>String interpolation plugin for Java 8..13</description>
10-
1113
<url>https://github.com/antkorwin/better-strings</url>
1214
<scm>
1315
<url>https://github.com/antkorwin/better-strings</url>
1416
<connection>scm:git:git://github.com/antkorwin/better-strings.git</connection>
1517
<developerConnection>scm:git:ssh://git@github.com/antkorwin/better-strings.git</developerConnection>
1618
<tag>HEAD</tag>
1719
</scm>
18-
1920
<issueManagement>
2021
<url>https://github.com/antkorwin/better-strings/issues</url>
2122
</issueManagement>
22-
23+
<licenses>
24+
<license>
25+
<name>The Apache Software License, Version 2.0</name>
26+
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
27+
<distribution>repo</distribution>
28+
</license>
29+
</licenses>
2330
<developers>
2431
<developer>
2532
<id>antkorwin</id>
@@ -32,18 +39,7 @@
3239
</roles>
3340
</developer>
3441
</developers>
35-
36-
<properties>
37-
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
38-
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
39-
<maven-compiler-plugin.version>3.7.0</maven-compiler-plugin.version>
40-
<java.version>1.8</java.version>
41-
42-
<junit.vintage.version>5.3.2</junit.vintage.version>
43-
<junit-jupiter.version>5.3.2</junit-jupiter.version>
44-
<junit-platform.version>1.3.2</junit-platform.version>
45-
</properties>
46-
42+
<!-- endregion Info -->
4743

4844
<distributionManagement>
4945
<snapshotRepository>
@@ -55,12 +51,16 @@
5551
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
5652
</repository>
5753
</distributionManagement>
58-
<repositories>
59-
<repository>
60-
<id>jitpack.io</id>
61-
<url>https://jitpack.io</url>
62-
</repository>
63-
</repositories>
54+
55+
56+
<properties>
57+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
58+
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
59+
<maven-compiler-plugin.version>3.7.0</maven-compiler-plugin.version>
60+
<java.version>1.8</java.version>
61+
<junit-jupiter.version>5.3.2</junit-jupiter.version>
62+
<junit-platform.version>1.3.2</junit-platform.version>
63+
</properties>
6464

6565

6666
<profiles>
@@ -81,11 +81,45 @@
8181
</dependencies>
8282
</profile>
8383

84+
<profile>
85+
<id>central</id>
86+
<build>
87+
<plugins>
88+
<plugin>
89+
<groupId>org.apache.maven.plugins</groupId>
90+
<artifactId>maven-gpg-plugin</artifactId>
91+
<version>1.5</version>
92+
<executions>
93+
<execution>
94+
<id>sign-artifacts</id>
95+
<phase>verify</phase>
96+
<goals>
97+
<goal>sign</goal>
98+
</goals>
99+
</execution>
100+
</executions>
101+
</plugin>
102+
103+
<plugin>
104+
<groupId>org.sonatype.plugins</groupId>
105+
<artifactId>nexus-staging-maven-plugin</artifactId>
106+
<version>1.6.7</version>
107+
<extensions>true</extensions>
108+
<configuration>
109+
<serverId>ossrh</serverId>
110+
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
111+
<autoReleaseAfterClose>true</autoReleaseAfterClose>
112+
</configuration>
113+
</plugin>
114+
</plugins>
115+
</build>
116+
</profile>
117+
84118
</profiles>
85119

86120

87121
<dependencies>
88-
<!-- region Junit 5 -->
122+
89123
<dependency>
90124
<groupId>org.junit.jupiter</groupId>
91125
<artifactId>junit-jupiter-api</artifactId>
@@ -104,25 +138,19 @@
104138
<version>${junit-platform.version}</version>
105139
<scope>test</scope>
106140
</dependency>
107-
<dependency>
108-
<groupId>org.junit.platform</groupId>
109-
<artifactId>junit-platform-launcher</artifactId>
110-
<version>${junit-platform.version}</version>
111-
<scope>test</scope>
112-
</dependency>
113141
<dependency>
114142
<groupId>org.assertj</groupId>
115143
<artifactId>assertj-core</artifactId>
116144
<version>3.11.1</version>
117145
<scope>test</scope>
118146
</dependency>
119-
<!-- endregion Junit 5 -->
120147
<dependency>
121-
<groupId>com.github.jupiter-tools</groupId>
148+
<groupId>com.jupiter-tools</groupId>
122149
<artifactId>compile-test</artifactId>
123-
<version>-2a36c0f3f0-1</version>
150+
<version>0.1</version>
124151
<scope>test</scope>
125152
</dependency>
153+
126154
</dependencies>
127155

128156

@@ -165,6 +193,71 @@
165193
<artifactId>maven-shade-plugin</artifactId>
166194
<version>3.1.0</version>
167195
</plugin>
196+
197+
<plugin>
198+
<groupId>org.apache.maven.plugins</groupId>
199+
<artifactId>maven-source-plugin</artifactId>
200+
<version>2.2.1</version>
201+
<executions>
202+
<execution>
203+
<id>attach-sources</id>
204+
<goals>
205+
<goal>jar-no-fork</goal>
206+
</goals>
207+
</execution>
208+
</executions>
209+
</plugin>
210+
211+
<plugin>
212+
<groupId>org.apache.maven.plugins</groupId>
213+
<artifactId>maven-javadoc-plugin</artifactId>
214+
<version>3.1.0</version>
215+
<configuration>
216+
<source>1.8</source>
217+
</configuration>
218+
<executions>
219+
<execution>
220+
<id>attach-javadocs</id>
221+
<goals>
222+
<goal>jar</goal>
223+
</goals>
224+
</execution>
225+
</executions>
226+
</plugin>
227+
228+
<!-- region tests report -->
229+
<plugin>
230+
<groupId>org.jacoco</groupId>
231+
<artifactId>jacoco-maven-plugin</artifactId>
232+
<version>0.8.4</version>
233+
<executions>
234+
<execution>
235+
<goals>
236+
<goal>prepare-agent</goal>
237+
</goals>
238+
</execution>
239+
<execution>
240+
<id>report</id>
241+
<phase>test</phase>
242+
<goals>
243+
<goal>report</goal>
244+
</goals>
245+
</execution>
246+
</executions>
247+
</plugin>
248+
<plugin>
249+
<groupId>org.apache.maven.plugins</groupId>
250+
<artifactId>maven-surefire-plugin</artifactId>
251+
<version>2.22.2</version>
252+
<configuration>
253+
<reportFormat>plain</reportFormat>
254+
<includes>
255+
<include>**/*Test*.java</include>
256+
<include>**/*IT*.java</include>
257+
</includes>
258+
</configuration>
259+
</plugin>
260+
<!-- endregion tests report -->
168261
</plugins>
169262

170263
<resources>

src/main/java/com/antkorwin/betterstrings/ast/InnerStringVarsAstTranslator.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,10 @@ public void visitVarDef(JCTree.JCVariableDecl jcVariableDecl) {
7070
private boolean isAnnotatedBySkip(JCTree.JCModifiers modifiers) {
7171

7272
for (JCTree.JCAnnotation annotation : modifiers.getAnnotations()) {
73-
if (annotation.type.toString().equals(DisabledStringInterpolation.class.getCanonicalName())) {
73+
if (annotation.getAnnotationType() == null) {
74+
continue;
75+
}
76+
if (annotation.getAnnotationType().toString().equals(DisabledStringInterpolation.class.getCanonicalName())) {
7477
return true;
7578
}
7679
}

src/test/java/com/antkorwin/betterstrings/BetterStringsProcessorTest.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,4 @@ void onNestedClass() {
158158
assertThat(result).isEqualTo("sum = ${3+4}");
159159
}
160160
}
161-
162-
163161
}

0 commit comments

Comments
 (0)