You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Matt Parker <pa...@gmail.com> on 2014/08/26 03:04:32 UTC

wadl2java mojo: inherited options and filesets broken?

Hi,

I'm using wadl2java in maven for many wadl files rooted at a subdirectory,
and would like to specify a set of wadlOptions once (like extraargs and
catalog) and specify a fileset like **/*.wadl.

It appears as though 1) wadlOptions specified at the plugin level aren't
properly inherited by the execution configuration, and 2) I must specify a
wadlOption for each wadl file I want to process.

The combination of these two make managing my pom file tedious and
error-prone. Is there a way to do this that I'm missing, or are these
indeed broken?

TIA,

-Matt

Re: wadl2java mojo: inherited options and filesets broken?

Posted by Sergey Beryozkin <sb...@gmail.com>.
On 28/08/14 22:10, Matt Parker wrote:
> I guess I'm saying it's broken because it looks like there is already code
> there to do some of what I want (filesets), but it's not hooked up. I
> assume that someone tried to make it work but wasn't able to or didn't
> finish.
Yes, I basically copied most of the code from a WSDL plugin and to be 
honest I did not understand at a time what some of the code was supposed 
to do, and it was a news to me anyway the executions were expected to 
inherit and merge the higher level configuration.

Can you please open a JIRA issue ?

Cheers, Sergey

>
>
> Here's what I'd like to do (1. define configuration at the plugin level; 2.
> use fileset globbing):
>
>      <plugin>
>
>            <groupId>org.apache.cxf</groupId>
>
>                  <artifactId>cxf-wadl2java-plugin</artifactId>
>
>                  <version>${cxf.wadltojava.version}</version>
>
>                  <configuration>
>
>                      <sourceRoot>${project.build.directory}/wadl2java</
> sourceRoot>
>
>                      <catalog>catalog</catalog>
>
>                      <extraargs>
>
>                           <extraarg>-verbose</extraarg>
>
>                                 <extraarg>-inheritResourceParams</extraarg>
>
>                                 <extraarg>-noVoidForEmptyResponses</extraarg>
>
>                                 <extraarg>-compile</extraarg>
>
>                          </extraargs>
>
>                  </configuration>
>
>                  <executions>
>
>                      <execution>
>
>                          <id>Run wadl2java to validate all WADLs</id>
>
>                          <phase>compile</phase>
>
>                          <goals>
>
>                              <goal>wadl2java</goal>
>
>                          </goals>
>
>                          <configuration>
>
>                              <wadlOptions>
>
>                                  <wadlOption>
>
>                                      <wadl>**/*.wadl</wadl>
>
>                                  </wadlOption>
>
>
> Here's what I have to do to make it work now (I have about 50 wadls in my
> current project):
>
>       <plugin>
>
>            <groupId>org.apache.cxf</groupId>
>
>                  <artifactId>cxf-wadl2java-plugin</artifactId>
>
>                  <version>${cxf.wadltojava.version}</version>
>
>                  <configuration>
>
>                      <sourceRoot>${project.build.directory}/wadl2java</
> sourceRoot>
>
>                  </configuration>
>
>                  <executions>
>
>                      <execution>
>
>                          <id>Run wadl2java to validate all WADLs</id>
>
>                          <phase>compile</phase>
>
>                          <goals>
>
>                              <goal>wadl2java</goal>
>
>                          </goals>
>
>                          <configuration>
>
>                              <wadlOptions>
>
>                                  <wadlOption>
>
>                                      <catalog>catalog</catalog>
>
>                                      <extraargs>
>
>                                          <extraarg>-verbose</extraarg>
>
>                                          <extraarg>-inheritResourceParams</
> extraarg>
>
>                                          <extraarg>-noVoidForEmptyResponses</
> extraarg>
>
>                                          <extraarg>-compile</extraarg>
>
>                                      </extraargs>
>
>                                      <wadl>A/a.wadl</wadl>
>
>                                  </wadlOption>
>
>                                  <wadlOption>
>
>                                      <catalog>catalog</catalog>
>
>                                      <extraargs>
>
>                                          <extraarg>-verbose</extraarg>
>
>                                          <extraarg>-inheritResourceParams</
> extraarg>
>
>                                          <extraarg>-noVoidForEmptyResponses</
> extraarg>
>
>                                          <extraarg>-compile</extraarg>
>
>                                      </extraargs>
>
>                                      <wadl>B/b.wadl</wadl>
>
>                                  </wadlOption>
>
>                                  <wadlOption>
>
>                                      <catalog>catalog</catalog>
>
>                                      <extraargs>
>
>                                          <extraarg>-verbose</extraarg>
>
>                                          <extraarg>-inheritResourceParams</
> extraarg>
>
>                                          <extraarg>-noVoidForEmptyResponses</
> extraarg>
>
>                                          <extraarg>-compile</extraarg>
>
>                                      </extraargs>
>
>                                      <wadl>C/c.wadl</wadl>
>
>                                  </wadlOption>
>
>
> On Tue, Aug 26, 2014 at 3:07 PM, Sergey Beryozkin <sb...@gmail.com>
> wrote:
>
>> Hi
>>
>> On 26/08/14 02:04, Matt Parker wrote:
>>
>>> Hi,
>>>
>>> I'm using wadl2java in maven for many wadl files rooted at a subdirectory,
>>> and would like to specify a set of wadlOptions once (like extraargs and
>>> catalog) and specify a fileset like **/*.wadl.
>>>
>>> It appears as though 1) wadlOptions specified at the plugin level aren't
>>> properly inherited by the execution configuration, and 2) I must specify a
>>> wadlOption for each wadl file I want to process.
>>>
>>> The combination of these two make managing my pom file tedious and
>>> error-prone. Is there a way to do this that I'm missing, or are these
>>> indeed broken?
>>>
>> I'd not say it's broken because it is not something the plugin is
>> documented to support. I'm not even aware to be honest if there is a
>> standard way to get the plugin tag level properties inherited, is is
>> expected by default that they are ?
>> Can you post an example of how you configure the plugin ?
>>
>> Thanks, Sergey
>>
>>
>>> TIA,
>>>
>>> -Matt
>>>
>>>
>>
>>
>


Re: wadl2java mojo: inherited options and filesets broken?

Posted by Matt Parker <pa...@gmail.com>.
I guess I'm saying it's broken because it looks like there is already code
there to do some of what I want (filesets), but it's not hooked up. I
assume that someone tried to make it work but wasn't able to or didn't
finish.


Here's what I'd like to do (1. define configuration at the plugin level; 2.
use fileset globbing):

    <plugin>

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

                <artifactId>cxf-wadl2java-plugin</artifactId>

                <version>${cxf.wadltojava.version}</version>

                <configuration>

                    <sourceRoot>${project.build.directory}/wadl2java</
sourceRoot>

                    <catalog>catalog</catalog>

                    <extraargs>

                         <extraarg>-verbose</extraarg>

                               <extraarg>-inheritResourceParams</extraarg>

                               <extraarg>-noVoidForEmptyResponses</extraarg>

                               <extraarg>-compile</extraarg>

                        </extraargs>

                </configuration>

                <executions>

                    <execution>

                        <id>Run wadl2java to validate all WADLs</id>

                        <phase>compile</phase>

                        <goals>

                            <goal>wadl2java</goal>

                        </goals>

                        <configuration>

                            <wadlOptions>

                                <wadlOption>

                                    <wadl>**/*.wadl</wadl>

                                </wadlOption>


Here's what I have to do to make it work now (I have about 50 wadls in my
current project):

     <plugin>

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

                <artifactId>cxf-wadl2java-plugin</artifactId>

                <version>${cxf.wadltojava.version}</version>

                <configuration>

                    <sourceRoot>${project.build.directory}/wadl2java</
sourceRoot>

                </configuration>

                <executions>

                    <execution>

                        <id>Run wadl2java to validate all WADLs</id>

                        <phase>compile</phase>

                        <goals>

                            <goal>wadl2java</goal>

                        </goals>

                        <configuration>

                            <wadlOptions>

                                <wadlOption>

                                    <catalog>catalog</catalog>

                                    <extraargs>

                                        <extraarg>-verbose</extraarg>

                                        <extraarg>-inheritResourceParams</
extraarg>

                                        <extraarg>-noVoidForEmptyResponses</
extraarg>

                                        <extraarg>-compile</extraarg>

                                    </extraargs>

                                    <wadl>A/a.wadl</wadl>

                                </wadlOption>

                                <wadlOption>

                                    <catalog>catalog</catalog>

                                    <extraargs>

                                        <extraarg>-verbose</extraarg>

                                        <extraarg>-inheritResourceParams</
extraarg>

                                        <extraarg>-noVoidForEmptyResponses</
extraarg>

                                        <extraarg>-compile</extraarg>

                                    </extraargs>

                                    <wadl>B/b.wadl</wadl>

                                </wadlOption>

                                <wadlOption>

                                    <catalog>catalog</catalog>

                                    <extraargs>

                                        <extraarg>-verbose</extraarg>

                                        <extraarg>-inheritResourceParams</
extraarg>

                                        <extraarg>-noVoidForEmptyResponses</
extraarg>

                                        <extraarg>-compile</extraarg>

                                    </extraargs>

                                    <wadl>C/c.wadl</wadl>

                                </wadlOption>


On Tue, Aug 26, 2014 at 3:07 PM, Sergey Beryozkin <sb...@gmail.com>
wrote:

> Hi
>
> On 26/08/14 02:04, Matt Parker wrote:
>
>> Hi,
>>
>> I'm using wadl2java in maven for many wadl files rooted at a subdirectory,
>> and would like to specify a set of wadlOptions once (like extraargs and
>> catalog) and specify a fileset like **/*.wadl.
>>
>> It appears as though 1) wadlOptions specified at the plugin level aren't
>> properly inherited by the execution configuration, and 2) I must specify a
>> wadlOption for each wadl file I want to process.
>>
>> The combination of these two make managing my pom file tedious and
>> error-prone. Is there a way to do this that I'm missing, or are these
>> indeed broken?
>>
> I'd not say it's broken because it is not something the plugin is
> documented to support. I'm not even aware to be honest if there is a
> standard way to get the plugin tag level properties inherited, is is
> expected by default that they are ?
> Can you post an example of how you configure the plugin ?
>
> Thanks, Sergey
>
>
>> TIA,
>>
>> -Matt
>>
>>
>
>

Re: wadl2java mojo: inherited options and filesets broken?

Posted by Sergey Beryozkin <sb...@gmail.com>.
Hi
On 26/08/14 02:04, Matt Parker wrote:
> Hi,
>
> I'm using wadl2java in maven for many wadl files rooted at a subdirectory,
> and would like to specify a set of wadlOptions once (like extraargs and
> catalog) and specify a fileset like **/*.wadl.
>
> It appears as though 1) wadlOptions specified at the plugin level aren't
> properly inherited by the execution configuration, and 2) I must specify a
> wadlOption for each wadl file I want to process.
>
> The combination of these two make managing my pom file tedious and
> error-prone. Is there a way to do this that I'm missing, or are these
> indeed broken?
I'd not say it's broken because it is not something the plugin is 
documented to support. I'm not even aware to be honest if there is a 
standard way to get the plugin tag level properties inherited, is is 
expected by default that they are ?
Can you post an example of how you configure the plugin ?

Thanks, Sergey

>
> TIA,
>
> -Matt
>