Mojo's Maven plugin for WebLogic

In the weblogic-maven-plugin, the clientgen and clientgen9 goals do not work on Weblogic 10.3

Details

  • Type: Bug Bug
  • Status: Open Open
  • Priority: Minor Minor
  • Resolution: Unresolved
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None
  • Environment:
    Windows, x86, Weblogic 10.3, weblogic-maven-plugin 2.9.2-SNAPSHOT
  • Testcase included:
    yes
  • Patch Submitted:
    Yes
  • Number of attachments :
    1

Description

If I try to run the weblogic:clientgen9 goal with a Weblogic 10.3 installation, I get the following error:

[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Internal error in the plugin manager executing goal 'org.codehaus.mojo:weblogic-maven-plugin:2.9.2-SNAPSHOT:clientgen9': Unable to find the mojo 'clientgen9' (or one of its required components) in the plugin 'org.codehaus.mojo:weblogic-maven-plugin'
(class: org/codehaus/mojo/weblogic/ClientGen9Mojo, method: execute signature: ()V) Incompatible object argument for function call
[INFO] ------------------------------------------------------------------------

It appears that the weblogic API has changed very slightly so there are compilation errors in the ClientGen9 java file when using Weblogic 10.3 dependencies.
Delete "clientGen.setOverwrite( true );"
Change "clientGen.setDestdir( new File( this.outputDir ) );" to clientGen.setDestDir( new File( this.outputDir ) );"

There is also a NullPointerException that occurs when clearing a system property in WeblogicMojoUtilities.java.
The attached patch (which can be run from the root of the weblogic-maven-plugin project) sets up a new goal (clientgen10), provides a test case, corrects the NullPointerException, and updates the plug-in's version number.

I hope this helps. Thanks for the great plug-in!

--Tim--

Issue Links

Activity

Hide
Torsten Juergeleit added a comment -

How about using reflection for calling the corresponding 2 methods?
A corresponding patch is attached to #MOJO-1417.

Show
Torsten Juergeleit added a comment - How about using reflection for calling the corresponding 2 methods? A corresponding patch is attached to #MOJO-1417.
Hide
Jon Osborn added a comment -

Since it is unlikely that someone would build code to support both weblogic instances in the same build, I would propose just creating a new mojo version with the bugfix. Since WL 10 and 11 are out, does this seem reasonable to folks?

Show
Jon Osborn added a comment - Since it is unlikely that someone would build code to support both weblogic instances in the same build, I would propose just creating a new mojo version with the bugfix. Since WL 10 and 11 are out, does this seem reasonable to folks?
Hide
Jon Osborn added a comment -

For watchers, a new 2.9.3-SNAPSHOT binary has been uploaded that included the fix for this issue. See the http://jira.codehaus.org/browse/MWEBLOGIC-9 issue

Show
Jon Osborn added a comment - For watchers, a new 2.9.3-SNAPSHOT binary has been uploaded that included the fix for this issue. See the http://jira.codehaus.org/browse/MWEBLOGIC-9 issue

People

Vote (3)
Watch (4)

Dates

  • Created:
    Updated: