Skip to content

Commit

Permalink
Merge remote-tracking branch 'ao-oss-parent/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
newmediaworks committed Aug 17, 2023
2 parents c2990b8 + b2aeca8 commit 9ebf609
Show file tree
Hide file tree
Showing 3 changed files with 70 additions and 5 deletions.
10 changes: 9 additions & 1 deletion book/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ along with nmw-oss-parent. If not, see <https://www.gnu.org/licenses/>.
</parent>

<groupId>com.newmediaworks</groupId><artifactId>nmw-oss-parent-book</artifactId><version>1.20.0-SNAPSHOT</version>
<packaging>bundle</packaging>
<packaging>jar</packaging>

<properties>
<module.name>com.newmediaworks.oss.parent.book</module.name>
Expand Down Expand Up @@ -150,6 +150,14 @@ along with nmw-oss-parent. If not, see <https://www.gnu.org/licenses/>.
</instructions>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId><artifactId>maven-jar-plugin</artifactId>
<configuration>
<excludes>
<exclude>**/module-info.class</exclude>
</excludes>
</configuration>
</plugin>
</plugins>
</build>
</profile>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ along with nmw-oss-parent. If not, see <https://www.gnu.org/licenses/>.
shortTitle="Changelog"
tocLevels="1"
datePublished="2019-05-24T19:05:12-05:00"
dateModified="2023-08-16T21:22:51Z"
dateModified="2023-08-17T20:46:40Z"
>
<c:if test="${fn:endsWith('@{project.version}', '-SNAPSHOT') and !fn:endsWith('@{project.version}', '-POST-SNAPSHOT')}">
<changelog:release
Expand All @@ -54,6 +54,31 @@ along with nmw-oss-parent. If not, see <https://www.gnu.org/licenses/>.
via <ao:a href="https://github.com/git-commit-id/git-commit-id-maven-plugin">git-commit-id-maven-plugin</ao:a>.
</li>
<li>Builds now require Java 11 or newer.</li>
<li>
Builds now require Maven 3.9.0 or newer for
<ao:a href="https://maven.apache.org/guides/introduction/introduction-to-profiles.html">profile activation by packaging</ao:a>.
</li>
<li>
<p>
Using packaging=jar instead of packaging=bundle for all jar projects.
OSGI manifest entries are still added, however, as documented at
<ao:a href="https://felix.apache.org/documentation/subprojects/apache-felix-maven-bundle-plugin-bnd.html#_adding_osgi_metadata_to_existing_projects_without_changing_the_packaging_type">
Adding OSGi metadata to existing projects without changing the packaging type
</ao:a>.
This has the side effect that projects that were previously packaging=jar will now have
OSGI manifest entries added. None of our projects were previously of the jar packaging.
</p>
<p>
This change is required since <ao:a href="https://felix.apache.org/documentation/subprojects/apache-felix-maven-bundle-plugin-bnd.html">maven-bundle-plugin</ao:a>
has been <ao:a href="https://github.com/FasterXML/jackson-databind/issues/3680">adding entries with a constant and hard-coded timestamp of 1980-02-01</ao:a>.
</p>
<p>
These constant timestamps are incompatible with the automatic lastModified parameters added by
<ao:a href="https://oss.aoapps.com/servlet-last-modified/">AO Servlet Last Modified</ao:a> when the resource
is contained in a JAR file within <code>WEB-INF/lib</code>. This has resulted in browsers using
out-of-date cached content.
</p>
</li>
</ul>
</changelog:release>
</c:if>
Expand Down
38 changes: 35 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,10 @@ along with nmw-oss-parent. If not, see <https://www.gnu.org/licenses/>.
<!-- Google Analytics tracking code for the javadocs -->
<google.analytics.trackingId>UA-177004-2</google.analytics.trackingId>
<!--
The Java module name, defaulting to the value previously used for "Bundle-SymbolicName" in Java < 9. All projects should set this to match the module name defined in "module-info.java". Furthermore, projects without "module-info.java" should also add the "Automatic-Module-Name" manifest entry. -->
The Java module name, defaulting to the value previously used for "Bundle-SymbolicName" in Java < 9. All projects
should set this to match the module name defined in "module-info.java". Furthermore, projects without
"module-info.java" should also add the "Automatic-Module-Name" manifest entry.
-->
<module.name>${project.groupId}.${project.artifactId}</module.name>
<!-- Default bundle resources-filtered, may be overridden as part of "alt.build.dir" property -->
<bundle.resources-filtered>target/resources-filtered</bundle.resources-filtered>
Expand Down Expand Up @@ -1618,8 +1621,8 @@ along with nmw-oss-parent. If not, see <https://www.gnu.org/licenses/>.
<configuration>
<rules>
<requireMavenVersion>
<message>Maven &gt;= 3.6.3 required by maven-help-plugin</message>
<version>[3.6.3,)</version>
<message>Maven &gt;= 3.9.0 required for profile activation by packaging</message>
<version>[3.9.0,)</version>
</requireMavenVersion>
</rules>
</configuration>
Expand Down Expand Up @@ -2006,6 +2009,35 @@ along with nmw-oss-parent. If not, see <https://www.gnu.org/licenses/>.
</plugins>
</build>
</profile>
<!-- See https://felix.apache.org/documentation/subprojects/apache-felix-maven-bundle-plugin-bnd.html#_adding_osgi_metadata_to_existing_projects_without_changing_the_packaging_type -->
<profile>
<id>packaging-jar</id>
<activation><property><name>packaging</name><value>jar</value></property></activation>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId><artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
</archive>
</configuration>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.felix</groupId><artifactId>maven-bundle-plugin</artifactId>
<executions>
<execution>
<id>bundle-manifest</id><phase>process-classes</phase><goals><goal>manifest</goal></goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<!-- Fix the scroll position in Java 11 javadoc -->
<profile>
<id>nmw-javadoc-resources-addStylesheet-java-11</id>
Expand Down

0 comments on commit 9ebf609

Please sign in to comment.