Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [m2e-users] On handling of generated code

See inline...

--
Regards,
Igor

On 11-10-20 12:14 PM, Steve Cohen wrote:
Thanks, Igor.
Comments/questions in line.

On 10/20/2011 08:58 AM, Igor Fedorenko wrote:
m2e does not remove custom classpath entries during project build (clean
or otherwise).

No, I didn't even think it happened in the build process. Rather, I
assumed clean did its thing and some other process later looked and saw
that the folder did not exist and removed the entry from the buildpath
(i.e. .classpath)

So unless you are doing project configuration updated,
Yes, that is what I am doing. I can't avoid it. When the project is put
into error because an update is required, what else can I do? Is that
the process that is changing .classpath?


Yes, .classpath is reconciled with pom.xml as part of project
configuration update. In 1.0, .classpath was completely regenerated from
pom.xml. In 1.1 only entries derived from pom.xml are regererated and
all other entries are left as is.

something else is removing generated sources folder from build path.
Btw, starting with 1.1 M3 m2e will never remove custom classpath entries
as per [1], so you can try that version to see if the problem goes away.

Where do I get this version and is it recommended or is it unstable in
other ways?


Revised handling of .classpath updates is already available in latest
1.1.0 snapshot builds [3] and will be included in 1.1 M3 build scheduled
for early November.

[3] https://repository.sonatype.org/content/repositories/forge-sites/m2e/1.1.0/N/LATEST/


As already mentioned by Matt, to get proper code generation behaviour
during incremental build, i.e. sources get automatically regenerated
whenever you change model files (WSDL and schema in you case), you need
to have a project configurator specific to your maven plugin.

If I don't upgrade now, I would need to understand more about project
configurators. Is this documented somewhere?


m2e extensions development is explained in some level of details in [4].
Do note that starting with m2e 1.1, m2e-compatible maven plugins [2]
will likely become the recommended way to support java code generation
inside eclipse workspace.

[4] http://wiki.eclipse.org/M2E_Extension_Development


Alternatively, in 1.1 we are also making it possible for maven plugin
developers to make their code work with directly m2e, thus eliminating
the need for the project configurator. You can read more about this in
[2] and we welcome feedback on this new feature.

[1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=353266
[2] http://wiki.eclipse.org/M2E_compatible_maven_plugins

--
Regard,
Igor


On 11-10-20 8:17 AM, Steve Cohen wrote:
I am working on a top-down web service project that relies on code
generation, using the jboss ws plugin's wsconsume. There are many
iterations of WSDL and schema yet to come as I develop this.

An irritation here is that whenever something goes wrong and the code
generation fails for whatever reason, the generated code directory may
not exist at the end of the failed process, particularly after a clean.
At this point eclipse very "helpfully" removes the generated code folder
from the build path. I would rather that it left the build path as is
and simply failed the compile, rather than making me go back and edit
the build path every time this happens.

Is there a way to configure things so that it happens this way?

_______________________________________________
m2e-users mailing list
m2e-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/m2e-users
_______________________________________________
m2e-users mailing list
m2e-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/m2e-users



_______________________________________________
m2e-users mailing list
m2e-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/m2e-users


Back to the top