redfish4ktc / maven-soapui-extension-plugin

This plugin adds new features and bug fixes to SmartBear plugins: soapui-pro-maven-plugin and soapui-maven-plugin.
Apache License 2.0
45 stars 22 forks source link

[test-multi goal] add support for maven 2.2.1 #108

Closed redfish4ktc closed 9 years ago

redfish4ktc commented 10 years ago

Currently (4.6.3.1 version), execution fails with the following message

[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Failed to configure plugin parameters for: com.github.redfish4ktc.soapui:maven-soapui-extension-plugin:4.6.3.1-SNAPSHOT
Cause: Class 'java.util.List' cannot be instantiated
[INFO] ------------------------------------------------------------------------
[INFO] Trace
[INFO] org.apache.maven.lifecycle.LifecycleExecutionException: Error configuring: com.github.redfish4ktc.soapui:maven-soapui-extension-plugin. Reason: Unable to parse the created DOM for plugin configuration
[INFO]  at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:723)
[INFO]  at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556)
[INFO]  at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535)
[INFO]  at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
[INFO]  at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
[INFO]  at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
[INFO]  at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
[INFO]  at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
[INFO]  at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
[INFO]  at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
[INFO]  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[INFO]  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[INFO]  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[INFO]  at java.lang.reflect.Method.invoke(Method.java:483)
[INFO]  at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
[INFO]  at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
[INFO]  at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
[INFO]  at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
[INFO] Caused by: org.apache.maven.plugin.PluginConfigurationException: Error configuring: com.github.redfish4ktc.soapui:maven-soapui-extension-plugin. Reason: Unable to parse the created DOM for plugin configuration
[INFO]  at org.apache.maven.plugin.DefaultPluginManager.populatePluginFields(DefaultPluginManager.java:1363)
[INFO]  at org.apache.maven.plugin.DefaultPluginManager.getConfiguredMojo(DefaultPluginManager.java:724)
[INFO]  at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:468)
[INFO]  at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
[INFO]  ... 17 more
[INFO] Caused by: org.codehaus.plexus.component.configurator.ComponentConfigurationException: Class 'java.util.List' cannot be instantiated
[INFO]  at org.codehaus.plexus.component.configurator.converters.AbstractConfigurationConverter.instantiateObject(AbstractConfigurationConverter.java:121)
[INFO]  at org.codehaus.plexus.component.configurator.converters.composite.CollectionConverter.fromConfiguration(CollectionConverter.java:73)
[INFO]  at org.codehaus.plexus.component.configurator.converters.ComponentValueSetter.configure(ComponentValueSetter.java:247)
[INFO]  at org.codehaus.plexus.component.configurator.converters.composite.ObjectWithFieldsConverter.processConfiguration(ObjectWithFieldsConverter.java:137)
[INFO]  at org.codehaus.plexus.component.configurator.BasicComponentConfigurator.configureComponent(BasicComponentConfigurator.java:56)
[INFO]  at org.apache.maven.plugin.DefaultPluginManager.populatePluginFields(DefaultPluginManager.java:1357)
[INFO]  ... 20 more
[INFO] Caused by: java.lang.InstantiationException: java.util.List
[INFO]  at java.lang.Class.newInstance(Class.java:418)
[INFO]  at org.codehaus.plexus.component.configurator.converters.AbstractConfigurationConverter.instantiateObject(AbstractConfigurationConverter.java:111)
[INFO]  ... 25 more
[INFO] Caused by: java.lang.NoSuchMethodException: java.util.List.<init>()
[INFO]  at java.lang.Class.getConstructor0(Class.java:2963)
[INFO]  at java.lang.Class.newInstance(Class.java:403)
[INFO]  ... 26 more

I found the same behaviour related by another plugin maintainer: http://stackoverflow.com/questions/17796756/maven-2-reports-java-util-list-cannot-be-instantiated-error

redfish4ktc commented 10 years ago

If specific workaround needs to be implemented, update #31

temas-hub commented 9 years ago

I've just fixed this problem like this: ../../git/maven-soapui-extension-plugin/src/main/java/org/ktc/soapui/maven/extension/TestMultiMojo.java

-    private List<ProjectFilesScan> projectFiles;
+    private ProjectFilesScan[] projectFiles;

-        public Set<String> includes;
-        public Set<String> excludes;
+        public String[] includes;
+        public String[] excludes;

Could you consider to include this fix to the next update?

redfish4ktc commented 9 years ago

@temas-hub thanks for the suggestion, I will try to manage it in 4.6.4.2

redfish4ktc commented 9 years ago

@temas-hub I have commited a fix, my tests show that I don't need to update the Set fields in the ProjectFilesScan class. Can you confirm this is not needed please?

temas-hub commented 9 years ago

@redfish4ktc Confirmed. Maven 2.x needs only List type to be replaced. Thanks for your work! When do you expect to release 4.6.4.2?

redfish4ktc commented 9 years ago

@temas-hub I will try to cut a new release this week or next week.

temas-hub commented 9 years ago

@redfish4ktc Do you still plan to cut it in near future? Thanks

redfish4ktc commented 9 years ago

@temas-hub sorry for the delay, I didn't have time to work on the plugin. I will do my best to cut a release at least with the fix you are waiting for :smile:

redfish4ktc commented 9 years ago

@temas-hub 4.6.4.2 is now released and includes #108