Weblogic Preprosessor in Maven

115 Views Asked by At

I have some Java code that is currently packaged in the BEA Workshop for WebLogic Platform.

My task is to migrate the structure of the project (without actually touching the code) to a maven structure to be packaged from command line (or from eclipse m2e).

Problem is, the code has some annotations like this:

    @WebService(serviceName = "Cancelacion", targetNamespace =
            "http://www.banamex.com.mx/OtorgamientoPension/cancelacion")
    @WLHttpTransport(contextPath = "OtorgamientoPension", serviceUri =
            "cancelacion", portName = "cancelacionSOAP")
    @Policies({
            @Policy(uri="policy:Wssp1.2-Wss1.0-X509-Basic256.xml", direction = Policy.Direction.inbound),
    })
public class CancelacionPortImpl implements CancelacionPort {
    ...
}

That create some configuration inside the war (a mysterious meta-inf inside the web-inf and plenty of xml).

Please notice the @Policies which is from a WebLogic library. It creates some security-related config and that's (alongside the ws stuff) is what i want to generate.

Is there a way to process this from maven?

EDIT

So far I have tried with the weblogic-maven-plugin. It didn't work (also, due to internal policies, the not-so-straightforward way of installing this plugin is not an option).

I'm trying to find a vague reference a co-worker gave me about certain "jtools" compiler... but can't find anything that comes with that name and have some relation with WebLogic.

So the @Policies annotation is still a problem.

Right now I'm looking for a eclipse-plugin that does this, based on the premise that was the IDE who process that annotations.


For the wsdl issue, I find out that the namespace definition whas wrong. I corrected it and now it's working. I used the jaxb2-maven-plugin because I have no knowledge of jaxws-maven-plugin and I already had the config of the former.

1

There are 1 best solutions below

1
BrianV On

Looks like you might need some Weblogic classes on your classpath. Short of uploading these to your own private Maven repository, you might consider checking out the Oracle Maven repository to find the Weblogic artifacts you need. Since these are likely container-provided jars (i.e. you don't need to package them in your war), you'll want to define them with a scope of "provided" in your dependencies, e.g. <scope>provided</scope>.