The Source for Java Technology Collaboration

Home » java.net Forums » GlassFish » Metro and JAXB

Thread: How to generate and compile twice using maven maven-jaxb2-plugin?

Welcome, Guest Help
Login Login
Guest Settings Guest Settings
This question is answered. Helpful answers available: 2. Correct answers available: 1.

Reply to this Thread Reply to this Thread Search Forum Search Forum Back to Thread List Back to Thread List

Permlink Replies: 2 - Last Post: Mar 20, 2009 4:37 AM by: menno
menno

Posts: 6
How to generate and compile twice using maven maven-jaxb2-plugin?
Posted: Mar 17, 2009 5:09 AM
 
  Click to reply to this thread Reply

Hi,

I have started using the maven jaxb plugin. But I cant figure out how I can get the plugin to compile code twice.

I want it to do this because I need to first have xjc generate my classes with a binding file without the interfaces plugin, and then regenerate the same classes with a binding file which includes the interface plugin. It requires the first generation because the interface being added references generated classes.

Anyone have ideas how to achieve this?

Cheers,
Menno

Mohan KR
RE: How to generate and compile twice using maven maven-jaxb2-plugin?
Posted: Mar 18, 2009 8:28 AM   in response to: menno
  Click to reply to this thread Reply

Put the executions in separate profiles. If you bind the executions to the same phase then
make sure the first one is *before* the other one. You can do this without a profile too,
by having two executions.


Thanks,
mohan kr

-----Original Message-----
From: metro@javadesktop.org [mailto:metro@javadesktop.org]
Sent: Tuesday, March 17, 2009 7:10 AM
To: users@metro.dev.java.net
Subject: How to generate and compile twice using maven maven-jaxb2-plugin?

Hi,

I have started using the maven jaxb plugin. But I cant figure out how I can get the plugin to compile code twice.

I want it to do this because I need to first have xjc generate my classes with a binding file without the interfaces plugin, and then regenerate the same classes with a binding file which includes the interface plugin. It requires the first generation because the interface being added references generated classes.

Anyone have ideas how to achieve this?

Cheers,
Menno
[Message sent by forum member 'menno' (menno)]

http://forums.java.net/jive/thread.jspa?messageID=337403

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@metro.dev.java.net
For additional commands, e-mail: users-help@metro.dev.java.net


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@metro.dev.java.net
For additional commands, e-mail: users-help@metro.dev.java.net


menno

Posts: 6
Re: RE: How to generate and compile twice using maven maven-jaxb2-plugin?
Posted: Mar 20, 2009 4:37 AM   in response to: Mohan KR
 
  Click to reply to this thread Reply

Thanks. Managed to get it working with two executions. Was worried the compile in-between executions would not work, but it appears to work fine.




 XML java.net RSS