[JIRA] (IDP-1955) Add attachClasses to the maven-war-plugin in idp-parent

Dan McLaughlin (Jira) jira at shibboleth.atlassian.net
Wed Aug 10 03:28:26 UTC 2022


Dan McLaughlin ( https://shibboleth.atlassian.net/secure/ViewProfile.jspa?accountId=557058%3A3a8d6dab-64f5-4a62-a23e-1603099d1796 ) *commented* on IDP-1955 ( https://shibboleth.atlassian.net/browse/IDP-1955?atlOrigin=eyJpIjoiZTMyY2NhODY0NGFkNDNlYjk0MTRlOGM3MGM4NmM2MmUiLCJwIjoiaiJ9 )

Re: Add attachClasses to the maven-war-plugin in idp-parent ( https://shibboleth.atlassian.net/browse/IDP-1955?atlOrigin=eyJpIjoiZTMyY2NhODY0NGFkNDNlYjk0MTRlOGM3MGM4NmM2MmUiLCJwIjoiaiJ9 )

I just figured out another way to get things working. By adding both the war and pom I was then able to get Maven dependency management to allow me to override dependencies in the war overlay. You can close this ticket.

Here is an example…

<dependency>
<groupId>net.shibboleth.idp</groupId>
<artifactId>idp-war</artifactId>
<version>4.2.1</version>
<type>war</type>
</dependency>

<dependency>
<groupId>net.shibboleth.idp</groupId>
<artifactId>idp-war</artifactId>
<version>4.2.1</version>
<type>pom</type>
<scope>import</scope>
</dependency>

Then I was able to use the maven-war-plugin to create the idp war with our customizations, and use the dependency versions from our dependencyMangement.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<executions>
<execution>
<id>default-war</id>
<goals>
<goal>war</goal>
</goals>
<phase>package</phase>
<configuration>
<skip>true</skip>
</configuration>
</execution>
<execution>
<id>exploded-war</id>
<goals>
<goal>exploded</goal>
</goals>
<phase>prepare-package</phase>
<configuration>
<webappDirectory>$

{project.build.directory}/exploded-war</webappDirectory>
<webResources>
<resource>
<directory>${project.build.directory}

/common-webresources</directory>
<exclude>**/log4j2.xml</exclude>
</resource>
<resource>
<directory>
$

{project.basedir}

/node_modules/@com.foo.bar/ui/dist/common-resources
</directory>
</resource>
</webResources>
<overlays>
<overlay>
<groupId>net.shibboleth.idp</groupId>
<artifactId>idp-war</artifactId>
<excludes>
<exclude>WEB-INF/lib/*</exclude>
</excludes>
</overlay>
</overlays>
</configuration>
</execution>
<execution>
<id>package-war</id>
<goals>
<goal>war</goal>
</goals>
<phase>package</phase>
<configuration>
<warSourceDirectory>$

{project.build.directory}/exploded-war</warSourceDirectory>
<webXml>${project.build.directory}

/exploded-war/WEB-INF/web.xml</webXml>
<containerConfigXML>$

{project.build.directory}

/exploded-war/META-INF/context.xml
</containerConfigXML>
<overlays>
<overlay>
<groupId>net.shibboleth.idp</groupId>
<artifactId>idp-war</artifactId>
<skip>true</skip>
</overlay>
</overlays>
</configuration>
</execution>
</executions>
</plugin>

( https://shibboleth.atlassian.net/browse/IDP-1955#add-comment?atlOrigin=eyJpIjoiZTMyY2NhODY0NGFkNDNlYjk0MTRlOGM3MGM4NmM2MmUiLCJwIjoiaiJ9 ) Add Comment ( https://shibboleth.atlassian.net/browse/IDP-1955#add-comment?atlOrigin=eyJpIjoiZTMyY2NhODY0NGFkNDNlYjk0MTRlOGM3MGM4NmM2MmUiLCJwIjoiaiJ9 )

Get Jira notifications on your phone! Download the Jira Cloud app for Android ( https://play.google.com/store/apps/details?id=com.atlassian.android.jira.core&referrer=utm_source%3DNotificationLink%26utm_medium%3DEmail ) or iOS ( https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=EmailNotificationLink&mt=8 ) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100204- sha1:2e7ea99 )
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://shibboleth.net/pipermail/commits/attachments/20220810/173b82e1/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: jira-generated-image-static-comment-icon-df9b177d-0a75-44de-8825-b366b6f94dca
Type: image/png
Size: 1084 bytes
Desc: not available
URL: <http://shibboleth.net/pipermail/commits/attachments/20220810/173b82e1/attachment-0003.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: jira-generated-image-avatar-5fdcdedf-230c-473b-861e-d3e8ed2fa26b
Type: image/png
Size: 457 bytes
Desc: not available
URL: <http://shibboleth.net/pipermail/commits/attachments/20220810/173b82e1/attachment-0004.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: jira-generated-image-static-footer-desktop-logo-8cd89911-3a91-4baa-94b4-04ccb2af9b9e
Type: image/png
Size: 10805 bytes
Desc: not available
URL: <http://shibboleth.net/pipermail/commits/attachments/20220810/173b82e1/attachment-0005.png>


More information about the commits mailing list