Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 350810

Summary: [mojo] org.jibx:maven-jibx-plugin:schema-codegen support
Product: z_Archived Reporter: Joerg Buchberger <lists>
Component: m2eAssignee: Project Inbox <m2e.core-inbox>
Status: CLOSED INVALID QA Contact:
Severity: normal    
Priority: P3 CC: don, igor
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
See Also: https://bugs.eclipse.org/bugs/show_bug.cgi?id=350809
Whiteboard:
Attachments:
Description Flags
example-project
none
import error screenshot none

Description Joerg Buchberger CLA 2011-06-30 08:19:03 EDT
Created attachment 198903 [details]
example-project

1. unpack attached example project
2. mvn package


env      | import/execution
---------+-------------------
mvn-2    | OK
mvn-3    | OK
m2e-0.12 | OK
m2e-1.0  | PROBLEM: No marketplace entries found to handle





name=org.jibx.maven-jibx-plugin

description=Maven JiBX Plugin

summary=A plugin for Maven 2 to run the JiBX binding compiler, or generate Java sources from XSD schemas.

license=http://jibx.sourceforge.net/jibx-license.html (BSD style)

provider=JiBX Project http://jibx.sourceforge.net/index.html
Comment 1 Joerg Buchberger CLA 2011-07-19 05:20:39 EDT
Created attachment 199887 [details]
import error screenshot
Comment 2 Joerg Buchberger CLA 2011-07-19 05:42:59 EDT
If you workaround the impor errors by "resolve-all-later" and then using "Quick Fix" + changing "action" from "ignore" to "execute" ... you will get the following addition to your pom:

<pluginManagement>
  <plugins>
    <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
    <plugin>
      <groupId>org.eclipse.m2e</groupId>
      <artifactId>lifecycle-mapping</artifactId>
      <version>1.0.0</version>
      <configuration>
        <lifecycleMappingMetadata>
          <pluginExecutions>
            <pluginExecution>
              <pluginExecutionFilter>
                <groupId>org.jibx</groupId>
                <artifactId>
                  maven-jibx-plugin
                </artifactId>
                <versionRange>[1.2.3,)</versionRange>
                <goals>
                  <goal>bind</goal>
                  <goal>schema-codegen</goal>
                </goals>
              </pluginExecutionFilter>
              <action>
                <execute/>
              </action>
            </pluginExecution>
          </pluginExecutions>
        </lifecycleMappingMetadata>
      </configuration>
    </plugin>
  </plugins>
</pluginManagement>


Then you get the error message:

"Binding binding.xml is unusable because of validation errors (org.jibx:maven-jibx-plugin:1.2.3:bind:jibx-bind:process-classes)"


After "Maven Update Project Configuration" and a few cycles of "Refresh", "Eclipse-Clean", "Restart" and "Runs as mvn install" ... the validation error goes away ...
Comment 3 Joerg Buchberger CLA 2011-07-19 06:35:50 EDT
If you import the Maven project with the pom already prepared with above lifecycle-mapping ...

you just get aforementioned binding error, which goes away after "mvn install" 

Note, however, that error comes back when doing "Eclipse Clean" - need to find out, how to execute as part of Eclipse clean and incremental builds as well.
Comment 4 Igor Fedorenko CLA 2011-07-19 08:20:01 EDT
Why not write proper m2e support for maven-jibx-plugin as explained in [1]?

[1] http://wiki.eclipse.org/M2E_Extension_Development
Comment 5 Joerg Buchberger CLA 2011-07-20 04:13:23 EDT
see also http://jira.codehaus.org/browse/JIBX-448
Comment 6 Igor Fedorenko CLA 2013-09-28 23:47:08 EDT
closing old/stale bugreports
Comment 7 Denis Roy CLA 2021-04-19 13:23:37 EDT
Moved to https://github.com/eclipse-m2e/m2e-core/issues/