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

Bug 350299

Summary: [mojo] org.jvnet.jaxb2.maven2:maven-jaxb2-plugin:generate support
Product: z_Archived Reporter: Ed Staub <edward.staub>
Component: m2eAssignee: Project Inbox <m2e.core-inbox>
Status: CLOSED NOT_ECLIPSE QA Contact:
Severity: normal    
Priority: P3 CC: bradley.beck, eric.dalquist, gonne, guus.der.kinderen, honnix.liang, hwellmann.de, ian, igor, jnord, joerg.buchberger, lafeuil, mail, matthew, mishail.mishail, pino.silvaggio, plalloni, projekte, schnake.michael, yannick.lazzari
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Stand-alone example project to illustrate request none

Description Ed Staub CLA 2011-06-24 13:02:17 EDT

    
Comment 1 Ed Staub CLA 2011-06-25 10:44:15 EDT
Generated sources are no longer added to build path, as they were with m2eclipse.
Comment 2 Guus der Kinderen CLA 2011-06-26 06:30:20 EDT
Created attachment 198606 [details]
Stand-alone example project to illustrate request

The maven-jaxb2-plugin generates java sources based on an XSD. In an Eclipse project, the maven integration should ensure that these generated sources:

* are added to the classpath, as well as,
* be exposed as a source folder.

Attached is a stand-alone example project that illustrates the usage of maven-jaxb2-plugin.
Comment 3 Guus der Kinderen CLA 2011-06-26 08:31:21 EDT
Note that this bug is quite similar to (but not a duplicate of) bug 350376,
which relates to a different plugin that offers similar functionality. As
neither plugins are currently supported by the M2E integration, users are
severely limited in using JAXB-based functionality.
Comment 4 Igor Fedorenko CLA 2011-06-27 01:44:45 EDT
*** Bug 350211 has been marked as a duplicate of this bug. ***
Comment 5 George Gastaldi CLA 2011-06-28 01:32:14 EDT
It´s impossible to migrate to Indigo and the new version of m2eclipse unless this bug is solved.
Comment 6 Ed Staub CLA 2011-06-28 06:56:42 EDT
(In reply to comment #5)
> It´s impossible to migrate to Indigo and the new version of m2eclipse unless
> this bug is solved.

Ditto for me... but a REASONABLE workaround would also do.
Comment 7 Matthew Piggott CLA 2011-06-28 10:59:44 EDT
It is still possible to right-click the folder, then use Build Path > Use as source folder
Comment 8 George Gastaldi CLA 2011-06-28 11:05:50 EDT
When I do that, m2Eclipse says that it needs updating and removes it from the build path. 

(In reply to comment #7)
> It is still possible to right-click the folder, then use Build Path > Use as
> source folder
Comment 9 Igor Fedorenko CLA 2011-06-29 02:13:13 EDT
m2e core development team is looking for help implementing support for various "not covered" maven plugins. If you are interested, wiki [1] provides pointers where to start and we'll be happy to answer questions on m2e-dev mailing list. To avoid duplicate effort, please assign this bugzilla item to yourself if you already work on corresponding m2e extension.

[1] m2e extension development is documented in http://wiki.eclipse.org/M2E_Extension_Development
Comment 10 Harald Wellmann CLA 2011-06-30 05:24:32 EDT
I've started working on this extension, using the antlr extension as a starting point.

I don't seem to have the permission to assign this issue to myself.

What are the guidelines for package naming, copyright etc.? What is the best place to discuss m2e extension development in general? Not here I think...
Comment 11 Igor Fedorenko CLA 2011-06-30 06:05:46 EDT
License and copyright is up to you and/or your employer.

Package names, bundle ids, etc, are up to you, but you probably want to avoid namespaces that "belong" to somebody else, i.e. using com.ibm.blah, org.eclipse.foo is not a good idea.

m2e-dev mailing list is the place to discuss m2e extension development.
Comment 12 Harald Wellmann CLA 2011-07-04 05:48:07 EDT
I've now implemented a basic JAXB extension which can be installed from the following update site:

https://github.com/hwellmann/m2eclipse-extras/raw/master/p2/

The sources are in 
https://github.com/hwellmann/m2eclipse-extras
Comment 13 Pablo Lalloni CLA 2011-07-06 12:30:09 EDT
(In reply to comment #12)
> I've now implemented a basic JAXB extension which can be installed from the
> following update site:
> 
> https://github.com/hwellmann/m2eclipse-extras/raw/master/p2/
> 
> The sources are in 
> https://github.com/hwellmann/m2eclipse-extras

Does this connector supports maven-jaxb22-plugin as well as maven-jaxb2-plugin?
Comment 14 Pablo Lalloni CLA 2011-07-06 13:06:00 EDT
Added pull request for maven-jaxb22-plugin support patch at https://github.com/hwellmann/m2eclipse-extras/pull/1
Comment 15 Eric Dalquist CLA 2011-07-08 22:19:43 EDT
Just wanted to chime in that Harald's plugin works great for me to get the jaxb2 generated code playing nice in eclipse.
Comment 16 Pino Silvaggio CLA 2011-07-15 17:10:46 EDT
https://github.com/bitstrings

P2 repo: http://bitstrings.github.com/m2e-connectors-p2/releases

xmlbeans (xmlbeans, xmlbeans-test support)

jaxb2 (jaxb20,jaxb21,jaxb22 support)
Comment 17 Pino Silvaggio CLA 2011-07-15 17:14:03 EDT
btw, the bitstrings m2e-jaxb2-connector supports

includes,excludes of both schema and bindings
Comment 18 Pino Silvaggio CLA 2011-07-15 17:17:10 EDT
open issue:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=352056
Comment 19 Igor Fedorenko CLA 2013-09-28 23:42:17 EDT
closing as per comment #16
Comment 20 Denis Roy CLA 2021-04-19 13:24:20 EDT
Moved to https://github.com/eclipse-m2e/m2e-core/issues/