Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/pull-request-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,9 @@ jobs:
- name: Build with Apache Maven
if: ${{ matrix.os != 'windows-latest' }}
run: mvn -U clean install -Djava.awt.headless=true -fae -B -Peverything
- name: Fail if there are uncommitted changes in public-suffix-list.txt
shell: bash
run: |
[[ -z $(git status --porcelain rt/transports/http/src/main/resources/mozilla/public-suffix-list.txt) ]] || { echo 'There are uncommitted changes in public-suffix-list.txt'; git status; git diff; exit 1; }
env:
MAVEN_OPTS: "-Xmx1024M"
19 changes: 16 additions & 3 deletions parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@
<cxf.geronimo.openapi.version>1.0.15</cxf.geronimo.openapi.version>
<cxf.glassfish.el.version>4.0.2</cxf.glassfish.el.version>
<cxf.glassfish.json.version>2.0.1</cxf.glassfish.json.version>
<cxf.groovy.version>4.0.27</cxf.groovy.version>
<cxf.hamcrest.version>3.0</cxf.hamcrest.version>
<cxf.hazelcast.version>5.5.0</cxf.hazelcast.version>
<cxf.hibernate.em.version>6.6.15.Final</cxf.hibernate.em.version>
Expand Down Expand Up @@ -585,7 +586,19 @@
<dependency>
<groupId>org.apache.groovy</groupId>
<artifactId>groovy</artifactId>
<version>4.0.27</version>
<version>${cxf.groovy.version}</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.codehaus.gmaven</groupId>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ppalaga why do we need groovy-maven-plugin plugin? AFAIK it is not supported and will be problematic (potentially) for Maven 4 support.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do we need groovy-maven-plugin plugin?

The first solution I could figure out that does not change the timestamp on the local file when there is no content change. Those timestamps might be important for incremental builds.
Ant plugin could perhaps be used to achieve the same with a bit more code - should I try?

AFAIK it is not supported

In which sense not supported?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In which sense not supported?

It was not updated since 2019 (https://groovy.github.io/gmaven/groovy-maven-plugin/) , probably better wording would be "not maintained".

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see. gmavenplus has some recent releases: https://mvnrepository.com/artifact/org.codehaus.gmavenplus/gmavenplus-plugin
Would that one be OK?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ouch, I just found out, how many changes the suffix file is receiving https://github.com/publicsuffix/list/commits/main/public_suffix_list.dat
It is nearly every day.
I am afraid, the approach proposed in this PR would not be sustainable.

It would actually be enough to update the list shortly before releasing CXF. @ffang I wonder whether there is any release automation in place for CXF? Is there a CI job or a script? If so, the suffix list update could be added there.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @ppalaga ,

No such automation before release where we can put the public_suffix_list.dat update in.

But as we need to do manual steps before each release anyway, like update release notes in distribution/src/main/release/release_notes.txt, so we can also update the offline public_suffix_list.dat before each release.

Cheers
Freeman

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the explanation, @ffang! Is there at least some document somewhere listing the release steps where I could add it?

Copy link
Contributor

@ffang ffang Aug 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @ppalaga ,

We have wiki based page here
https://cxf.apache.org/release-management.html
This should be the page we add that step. When we edit the wiki page, an apache buildbot will sync the change to apache infra svn here
https://svn.apache.org/repos/infra/websites/production/cxf/content/release-management.html

I don't think you have the permission to edit the wiki directly. The simplest way is that you send an old days svn based patch(not a github pull request) to CXF-9158 so we can change the website accordingly once this PR get in.

Best Regards
Freeman

<artifactId>groovy-maven-plugin</artifactId>
<version>2.1.1</version>
<dependencies>
<dependency>
<groupId>org.apache.groovy</groupId>
<artifactId>groovy</artifactId>
<version>${cxf.groovy.version}</version>
</dependency>
</dependencies>
</plugin>
Expand Down Expand Up @@ -2231,7 +2244,7 @@
<name>ekstazi</name>
</property>
</activation>

<build>
<plugins>
<plugin>
Expand All @@ -2252,7 +2265,7 @@
</execution>
</executions>
</plugin>

<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
Expand Down
100 changes: 46 additions & 54 deletions rt/transports/http/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -157,60 +157,52 @@
</extensions>
</configuration>
</plugin>
<plugin>
<groupId>com.googlecode.maven-download-plugin</groupId>
<artifactId>download-maven-plugin</artifactId>
<version>1.13.0</version>
<executions>
<execution>
<id>download-public-suffix-list</id>
<phase>generate-sources</phase>
<goals>
<goal>wget</goal>
</goals>
<configuration>
<url>${cxf.public.suffix.list.url}</url>
<outputDirectory>${project.build.outputDirectory}/mozilla</outputDirectory>
<outputFileName>public-suffix-list.txt</outputFileName>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
<pluginManagement>
<plugins>
<!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
<plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
<version>1.0.0</version>
<configuration>
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>
com.googlecode.maven-download-plugin
</groupId>
<artifactId>
download-maven-plugin
</artifactId>
<versionRange>
[1.2.0,)
</versionRange>
<goals>
<goal>wget</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore />
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
<profiles>
<profile>
<id>online</id>
<activation>
<property>
<!-- Active by default, Inactive with -Doffline -->
<name>!offline</name>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.gmaven</groupId>
<artifactId>groovy-maven-plugin</artifactId>
<executions>
<execution>
<id>download-public-suffix-list</id>
<phase>generate-sources</phase>
<goals>
<goal>execute</goal>
</goals>
<configuration>
<!-- Download the suffix file and store it locally only if the content changes -->
<!-- so that the file timestamp does not change on every build -->
<source>
import java.nio.file.Files
def newContent = new URL(project.properties['cxf.public.suffix.list.url']).text
String relPath = 'src/main/resources/mozilla/public-suffix-list.txt'
def destPath = java.nio.file.Path.of(project.properties['project.basedir'] + relPath)
if (!Files.exists(destPath) || !newContent.equals(destPath.getText('UTF-8'))) {
Files.createDirectories(destPath.getParent())
destPath.setText(newContent.toString(), 'UTF-8')
println('🚀 Updating ' + relPath)
} else {
println('✅ Up to date: ' + relPath)
}
</source>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

</profile>
</profiles>
</project>
Loading
Loading