You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Henri Tremblay <he...@gmail.com> on 2011/11/25 14:15:43 UTC

Cxf maven plugin on m2e indigo

Has anybody managed to have the cxf codegen plugin working on indigo with m2e?

Thanks
-
Henri

Envoyé par téléphone portable

Re: Cxf maven plugin on m2e indigo

Posted by Henri Tremblay <he...@gmail.com>.
Great! I'll try that as soon as I can. Thanks a lot.

On 1 December 2011 00:53, atokle <at...@gmail.com> wrote:

> It's because the new m2e plugin changed behavior to avoid some problems in
> the old m2eclipse plugin. It does now not execute all lifecycles if not a
> extension for the plugin is installed, or if it's not specifically told to
> execute them. More info in pages linked here:
> http://wiki.eclipse.org/Category:M2E
>
> One of the phases that is not executed more, and gives error in the pom is
> the generate-sources phase used by cxf-codegen-plugin. Put in the following
> m2e instruction in the pluginManagement of your pom to instruct m2e to
> execute the plugin when you do a "maven->Update project configuration" in
> eclipse. It will then remove the error, and generate the sources.
>
> It will still not make to folder with generated source a source folder.
> Then
> you have to add the build-helper-maven-plugin
>
>                <pluginManagement>
>                        <plugins>
>                                <plugin>
>
>                                        <groupId>org.eclipse.m2e</groupId>
>
>  <artifactId>lifecycle-mapping</artifactId>
>                                        <version>1.0.0</version>
>                                        <configuration>
>                                                <lifecycleMappingMetadata>
>                                                        <pluginExecutions>
>
>  <pluginExecution>
>
>  <pluginExecutionFilter>
>
>      <groupId>org.apache.cxf</groupId>
>
>      <artifactId>cxf-codegen-plugin</artifactId>
>
>      <versionRange>[2.4.0,)</versionRange>
>
>      <goals>
>
>              <goal>wsdl2java</goal>
>
>      </goals>
>
>  </pluginExecutionFilter>
>
>  <action>
>
>      <execute></execute>
>
>  </action>
>
>  </pluginExecution>
>                                                        </pluginExecutions>
>                                                </lifecycleMappingMetadata>
>                                        </configuration>
>                                </plugin>
>                        </plugins>
>                </pluginManagement>
>
>
> --
> View this message in context:
> http://cxf.547215.n5.nabble.com/Cxf-maven-plugin-on-m2e-indigo-tp5022754p5037155.html
> Sent from the cxf-user mailing list archive at Nabble.com.
>

Re: Cxf maven plugin on m2e indigo

Posted by Henri Tremblay <he...@gmail.com>.
I finally made it works with your help (thanks atokle). m2e with
buildhelper connector plus this:
            <pluginManagement>

                  <plugins>

                        <plugin>

                             <groupId>org.eclipse.m2e</groupId>

                             <artifactId>*lifecycle*-mapping</artifactId>

                             <version>1.0.0</version>

                             <configuration>

                                   <lifecycleMappingMetadata>

                                         <pluginExecutions>

                                               <pluginExecution>

                                                     <pluginExecutionFilter>

                                                           <groupId>
org.apache.cxf</groupId>

                                                           <artifactId>
cxf-codegen-plugin</artifactId>

                                                           <versionRange>
2.4.4</versionRange>

                                                           <goals>

                                                                 <goal>
wsdl2java</goal>

                                                           </goals>

                                                     </pluginExecutionFilter
>

                                                     <action>

                                                           <execute></
execute>

                                                     </action>

                                               </pluginExecution>

                                         </pluginExecutions>

                                   </lifecycleMappingMetadata>

                             </configuration>

                        </plugin>

                  </plugins>

            </pluginManagement>

            <plugins>

                  <plugin>

                        <groupId>org.apache.cxf</groupId>

                        <artifactId>*cxf*-*codegen*-*plugin*</artifactId>

                        <executions>

                             <execution>

                                   <id>generate-sources</id>

                                   <phase>generate-sources</phase>

                                   <configuration>

                                         <defaultOptions>

                                               <noAddressBinding>true</
noAddressBinding>

                                         </defaultOptions>

                                         <wsdlRoot>${wsdl.dir}</wsdlRoot>

                                   </configuration>

                                   <goals>

                                         <goal>wsdl2java</goal>

                                   </goals>

                             </execution>

                        </executions>

                  </plugin>

                  <plugin>

                        <groupId>org.codehaus.mojo</groupId>

                        <artifactId>build-helper-*maven*-*plugin*</
artifactId>

                        <executions>

                             <execution>

                                   <id>add-source</id>

                                   <phase>generate-sources</phase>

                                   <goals>

                                         <goal>add-source</goal>

                                   </goals>

                                   <configuration>

                                         <sources>

                                               <source>
target/generated-sources/cxf</source>

                                         </sources>

                                   </configuration>

                             </execution>

                        </executions>
                  </plugin>

On 16 December 2011 21:49, Daniel Kulp <dk...@apache.org> wrote:

>
> It looks like starting with 1.1 of m2e, plugins themselves can embed
> lifecycle
> mappings:
>
> http://wiki.eclipse.org/M2E_compatible_maven_plugins
>
> That might be something worth looking into.   A patch to accomplish that
> would
> be more than welcome.   :-)
>
> Doesn't really solve the issues for 1.0, but going forward it could help.
>
> Dan
>
>
>
> On Thursday, December 15, 2011 12:55:36 PM jerry.bowman wrote:
> > Having the same problem, so I added the eclipse.m2e lifecycle plugin to
> > override the life-cycle as suggested. But now I get this error showing
> up on
> > the plugin to execute the cxf codegen:
> >
> > Description   Resource        Path    Location        Type
> > Execution default of goal
> org.apache.cxf:cxf-codegen-plugin:2.5.0:wsdl2java
> > failed.
> >
> (org.apache.cxf:cxf-codegen-plugin:2.5.0:wsdl2java:default:generate-sources)
> > pom.xml       /empi-core-internal-service     line 126        Maven
> Build Problem
> >
> > I get no logs, no other messages, nada. I changed the action to <ignore
> />
> > for now and just manually run from the command line when I need to
> > regenerate the sources. At least I don't have any errors showing in the
> PO
> > for the unsupported goal anymore.
> >
> > Any ideas on the above message or where else I might look for additional
> > information?
> >
> > Thanks!
> >
> > --
> > View this message in context:
> >
> http://cxf.547215.n5.nabble.com/Cxf-maven-plugin-on-m2e-indigo-tp5022754p50
> > 78663.html Sent from the cxf-user mailing list archive at Nabble.com.
> --
> Daniel Kulp
> dkulp@apache.org - http://dankulp.com/blog
> Talend Community Coder - http://coders.talend.com
>

Re: Cxf maven plugin on m2e indigo

Posted by Daniel Kulp <dk...@apache.org>.
It looks like starting with 1.1 of m2e, plugins themselves can embed lifecycle 
mappings:

http://wiki.eclipse.org/M2E_compatible_maven_plugins

That might be something worth looking into.   A patch to accomplish that would 
be more than welcome.   :-)

Doesn't really solve the issues for 1.0, but going forward it could help.

Dan



On Thursday, December 15, 2011 12:55:36 PM jerry.bowman wrote:
> Having the same problem, so I added the eclipse.m2e lifecycle plugin to
> override the life-cycle as suggested. But now I get this error showing up on
> the plugin to execute the cxf codegen:
> 
> Description	Resource	Path	Location	Type
> Execution default of goal org.apache.cxf:cxf-codegen-plugin:2.5.0:wsdl2java
> failed.
> (org.apache.cxf:cxf-codegen-plugin:2.5.0:wsdl2java:default:generate-sources)
> pom.xml	/empi-core-internal-service	line 126	Maven Build Problem
> 
> I get no logs, no other messages, nada. I changed the action to <ignore />
> for now and just manually run from the command line when I need to
> regenerate the sources. At least I don't have any errors showing in the PO
> for the unsupported goal anymore.
> 
> Any ideas on the above message or where else I might look for additional
> information?
> 
> Thanks!
> 
> --
> View this message in context:
> http://cxf.547215.n5.nabble.com/Cxf-maven-plugin-on-m2e-indigo-tp5022754p50
> 78663.html Sent from the cxf-user mailing list archive at Nabble.com.
-- 
Daniel Kulp
dkulp@apache.org - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com

Re: Cxf maven plugin on m2e indigo

Posted by "jerry.bowman" <je...@gmail.com>.
Having the same problem, so I added the eclipse.m2e lifecycle plugin to
override the life-cycle as suggested. But now I get this error showing up on
the plugin to execute the cxf codegen:

Description	Resource	Path	Location	Type
Execution default of goal org.apache.cxf:cxf-codegen-plugin:2.5.0:wsdl2java
failed.
(org.apache.cxf:cxf-codegen-plugin:2.5.0:wsdl2java:default:generate-sources)
pom.xml	/empi-core-internal-service	line 126	Maven Build Problem

I get no logs, no other messages, nada. I changed the action to <ignore />
for now and just manually run from the command line when I need to
regenerate the sources. At least I don't have any errors showing in the PO
for the unsupported goal anymore.

Any ideas on the above message or where else I might look for additional
information?

Thanks!

--
View this message in context: http://cxf.547215.n5.nabble.com/Cxf-maven-plugin-on-m2e-indigo-tp5022754p5078663.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: Cxf maven plugin on m2e indigo

Posted by atokle <at...@gmail.com>.
It's because the new m2e plugin changed behavior to avoid some problems in
the old m2eclipse plugin. It does now not execute all lifecycles if not a
extension for the plugin is installed, or if it's not specifically told to
execute them. More info in pages linked here:
http://wiki.eclipse.org/Category:M2E

One of the phases that is not executed more, and gives error in the pom is
the generate-sources phase used by cxf-codegen-plugin. Put in the following
m2e instruction in the pluginManagement of your pom to instruct m2e to
execute the plugin when you do a "maven->Update project configuration" in
eclipse. It will then remove the error, and generate the sources.

It will still not make to folder with generated source a source folder. Then
you have to add the build-helper-maven-plugin

		<pluginManagement>
			<plugins>
				<plugin>
					
					<groupId>org.eclipse.m2e</groupId>
					<artifactId>lifecycle-mapping</artifactId>
					<version>1.0.0</version>
					<configuration>
						<lifecycleMappingMetadata>
							<pluginExecutions>
								<pluginExecution>
									<pluginExecutionFilter>
										<groupId>org.apache.cxf</groupId>
										<artifactId>cxf-codegen-plugin</artifactId>
										<versionRange>[2.4.0,)</versionRange>
										<goals>
											<goal>wsdl2java</goal>
										</goals>
									</pluginExecutionFilter>
									<action>
										<execute></execute>
									</action>
								</pluginExecution>
							</pluginExecutions>
						</lifecycleMappingMetadata>
					</configuration>
				</plugin>
			</plugins>
		</pluginManagement>


--
View this message in context: http://cxf.547215.n5.nabble.com/Cxf-maven-plugin-on-m2e-indigo-tp5022754p5037155.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: Cxf maven plugin on m2e indigo

Posted by Henri Tremblay <he...@gmail.com>.
That could also be a solution. Yes, that was exactly what I meant.

I wasn't sure if the old version would work and was looking for the "new
way" to do it.

Thanks
-
Henri

On 30 November 2011 16:02, Christian Schneider <ch...@die-schneider.net>wrote:

> I guess he means the old version of m2eclipse that was shipped with helios
> worked fine.
>
> @Henri You can still use this old version. It is available from Sonatype:
> http://m2eclipse.sonatype.org/**sites/m2e/<http://m2eclipse.sonatype.org/sites/m2e/>
>
> Christian
>
> Am 30.11.2011 14:51, schrieb Benson Margulies:
>
>  I don't understand. Afaik, there is no 'connector plugin' for m2e out
>> there for the cxf maven plugins. So how do you mean 'worked in
>> helios?'
>>
>>
> --
> Christian Schneider
> http://www.liquid-reality.de
>
> Open Source Architect
> Talend Application Integration Division http://www.talend.com
>
>

Re: Cxf maven plugin on m2e indigo

Posted by Christian Schneider <ch...@die-schneider.net>.
I guess he means the old version of m2eclipse that was shipped with 
helios worked fine.

@Henri You can still use this old version. It is available from Sonatype:
http://m2eclipse.sonatype.org/sites/m2e/

Christian

Am 30.11.2011 14:51, schrieb Benson Margulies:
> I don't understand. Afaik, there is no 'connector plugin' for m2e out
> there for the cxf maven plugins. So how do you mean 'worked in
> helios?'
>

-- 
Christian Schneider
http://www.liquid-reality.de

Open Source Architect
Talend Application Integration Division http://www.talend.com


Re: Cxf maven plugin on m2e indigo

Posted by Benson Margulies <bi...@gmail.com>.
I don't understand. Afaik, there is no 'connector plugin' for m2e out
there for the cxf maven plugins. So how do you mean 'worked in
helios?'

On Wed, Nov 30, 2011 at 3:02 AM, Henri Tremblay
<he...@gmail.com> wrote:
> But then why is it working perfectly fine in Helios? (even if in Helios, it
> is just forking a maven process to generate sources)
>
> On 30 November 2011 03:19, Benson Margulies <bi...@gmail.com> wrote:
>
>> On Mon, Nov 28, 2011 at 9:35 PM, Henri Tremblay
>> <he...@gmail.com> wrote:
>> > Really? Nobody? I've seen some attempt but it seems none were successful.
>> > Is it planned somewhere in the cxf roadmap?
>>
>> I did some experiments. The problem is that no sane amount of VM will
>> hold all of Eclipse, all of Maven, and all the permgen space that gets
>> used when the cxf codegen gets going.
>>
>> >
>> > On 25 November 2011 14:15, Henri Tremblay <he...@gmail.com>
>> wrote:
>> >
>> >> Has anybody managed to have the cxf codegen plugin working on indigo
>> with
>> >> m2e?
>> >>
>> >> Thanks
>> >> -
>> >> Henri
>> >>
>> >> Envoyé par téléphone portable
>>

Re: Cxf maven plugin on m2e indigo

Posted by Henri Tremblay <he...@gmail.com>.
But then why is it working perfectly fine in Helios? (even if in Helios, it
is just forking a maven process to generate sources)

On 30 November 2011 03:19, Benson Margulies <bi...@gmail.com> wrote:

> On Mon, Nov 28, 2011 at 9:35 PM, Henri Tremblay
> <he...@gmail.com> wrote:
> > Really? Nobody? I've seen some attempt but it seems none were successful.
> > Is it planned somewhere in the cxf roadmap?
>
> I did some experiments. The problem is that no sane amount of VM will
> hold all of Eclipse, all of Maven, and all the permgen space that gets
> used when the cxf codegen gets going.
>
> >
> > On 25 November 2011 14:15, Henri Tremblay <he...@gmail.com>
> wrote:
> >
> >> Has anybody managed to have the cxf codegen plugin working on indigo
> with
> >> m2e?
> >>
> >> Thanks
> >> -
> >> Henri
> >>
> >> Envoyé par téléphone portable
>

Re: Cxf maven plugin on m2e indigo

Posted by Daniel Kulp <dk...@apache.org>.
On Tuesday, November 29, 2011 9:19:13 PM Benson Margulies wrote:
> On Mon, Nov 28, 2011 at 9:35 PM, Henri Tremblay
> 
> <he...@gmail.com> wrote:
> > Really? Nobody? I've seen some attempt but it seems none were
> > successful.
> > Is it planned somewhere in the cxf roadmap?
> 
> I did some experiments. The problem is that no sane amount of VM will
> hold all of Eclipse, all of Maven, and all the permgen space that gets
> used when the cxf codegen gets going.

The CXF plugin now has a fork mode that should help these types of things.   
Did you try setting that?

Dan

> 
> > On 25 November 2011 14:15, Henri Tremblay <he...@gmail.com> 
wrote:
> >> Has anybody managed to have the cxf codegen plugin working on indigo
> >> with m2e?
> >> 
> >> Thanks
> >> -
> >> Henri
> >> 
> >> Envoyé par téléphone portable
-- 
Daniel Kulp
dkulp@apache.org - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com

Re: Cxf maven plugin on m2e indigo

Posted by Benson Margulies <bi...@gmail.com>.
On Mon, Nov 28, 2011 at 9:35 PM, Henri Tremblay
<he...@gmail.com> wrote:
> Really? Nobody? I've seen some attempt but it seems none were successful.
> Is it planned somewhere in the cxf roadmap?

I did some experiments. The problem is that no sane amount of VM will
hold all of Eclipse, all of Maven, and all the permgen space that gets
used when the cxf codegen gets going.

>
> On 25 November 2011 14:15, Henri Tremblay <he...@gmail.com> wrote:
>
>> Has anybody managed to have the cxf codegen plugin working on indigo with
>> m2e?
>>
>> Thanks
>> -
>> Henri
>>
>> Envoyé par téléphone portable

Re: Cxf maven plugin on m2e indigo

Posted by Henri Tremblay <he...@gmail.com>.
Really? Nobody? I've seen some attempt but it seems none were successful.
Is it planned somewhere in the cxf roadmap?

On 25 November 2011 14:15, Henri Tremblay <he...@gmail.com> wrote:

> Has anybody managed to have the cxf codegen plugin working on indigo with
> m2e?
>
> Thanks
> -
> Henri
>
> Envoyé par téléphone portable