[ http://jira.codehaus.org/browse/JIBX-415?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=253347#action_253347 ]
Antti Koivisto commented on JIBX-415: ------------------------------------- Hi, 1) the version number comes from the parent pom's <pluginManagement> section. 2) Unfortunately this did not work. I used {code} <options> <directory>${basedir}\src\main\resources\jibx</directory> <package>foo.bar</package> </options> {code} The end result was: {code} [DEBUG] Configuring mojo org.jibx:maven-jibx-plugin:1.2.2:schema-codegen from plugin realm ClassRealm[plugin>org.jibx:maven-jibx-plugin:1.2.2, parent: sun.misc.Launcher$AppClassLoader@32f4a24a] [DEBUG] Configuring mojo 'org.jibx:maven-jibx-plugin:1.2.2:schema-codegen' with basic configurator --> [DEBUG] (f) customizations = [] [DEBUG] (f) directory = c:\01sts251ws\A\A.I\A.I.OXM/src/main/config [DEBUG] (f) excludes = [] [DEBUG] (f) includes = [] [DEBUG] (f) options = {directory=c:\01sts251ws\A\A.I\A.I.OXM\src\main\resources\jibx, package=foo.bar} [DEBUG] (f) project = MavenProject: A:A.I:A.I.OXM:0.0.1-SNAPSHOT @ c:\01sts251ws\A\A.I\A.I.OXM\pom.xml [DEBUG] (f) targetDirectory = c:\01sts251ws\A\A.I\A.I.OXM/target/generated-sources [DEBUG] (f) verbose = false [DEBUG] -- end configuration -- [DEBUG] Adding option: --directory=c:\01sts251ws\A\A.I\A.I.OXM\src\main\resources\jibx [DEBUG] Adding option: --package=foo.bar [INFO] Generating Java sources in c:\01sts251ws\A\A.I\A.I.OXM/target/generated-sources from schemas available in c:\01sts251ws\A\A.I\A.I.OXM/src/main/config... [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 2.743s [INFO] Finished at: Fri Jan 28 17:10:49 EET 2011 [INFO] Final Memory: 5M/121M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.jibx:maven-jibx-plugin:1.2.2:schema-codegen (generate-java-code-from-schema) on project A.I.OXM: Parameter directory not found -> [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.jibx:maven-jibx-plugin:1.2.2:schema-codegen (generate-java-code-from-schema) on project A.I.OXM: Parameter directory not found at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59) at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156) at org.apache.maven.cli.MavenCli.execute(MavenCli.java:534) at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196) at org.apache.maven.cli.MavenCli.main(MavenCli.java:141) 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.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409) at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352) Caused by: org.apache.maven.plugin.MojoExecutionException: Parameter directory not found at org.jibx.maven.SchemaCodeGenMojo.execute(SchemaCodeGenMojo.java:164) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:107) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209) ... 19 more Caused by: java.lang.IllegalArgumentException: Parameter directory not found at org.jibx.util.ReflectionUtilities.applyKeyValueMap(ReflectionUtilities.java:140) at org.jibx.schema.codegen.CodeGenCommandLine.applyOverrides(CodeGenCommandLine.java:327) at org.jibx.custom.CustomizationCommandLineBase.processArgs(CustomizationCommandLineBase.java:188) at org.jibx.schema.codegen.CodeGen.main(CodeGen.java:1895) at org.jibx.maven.SchemaCodeGenMojo.execute(SchemaCodeGenMojo.java:158) ... 21 more {code} > schema-codegen does not work if module is built in an "also-make" way or from > a multimodule parent > -------------------------------------------------------------------------------------------------- > > Key: JIBX-415 > URL: http://jira.codehaus.org/browse/JIBX-415 > Project: JiBX > Issue Type: Bug > Components: maven plugin > Affects Versions: JiBX 1.2.1 > Environment: Windows 7, Maven 3.0.2 > Reporter: Antti Koivisto > Assignee: Don Corley > > I have a multi module project like this: > * A > ** A.I > *** A.I.OXM > *** A.I.COMMON > The A.I.OXM module contains the following: > {code} > <build> > <plugins> > <plugin> > <groupId>org.jibx</groupId> > <artifactId>maven-jibx-plugin</artifactId> > <executions> > <execution> > <id>generate-java-code-from-schema</id> > <goals> > <goal>schema-codegen</goal> > </goals> > <configuration> > <options> > > <directory>src/main/resources/jibx</directory> > <package>foo.bar</package> > </options> > </configuration> > </execution> > <execution> > <id>compile-binding</id> > <goals> > <goal>bind</goal> > </goals> > <configuration> > <directory>target/generated-sources</directory> > <load>true</load> > <validate>true</validate> > <verbose>true</verbose> > <verify>true</verify> > </configuration> > </execution> > </executions> > </plugin> > </plugins> > </build> > {code} > If I build the A.I.OXM module by going into it and issuing "mvn clean > install", the codes are generated correctly and the jar file installed to > local maven repo contains the generated sources. > But if I go into module A and do a "mvn clean install > --projects=A.I/A.I.COMMON --also-make" the A.I.OXM module is not built > properly. The xsd schema file available in the specified directory is not > picked up. > Also doing a "mvn clean install" in the A module has the same effect. > A solution to this problem seems to be to remove the <directory> option and > use the default location. > When I did this, all three ways of building the module were successful. > The problem might be mostly with documentation that used > <directory>src/something</directory> as an example. Should it have some maven > property references too? > My environment is: > Apache Maven 3.0.2 (r1056850; 2011-01-09 02:58:10+0200) > Java version: 1.6.0_23, vendor: Sun Microsystems Inc. > Java home: C:\java\jdk6u23\jre > Default locale: fi_FI, platform encoding: Cp1252 > OS name: "windows 7", version: "6.1", arch: "amd64", family: "windows" -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira ------------------------------------------------------------------------------ Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! Finally, a world-class log management solution at an even better price-free! Download using promo code Free_Logger_4_Dev2Dev. Offer expires February 28th, so secure your free ArcSight Logger TODAY! http://p.sf.net/sfu/arcsight-sfd2d _______________________________________________ jibx-devs mailing list jibx-devs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jibx-devs