Skip to content

Commit

Permalink
NOJIRA Fixed overlay POMs for context.xml
Browse files Browse the repository at this point in the history
to use consistent configuration for overlay handling of resources, added docs of how context.xml and resource filtering is handled
  • Loading branch information
James Wennmacher authored and drewwills committed Aug 27, 2013
1 parent ff1123e commit 13030c8
Show file tree
Hide file tree
Showing 10 changed files with 197 additions and 34 deletions.
24 changes: 20 additions & 4 deletions uportal-portlets-overlay/AnnouncementsPortlet/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,18 +38,34 @@
</filters>
<resources>
<resource>
<filtering>false</filtering>
<directory>src/main/resources</directory>
<excludes>
<!-- This list needs to be identical to the one below... -->
<exclude>*.properties</exclude>
<exclude>logback.xml</exclude>
</excludes>
</resource>
<resource>
<filtering>true</filtering>
<directory>src/main/resources</directory>
<includes>
<!-- List files or patterns to be filtered here. Restrict the list to avoid accidentally
substituting maven or other environmental tokens in other files.-->
<include>*.properties</include>
<include>logback.xml</include>
</includes>
</resource>
</resources>
<plugins>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<filters>
<filter>${basedir}/../../${filters.file}</filter>
</filters>
<!-- A side effect of this exclude is we'll retain META-INF/context.xml (META-INF is excluded by default) -->
<!-- Remove the dependent war's hsqldb jar so we can use the jdbc artifact configured above as a dependency.
A side effect of this exclude is we'll retain META-INF/context.xml (META-INF is excluded by default).
Context.xml is important because it allows the ResourceUrl to 'see' the ResourceServingWebapp
to determine if a resource is available there, which allows for browser caching of common
libraries -->
<dependentWarExcludes>
WEB-INF/lib/hsqldb-*.jar
</dependentWarExcludes>
Expand Down
23 changes: 20 additions & 3 deletions uportal-portlets-overlay/BookmarksPortlet/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,29 @@
</filters>
<resources>
<resource>
<filtering>false</filtering>
<directory>src/main/resources</directory>
<excludes>
<!-- This list needs to be identical to the one below... -->
<exclude>*.properties</exclude>
<exclude>logback.xml</exclude>
</excludes>
</resource>
<resource>
<filtering>true</filtering>
<directory>src/main/resources</directory>
<includes>
<!-- List files or patterns to be filtered here. Restrict the list to avoid accidentally
substituting maven or other environmental tokens in other files.-->
<include>*.properties</include>
<include>logback.xml</include>
</includes>
</resource>
</resources>
<plugins>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<filters>
<filter>${basedir}/../../${filters.file}</filter>
</filters>
<webResources>
<resource>
<directory>${basedir}/src/main/webapp/WEB-INF</directory>
Expand All @@ -59,6 +71,11 @@
<overlay>
<groupId>org.jasig.portlet</groupId>
<artifactId>BookmarksPortlet</artifactId>
<!-- Remove the dependent war's hsqldb jar so we can use the jdbc artifact configured above as a dependency.
A side effect of this exclude is we'll retain META-INF/context.xml (META-INF is excluded by default).
Context.xml is important because it allows the ResourceUrl to 'see' the ResourceServingWebapp
to determine if a resource is available there, which allows for browser caching of common
libraries -->
<excludes>
<exclude>WEB-INF/tags/uwfn.tld</exclude>
<exclude>WEB-INF/lib/hsqldb-*.jar</exclude>
Expand Down
24 changes: 20 additions & 4 deletions uportal-portlets-overlay/CalendarPortlet/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -55,18 +55,34 @@
</filters>
<resources>
<resource>
<filtering>false</filtering>
<directory>src/main/resources</directory>
<excludes>
<!-- This list needs to be identical to the one below... -->
<exclude>*.properties</exclude>
<exclude>logback.xml</exclude>
</excludes>
</resource>
<resource>
<filtering>true</filtering>
<directory>src/main/resources</directory>
<includes>
<!-- List files or patterns to be filtered here. Restrict the list to avoid accidentally
substituting maven or other environmental tokens in other files.-->
<include>*.properties</include>
<include>logback.xml</include>
</includes>
</resource>
</resources>
<plugins>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<filters>
<filter>${basedir}/../../${filters.file}</filter>
</filters>
<!-- A side effect of this exclude is we'll retain META-INF/context.xml (META-INF is excluded by default) -->
<!-- Remove the dependent war's hsqldb jar so we can use the jdbc artifact configured above as a dependency.
A side effect of this exclude is we'll retain META-INF/context.xml (META-INF is excluded by default).
Context.xml is important because it allows the ResourceUrl to 'see' the ResourceServingWebapp
to determine if a resource is available there, which allows for browser caching of common
libraries -->
<dependentWarExcludes>
WEB-INF/lib/hsqldb-*.jar
</dependentWarExcludes>
Expand Down
21 changes: 20 additions & 1 deletion uportal-portlets-overlay/NewsReaderPortlet/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,34 @@
</filters>
<resources>
<resource>
<filtering>false</filtering>
<directory>src/main/resources</directory>
<excludes>
<!-- This list needs to be identical to the one below... -->
<exclude>*.properties</exclude>
<exclude>logback.xml</exclude>
</excludes>
</resource>
<resource>
<filtering>true</filtering>
<directory>src/main/resources</directory>
<includes>
<!-- List files or patterns to be filtered here. Restrict the list to avoid accidentally
substituting maven or other environmental tokens in other files.-->
<include>*.properties</include>
<include>logback.xml</include>
</includes>
</resource>
</resources>
<plugins>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<!-- A side effect of this exclude is we'll retain META-INF/context.xml (META-INF is excluded by default) -->
<!-- Remove the dependent war's hsqldb jar so we can use the jdbc artifact configured above as a dependency.
A side effect of this exclude is we'll retain META-INF/context.xml (META-INF is excluded by default).
Context.xml is important because it allows the ResourceUrl to 'see' the ResourceServingWebapp
to determine if a resource is available there, which allows for browser caching of common
libraries -->
<dependentWarExcludes>
WEB-INF/lib/hsqldb-*.jar
</dependentWarExcludes>
Expand Down
14 changes: 9 additions & 5 deletions uportal-portlets-overlay/NotificationPortlet/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,17 @@
<excludes>
<!-- This list needs to be identical to the one below... -->
<exclude>*.properties</exclude>
<exclude>logback.xml</exclude>
</excludes>
</resource>
<resource>
<filtering>true</filtering>
<directory>src/main/resources</directory>
<includes>
<!-- List files or patterns to be filtered here... -->
<!-- List files or patterns to be filtered here. Restrict the list to avoid accidentally
substituting maven or other environmental tokens in other files.-->
<include>*.properties</include>
<include>logback.xml</include>
</includes>
</resource>
</resources>
Expand All @@ -62,10 +65,11 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<!-- Define an exclude to insure we retain META-INF/context.xml (META-INF is excluded by default) -->
<dependentWarExcludes>
WEB-INF/lib/hsqldb-*.jar
</dependentWarExcludes>
<!-- By specifying an exclude we'll retain META-INF/context.xml (META-INF is excluded by default).
Context.xml is important because it allows the ResourceUrl to 'see' the ResourceServingWebapp
to determine if a resource is available there, which allows for browser caching of common
libraries -->
<dependentWarExcludes>junkname.jar</dependentWarExcludes>
</configuration>
</plugin>
<plugin>
Expand Down
29 changes: 28 additions & 1 deletion uportal-portlets-overlay/SimpleContentPortlet/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,14 @@
<version>${SimpleContentPortlet.version}</version>
<type>war</type>
</dependency>

<dependency>
<groupId>${jdbc.groupId}</groupId>
<artifactId>${jdbc.artifactId}</artifactId>
<version>${jdbc.version}</version>
<scope>compile</scope>
</dependency>

</dependencies>


Expand All @@ -30,16 +38,35 @@
<filter>../../${filters.file}</filter>
</filters>
<resources>
<resource>
<filtering>false</filtering>
<directory>src/main/resources</directory>
<excludes>
<!-- This list needs to be identical to the one below... -->
<exclude>*.properties</exclude>
<exclude>logback.xml</exclude>
</excludes>
</resource>
<resource>
<filtering>true</filtering>
<directory>src/main/resources</directory>
<includes>
<!-- List files or patterns to be filtered here. Restrict the list to avoid accidentally
substituting maven or other environmental tokens in other files.-->
<include>*.properties</include>
<include>logback.xml</include>
</includes>
</resource>
</resources>
<plugins>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<!-- A side effect of this exclude is we'll retain META-INF/context.xml (META-INF is excluded by default) -->
<!-- Remove the dependent war's hsqldb jar so we can use the jdbc artifact configured above as a dependency.
A side effect of this exclude is we'll retain META-INF/context.xml (META-INF is excluded by default).
Context.xml is important because it allows the ResourceUrl to 'see' the ResourceServingWebapp
to determine if a resource is available there, which allows for browser caching of common
libraries -->
<dependentWarExcludes>
WEB-INF/lib/hsqldb-*.jar
</dependentWarExcludes>
Expand Down
24 changes: 20 additions & 4 deletions uportal-portlets-overlay/WeatherPortlet/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,19 +32,35 @@
</filters>
<resources>
<resource>
<filtering>false</filtering>
<directory>src/main/resources</directory>
<excludes>
<!-- This list needs to be identical to the one below... -->
<exclude>*.properties</exclude>
<exclude>logback.xml</exclude>
</excludes>
</resource>
<resource>
<filtering>true</filtering>
<directory>src/main/resources</directory>
<includes>
<!-- List files or patterns to be filtered here. Restrict the list to avoid accidentally
substituting maven or other environmental tokens in other files.-->
<include>*.properties</include>
<include>logback.xml</include>
</includes>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<!-- Define an exclude to insure we retain META-INF/context.xml (META-INF is excluded by default) -->
<dependentWarExcludes>
WEB-INF/lib/hsqldb-*.jar
</dependentWarExcludes>
<!-- By specifying an exclude we'll retain META-INF/context.xml (META-INF is excluded by default).
Context.xml is important because it allows the ResourceUrl to 'see' the ResourceServingWebapp
to determine if a resource is available there, which allows for browser caching of common
libraries -->
<dependentWarExcludes>junkname.jar</dependentWarExcludes>
</configuration>
</plugin>
<plugin>
Expand Down
24 changes: 20 additions & 4 deletions uportal-portlets-overlay/WebProxyPortlet/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,19 +37,35 @@
<filter>../../${filters.file}</filter>
</filters>
<resources>
<resource>
<filtering>false</filtering>
<directory>src/main/resources</directory>
<excludes>
<!-- This list needs to be identical to the one below... -->
<exclude>*.properties</exclude>
<exclude>logback.xml</exclude>
</excludes>
</resource>
<resource>
<filtering>true</filtering>
<directory>src/main/resources</directory>
<includes>
<!-- List files or patterns to be filtered here. Restrict the list to avoid accidentally
substituting maven or other environmental tokens in other files.-->
<include>*.properties</include>
<include>logback.xml</include>
</includes>
</resource>
</resources>
<plugins>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<filters>
<filter>${basedir}/../../${filters.file}</filter>
</filters>
<!-- A side effect of this exclude is we'll retain META-INF/context.xml (META-INF is excluded by default) -->
<!-- Remove the dependent war's hsqldb jar so we can use the jdbc artifact configured above as a dependency.
A side effect of this exclude is we'll retain META-INF/context.xml (META-INF is excluded by default).
Context.xml is important because it allows the ResourceUrl to 'see' the ResourceServingWebapp
to determine if a resource is available there, which allows for browser caching of common
libraries -->
<dependentWarExcludes>
WEB-INF/lib/hsqldb-*.jar
</dependentWarExcludes>
Expand Down
21 changes: 20 additions & 1 deletion uportal-portlets-overlay/email-preview/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,35 @@
<filter>../../${filters.file}</filter>
</filters>
<resources>
<resource>
<filtering>false</filtering>
<directory>src/main/resources</directory>
<excludes>
<!-- This list needs to be identical to the one below... -->
<exclude>*.properties</exclude>
<exclude>logback.xml</exclude>
</excludes>
</resource>
<resource>
<filtering>true</filtering>
<directory>src/main/resources</directory>
<includes>
<!-- List files or patterns to be filtered here. Restrict the list to avoid accidentally
substituting maven or other environmental tokens in other files.-->
<include>*.properties</include>
<include>logback.xml</include>
</includes>
</resource>
</resources>
<plugins>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<!-- A side effect of this exclude is we'll retain META-INF/context.xml (META-INF is excluded by default) -->
<!-- Remove the dependent war's hsqldb jar so we can use the jdbc artifact configured above as a dependency.
A side effect of this exclude is we'll retain META-INF/context.xml (META-INF is excluded by default).
Context.xml is important because it allows the ResourceUrl to 'see' the ResourceServingWebapp
to determine if a resource is available there, which allows for browser caching of common
libraries -->
<dependentWarExcludes>
WEB-INF/lib/hsqldb-*.jar
</dependentWarExcludes>
Expand Down
Loading

0 comments on commit 13030c8

Please sign in to comment.