Skip to content

Commit 79ed42b

Browse files
author
Eric K. Sender
authored
Delombok source code jar (#59)
- Found error message around @nonnull changed to non-null. Adjusted relevant tests for this.
1 parent 9c391cc commit 79ed42b

2 files changed

Lines changed: 96 additions & 8 deletions

File tree

pom.xml

Lines changed: 94 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
<groupId>net.juniper.netconf</groupId>
99
<artifactId>netconf-java</artifactId>
10-
<version>2.1.1.6-SNAPSHOT</version>
10+
<version>2.1.1.6.2-eks</version>
1111
<packaging>jar</packaging>
1212

1313
<properties>
@@ -67,20 +67,111 @@
6767
</plugin>
6868

6969
<plugin>
70-
<groupId>org.apache.maven.plugins</groupId>
7170
<artifactId>maven-surefire-plugin</artifactId>
7271
<version>3.0.0-M3</version>
7372
<configuration>
7473
<redirectTestOutputToFile>true</redirectTestOutputToFile>
7574
</configuration>
7675
</plugin>
7776

77+
<plugin>
78+
<groupId>org.projectlombok</groupId>
79+
<artifactId>lombok-maven-plugin</artifactId>
80+
<version>1.18.20.0</version>
81+
<executions>
82+
<execution>
83+
<phase>generate-sources</phase>
84+
<goals>
85+
<goal>delombok</goal>
86+
</goals>
87+
</execution>
88+
</executions>
89+
<configuration>
90+
<sourceDirectory>src/main/java</sourceDirectory>
91+
<outputDirectory>${project.build.directory}/delombok</outputDirectory>
92+
<addOutputDirectory>false</addOutputDirectory>
93+
<encoding>UTF-8</encoding>
94+
</configuration>
95+
</plugin>
96+
97+
<plugin>
98+
<artifactId>maven-resources-plugin</artifactId>
99+
<version>3.2.0</version>
100+
<executions>
101+
<execution>
102+
<id>copy-to-lombok-build</id>
103+
<phase>process-resources</phase>
104+
<goals>
105+
<goal>copy-resources</goal>
106+
</goals>
107+
<configuration>
108+
<resources>
109+
<resource>
110+
<directory>${project.basedir}/src/main/resources</directory>
111+
</resource>
112+
</resources>
113+
<outputDirectory>${project.build.directory}/delombok</outputDirectory>
114+
</configuration>
115+
</execution>
116+
</executions>
117+
</plugin>
118+
119+
<plugin>
120+
<artifactId>maven-antrun-plugin</artifactId>
121+
<version>1.8</version>
122+
<executions>
123+
<execution>
124+
<id>generate-delomboked-sources-jar</id>
125+
<phase>package</phase>
126+
<goals>
127+
<goal>run</goal>
128+
</goals>
129+
<configuration>
130+
<target>
131+
<jar destfile="${project.build.directory}/${project.build.finalName}-sources.jar"
132+
basedir="${project.build.directory}/delombok"/>
133+
</target>
134+
</configuration>
135+
</execution>
136+
</executions>
137+
</plugin>
138+
139+
<plugin>
140+
<artifactId>maven-install-plugin</artifactId>
141+
<version>2.5.2</version>
142+
<executions>
143+
<execution>
144+
<id>install-source-jar</id>
145+
<goals>
146+
<goal>install-file</goal>
147+
</goals>
148+
<phase>install</phase>
149+
<configuration>
150+
<file>${project.build.directory}/${project.build.finalName}-sources.jar</file>
151+
<groupId>${project.groupId}</groupId>
152+
<artifactId>${project.artifactId}</artifactId>
153+
<version>${project.version}</version>
154+
<classifier>sources</classifier>
155+
<generatePom>true</generatePom>
156+
<pomFile>${project.basedir}/pom.xml</pomFile>
157+
</configuration>
158+
</execution>
159+
</executions>
160+
</plugin>
161+
78162
<plugin>
79163
<artifactId>maven-compiler-plugin</artifactId>
80164
<version>3.8.0</version>
81165
<configuration>
82166
<source>1.8</source>
83167
<target>1.8</target>
168+
<annotationProcessorPaths>
169+
<path>
170+
<groupId>org.projectlombok</groupId>
171+
<artifactId>lombok</artifactId>
172+
<version>1.18.22</version>
173+
</path>
174+
</annotationProcessorPaths>
84175
<compilerArgs>
85176
<arg>-J--add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED</arg>
86177
<arg>-J--add-opens=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED</arg>
@@ -96,7 +187,6 @@
96187
</configuration>
97188
</plugin>
98189
<plugin>
99-
<groupId>org.apache.maven.plugins</groupId>
100190
<artifactId>maven-source-plugin</artifactId>
101191
<version>3.2.1</version>
102192
<executions>
@@ -109,7 +199,6 @@
109199
</executions>
110200
</plugin>
111201
<plugin>
112-
<groupId>org.apache.maven.plugins</groupId>
113202
<artifactId>maven-javadoc-plugin</artifactId>
114203
<version>3.2.0</version>
115204
<executions>
@@ -149,7 +238,6 @@
149238
<reporting>
150239
<plugins>
151240
<plugin>
152-
<groupId>org.apache.maven.plugins</groupId>
153241
<artifactId>maven-javadoc-plugin</artifactId>
154242
<version>3.2.0</version>
155243
<configuration>
@@ -169,7 +257,7 @@
169257
<groupId>org.projectlombok</groupId>
170258
<artifactId>lombok</artifactId>
171259
<scope>provided</scope>
172-
<version>1.18.6</version>
260+
<version>1.18.22</version>
173261
</dependency>
174262
<dependency>
175263
<groupId>org.slf4j</groupId>

src/test/java/net/juniper/netconf/DeviceTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,14 +140,14 @@ public void GIVEN_sshAvailableNetconfNot_THEN_closeDevice() throws Exception {
140140
public void GIVEN_newDevice_WHEN_withNullUserName_THEN_throwsException() {
141141
assertThatThrownBy(() -> Device.builder().hostName("foo").build())
142142
.isInstanceOf(NullPointerException.class)
143-
.hasMessage("userName is marked @NonNull but is null");
143+
.hasMessage("userName is marked non-null but is null");
144144
}
145145

146146
@Test
147147
public void GIVEN_newDevice_WHEN_withHostName_THEN_throwsException() {
148148
assertThatThrownBy(() -> Device.builder().userName("foo").build())
149149
.isInstanceOf(NullPointerException.class)
150-
.hasMessage("hostName is marked @NonNull but is null");
150+
.hasMessage("hostName is marked non-null but is null");
151151
}
152152

153153
@Test

0 commit comments

Comments
 (0)