generated from quarkiverse/quarkiverse-template
-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move com.sun.xml.messaging.saaj:saaj-impl related build steps to a se…
…parate SaajImplProcessor class
- Loading branch information
Showing
3 changed files
with
61 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
61 changes: 61 additions & 0 deletions
61
core/deployment/src/main/java/io/quarkiverse/cxf/deployment/SaajImplProcessor.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
package io.quarkiverse.cxf.deployment; | ||
|
||
import java.util.stream.Stream; | ||
|
||
import io.quarkus.deployment.annotations.BuildProducer; | ||
import io.quarkus.deployment.annotations.BuildStep; | ||
import io.quarkus.deployment.builditem.IndexDependencyBuildItem; | ||
import io.quarkus.deployment.builditem.nativeimage.ReflectiveClassBuildItem; | ||
import io.quarkus.deployment.builditem.nativeimage.ServiceProviderBuildItem; | ||
|
||
/** | ||
* {@link BuildStep}s related to {@code com.sun.xml.messaging.saaj:saaj-impl} | ||
*/ | ||
class SaajImplProcessor { | ||
|
||
@BuildStep | ||
void indexDependencies(BuildProducer<IndexDependencyBuildItem> indexDependencies) { | ||
Stream.of( | ||
"com.sun.xml.messaging.saaj:saaj-impl") | ||
.forEach(ga -> { | ||
String[] coords = ga.split(":"); | ||
indexDependencies.produce(new IndexDependencyBuildItem(coords[0], coords[1])); | ||
}); | ||
} | ||
|
||
@BuildStep | ||
void serviceProviders(BuildProducer<ServiceProviderBuildItem> serviceProvider) { | ||
String[] soapVersions = new String[] { "1_1", "1_2" }; | ||
for (String version : soapVersions) { | ||
serviceProvider.produce( | ||
new ServiceProviderBuildItem( | ||
"javax.xml.soap.MessageFactory", | ||
"com.sun.xml.messaging.saaj.soap.ver" + version + ".SOAPMessageFactory" + version + "Impl")); | ||
|
||
serviceProvider.produce( | ||
new ServiceProviderBuildItem( | ||
"javax.xml.soap.SOAPFactory", | ||
"com.sun.xml.messaging.saaj.soap.ver" + version + ".SOAPFactory" + version + "Impl")); | ||
} | ||
|
||
serviceProvider.produce( | ||
new ServiceProviderBuildItem( | ||
"javax.xml.soap.SOAPConnectionFactory", | ||
"com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnectionFactory")); | ||
|
||
serviceProvider.produce( | ||
new ServiceProviderBuildItem( | ||
"javax.xml.soap.SAAJMetaFactory", | ||
"com.sun.xml.messaging.saaj.soap.SAAJMetaFactoryImpl")); | ||
} | ||
|
||
@BuildStep | ||
void registerForReflection(BuildProducer<ReflectiveClassBuildItem> reflectiveClass) { | ||
|
||
// TODO check whether these are required at all or whether some can be registered with false, false | ||
reflectiveClass.produce(new ReflectiveClassBuildItem(true, true, | ||
"com.sun.xml.messaging.saaj.soap.SOAPDocumentImpl")); | ||
|
||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters