Skip to content

Commit 16ea8c1

Browse files
Create sources jar from generated code
The new module cf-java-logging-support-servlet-jakarta copies the code of cf-java-logging-servlet and adjusts it to Jakarta dependencies instead of javax. Since the Maven Sources Plugin generates its jars way before the code generation, no sources jar is created. Publishing to Maven Central requires a sources jar. Users also want to have the code when debugging into the library. Switching the Maven phase of the sources plugin creates the desired artefact.
1 parent 5c82d90 commit 16ea8c1

File tree

1 file changed

+23
-0
lines changed
  • cf-java-logging-support-servlet-jakarta

1 file changed

+23
-0
lines changed

cf-java-logging-support-servlet-jakarta/pom.xml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,4 +210,27 @@
210210

211211
</plugins>
212212
</build>
213+
<profiles>
214+
<profile>
215+
<id>ossrh</id>
216+
<build>
217+
<plugins>
218+
<plugin>
219+
<groupId>org.apache.maven.plugins</groupId>
220+
<artifactId>maven-source-plugin</artifactId>
221+
<version>${source.plugin.version}</version>
222+
<executions>
223+
<execution>
224+
<id>attach-sources</id>
225+
<phase>compile</phase>
226+
<goals>
227+
<goal>jar-no-fork</goal>
228+
</goals>
229+
</execution>
230+
</executions>
231+
</plugin>
232+
</plugins>
233+
</build>
234+
</profile>
235+
</profiles>
213236
</project>

0 commit comments

Comments
 (0)