After a day pulling my hair out, I finally found the problem: I added the <preinstallScriplet/> inside the <mappings/> tag by accident. Putting the tag inside the <configuration/> tag as it should be makes it work like a charm.
regards, Wim 2010/7/12 Wim Deblauwe <[email protected]> > Hi, > > I tried to add a preinstallScriptlet to the configuration of the > rpm-maven-plugin, but this does not seem to work. I get the following > exception: > > [INFO] > ------------------------------------------------------------------------ > [ERROR] BUILD ERROR > [INFO] > ------------------------------------------------------------------------ > [INFO] Failed to configure plugin parameters for: > org.codehaus.mojo:rpm-maven-plugin:2.1-alpha-1 > > > > Cause: Error loading class 'org.codehaus.mojo.rpm.PreinstallScriptlet' > > I tried with a scriptFile and an inline script. I tried with 2.0.1 and > 2.1-alpha-1. Every time I get the same error. > > What can be the cause of this? I looked at the code in svn ( > http://svn.codehaus.org/mojo/tags/rpm-maven-plugin-2.1-alpha-1) and I > could find no such class. > > regards, > > Wim > PS: Running with -e gives this stacktrace: > > org.apache.maven.lifecycle.LifecycleExecutionException: Error configuring: > org.codehaus.mojo:rpm-maven-plugin. Reason: Unable to parse the created DOM > for plugin configuration > at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:723) > at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556) > at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535) > at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387) > at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348) > at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180) > at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328) > at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138) > at org.apache.maven.cli.MavenCli.main(MavenCli.java:362) > at > org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:597) > at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315) > at org.codehaus.classworlds.Launcher.launch(Launcher.java:255) > at > org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430) > at org.codehaus.classworlds.Launcher.main(Launcher.java:375) > Caused by: org.apache.maven.plugin.PluginConfigurationException: Error > configuring: org.codehaus.mojo:rpm-maven-plugin. Reason: Unable to parse the > created DOM for plugin configuration > at > org.apache.maven.plugin.DefaultPluginManager.populatePluginFields(DefaultPluginManager.java:1363) > at > org.apache.maven.plugin.DefaultPluginManager.getConfiguredMojo(DefaultPluginManager.java:724) > at > org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:468) > at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694) > ... 17 more > Caused by: > org.codehaus.plexus.component.configurator.ComponentConfigurationException: > Error loading class 'org.codehaus.mojo.rpm.PreinstallScriptlet' > at > org.codehaus.plexus.component.configurator.converters.composite.CollectionConverter.fromConfiguration(CollectionConverter.java:170) > at > org.codehaus.plexus.component.configurator.converters.ComponentValueSetter.configure(ComponentValueSetter.java:247) > at > org.codehaus.plexus.component.configurator.converters.composite.ObjectWithFieldsConverter.processConfiguration(ObjectWithFieldsConverter.java:137) > at > org.codehaus.plexus.component.configurator.BasicComponentConfigurator.configureComponent(BasicComponentConfigurator.java:56) > at > org.apache.maven.plugin.DefaultPluginManager.populatePluginFields(DefaultPluginManager.java:1357) > ... 20 more > Caused by: java.lang.ClassNotFoundException: > org.codehaus.mojo.rpm.PreinstallScriptlet > at java.net.URLClassLoader$1.run(URLClassLoader.java:202) > at java.security.AccessController.doPrivileged(Native Method) > at java.net.URLClassLoader.findClass(URLClassLoader.java:190) > at java.lang.ClassLoader.loadClass(ClassLoader.java:307) > at > org.codehaus.classworlds.RealmClassLoader.loadClassDirect(RealmClassLoader.java:195) > at > org.codehaus.classworlds.DefaultClassRealm.loadClass(DefaultClassRealm.java:255) > at > org.codehaus.classworlds.DefaultClassRealm.loadClass(DefaultClassRealm.java:274) > at > org.codehaus.classworlds.RealmClassLoader.loadClass(RealmClassLoader.java:214) > at java.lang.ClassLoader.loadClass(ClassLoader.java:248) > at > org.codehaus.plexus.component.configurator.converters.composite.CollectionConverter.fromConfiguration(CollectionConverter.java:158) > >
