Skip to content

Commit 50c80d3

Browse files
RAMPART-454 Fix rampart-dist lib/ layout for OpenSAML 5
The hand-curated <include> list in bin.xml referenced artifacts that no longer exist (opensaml-core, net.shibboleth.utilities:java-support, net.shibboleth:cryptography-api) and omitted the 5.x-split artifacts (opensaml-core-api, opensaml-core-impl, opensaml-messaging-api, opensaml-profile-api, opensaml-xacml-saml-api, opensaml-xacml-saml-impl, the new net.shibboleth:shib-* artifacts, etc.). Running the samples against the resulting dist produced a sealing violation in org.opensaml.security.config and ClassNotFoundException for InitializationException. Switch the lib/ dependencySet to useTransitiveDependencies + useTransitiveFiltering (so it follows the real 5.x dependency graph) and explicitly exclude artifacts that are already shipped by the Axis2 binary distribution. Without those excludes we ship, for example, httpcore5 5.2.5 alongside Axis2's httpcore5 5.4.2, which then breaks HTTPClient5 transport with "NoSuchMethodError: ...Http1Config". Verified: unzip axis2-2.0.1 + rampart-dist, ant setup, then ant service.NN / ant client.NN for all nine policy samples pass.
1 parent 8e4a0ca commit 50c80d3

1 file changed

Lines changed: 49 additions & 35 deletions

File tree

modules/distribution/bin.xml

Lines changed: 49 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -14,41 +14,55 @@
1414
</dependencySet>
1515
<dependencySet>
1616
<outputDirectory>lib</outputDirectory>
17-
<includes>
18-
<include>org.apache.wss4j:wss4j-ws-security-common:jar</include>
19-
<include>org.apache.wss4j:wss4j-ws-security-dom:jar</include>
20-
<include>org.apache.wss4j:wss4j-ws-security-stax:jar</include>
21-
<include>org.apache.wss4j:wss4j-policy:jar</include>
22-
<include>org.apache.wss4j:wss4j-bindings:jar</include>
23-
<include>org.bouncycastle:bcprov-jdk18on:jar</include>
24-
<include>org.apache.rampart:rampart-core:jar</include>
25-
<include>org.apache.rampart:rampart-policy:jar</include>
26-
<include>org.apache.rampart:rampart-trust:jar</include>
27-
<include>org.opensaml:opensaml-core:jar</include>
28-
<include>org.opensaml:opensaml-saml-api:jar</include>
29-
<include>org.opensaml:opensaml-saml-impl:jar</include>
30-
<include>org.opensaml:opensaml-soap-impl:jar</include>
31-
<include>org.opensaml:opensaml-soap-api:jar</include>
32-
<include>org.opensaml:opensaml-xacml-impl:jar</include>
33-
<include>org.opensaml:opensaml-xacml-api:jar</include>
34-
<include>org.opensaml:opensaml-xmlsec-api:jar</include>
35-
<include>org.opensaml:opensaml-xmlsec-impl:jar</include>
36-
<include>org.opensaml:opensaml-security-api:jar</include>
37-
<include>org.opensaml:opensaml-security-impl:jar</include>
38-
<include>net.shibboleth.utilities:java-support:jar</include>
39-
<include>net.shibboleth:cryptography-api:jar</include>
40-
<include>io.dropwizard.metrics:metrics-core:jar</include>
41-
<include>org.cryptacular:cryptacular:jar</include>
42-
<include>org.apache.santuario:xmlsec:jar</include>
43-
<include>org.owasp.esapi:esapi:jar</include>
44-
<include>org.slf4j:slf4j-api:jar</include>
45-
<include>org.apache.logging.log4j:log4j-jcl:jar</include>
46-
<include>org.apache.logging.log4j:log4j-slf4j-impl:jar</include>
47-
<include>org.apache.logging.log4j:log4j-core:jar</include>
48-
<include>org.apache.logging.log4j:log4j-api:jar</include>
49-
<include>velocity:velocity:jar</include>
50-
<include>commons-lang:commons-lang:jar</include>
51-
</includes>
17+
<useTransitiveDependencies>true</useTransitiveDependencies>
18+
<useTransitiveFiltering>true</useTransitiveFiltering>
19+
<excludes>
20+
<!-- mar artifacts are placed in modules/ by the preceding dependencySet -->
21+
<exclude>org.apache.rampart:rampart:mar</exclude>
22+
<exclude>org.apache.rampart:rahas:mar</exclude>
23+
<!-- Artifacts already shipped in the Axis2 binary distribution.
24+
Including them here would put duplicate versions on the classpath. -->
25+
<exclude>com.fasterxml.woodstox:woodstox-core</exclude>
26+
<exclude>com.google.code.findbugs:jsr305</exclude>
27+
<exclude>com.google.guava:failureaccess</exclude>
28+
<exclude>com.google.guava:guava</exclude>
29+
<exclude>com.sun.istack:istack-commons-runtime</exclude>
30+
<exclude>commons-io:commons-io</exclude>
31+
<exclude>commons-logging:commons-logging</exclude>
32+
<exclude>jakarta.activation:jakarta.activation-api</exclude>
33+
<exclude>jakarta.mail:jakarta.mail-api</exclude>
34+
<exclude>jakarta.transaction:jakarta.transaction-api</exclude>
35+
<exclude>jakarta.ws.rs:jakarta.ws.rs-api</exclude>
36+
<exclude>jakarta.xml.bind:jakarta.xml.bind-api</exclude>
37+
<exclude>jaxen:jaxen</exclude>
38+
<exclude>org.apache.axis2:axis2-kernel</exclude>
39+
<exclude>org.apache.axis2:axis2-mtompolicy</exclude>
40+
<exclude>org.apache.axis2:mex</exclude>
41+
<exclude>org.apache.commons:commons-fileupload2-core</exclude>
42+
<exclude>org.apache.commons:commons-fileupload2-jakarta-servlet6</exclude>
43+
<exclude>org.apache.httpcomponents.client5:httpclient5</exclude>
44+
<exclude>org.apache.httpcomponents.core5:httpcore5</exclude>
45+
<exclude>org.apache.httpcomponents.core5:httpcore5-h2</exclude>
46+
<exclude>org.apache.james:apache-mime4j-core</exclude>
47+
<exclude>org.apache.logging.log4j:log4j-api</exclude>
48+
<exclude>org.apache.logging.log4j:log4j-core</exclude>
49+
<exclude>org.apache.logging.log4j:log4j-jcl</exclude>
50+
<exclude>org.apache.neethi:neethi</exclude>
51+
<exclude>org.apache.ws.commons.axiom:axiom-api</exclude>
52+
<exclude>org.apache.ws.commons.axiom:axiom-dom</exclude>
53+
<exclude>org.apache.ws.commons.axiom:axiom-impl</exclude>
54+
<exclude>org.apache.ws.commons.axiom:axiom-jakarta-activation</exclude>
55+
<exclude>org.apache.ws.commons.axiom:axiom-legacy-attachments</exclude>
56+
<exclude>org.apache.ws.xmlschema:xmlschema-core</exclude>
57+
<exclude>org.codehaus.woodstox:stax2-api</exclude>
58+
<exclude>org.eclipse.angus:angus-activation</exclude>
59+
<exclude>org.glassfish.jaxb:jaxb-core</exclude>
60+
<exclude>org.glassfish.jaxb:jaxb-runtime</exclude>
61+
<exclude>org.glassfish.jaxb:txw2</exclude>
62+
<exclude>org.jspecify:jspecify</exclude>
63+
<exclude>org.slf4j:slf4j-api</exclude>
64+
<exclude>wsdl4j:wsdl4j</exclude>
65+
</excludes>
5266
</dependencySet>
5367
</dependencySets>
5468
<fileSets>

0 commit comments

Comments
 (0)