That does sound good. I found a workaround by adding the generated-sources
folder as a resource, then the source plugin picked these up. But feels
like a hack. I never like to use non standard approaches because you never
know when they will come back to bite you. :)
IMHO, it seems the sources plugin should be handling these configuration
tasks.
<resources>
<resource>
<directory>${basedir}/target/generated-sources</directory>
<filtering>true</filtering>
</resource>
</resources>
I'll checkout the plugin you mentioned.
-Dave
On Thu, Aug 6, 2009 at 10:55 PM, Markku Saarela <[email protected]>wrote:
> Hi,
>
> Try build-helper plugin for adding this target/geratated-sources directory.
>
> http://mojo.codehaus.org/build-helper-maven-plugin/add-source-mojo.html
>
> rgds,
>
> Markku
>
>
> David Hoffer wrote:
>
>> As far as I can tell this won't work, I think this just includes excludes
>> files that are already in the right/included folders.
>>
>> I need a way to add the files in ${basedir}/target/generated-sources to
>> jar
>> of sources that it creates.
>>
>> Does anyone know how to do this?
>>
>> -Dave
>>
>>
>> On Thu, Aug 6, 2009 at 7:05 PM, David Hoffer <[email protected]> wrote:
>>
>>
>>
>>> Any idea what the format of path1 & path2 are?
>>>
>>> I have tried:
>>>
>>> <includes>
>>> <include>${basedir}/src/main/java/**</include>
>>>
>>> <include>${basedir}/target/generated-sources/**</include>
>>> </includes>
>>>
>>> And
>>>
>>> <includes>
>>> <include>${basedir}/src/main/java</include>
>>>
>>> <include>${basedir}/target/generated-sources</include>
>>> </includes>
>>>
>>> Always says no files have been included so it errors out.
>>>
>>> -Dave
>>>
>>>
>>> On Thu, Aug 6, 2009 at 3:57 PM, Benson Margulies <[email protected]
>>> >wrote:
>>>
>>>
>>>
>>>> <includes>
>>>> <include>path1</include>
>>>> <include>path2</include>
>>>> </includes>
>>>>
>>>> On Thu, Aug 6, 2009 at 5:14 PM, David Hoffer<[email protected]> wrote:
>>>>
>>>>
>>>>> Here is the error.
>>>>>
>>>>> Cause: Cannot assign configuration entry 'includes' to 'class
>>>>> [Ljava.lang.String
>>>>> ;' from
>>>>>
>>>>> 'C:\iss_svn\CDF\trunk\cdf-webtas/src/main/java/**/*.java,C:\iss_svn\CDF\
>>>>> trunk\cdf-webtas/target/generated-sources/**/*.java', which is of type
>>>>>
>>>>>
>>>> class
>>>>
>>>>
>>>>> jav
>>>>> a.lang.String
>>>>>
>>>>> -Dave
>>>>>
>>>>> On Thu, Aug 6, 2009 at 3:12 PM, David Hoffer <[email protected]>
>>>>>
>>>>>
>>>> wrote:
>>>>
>>>>
>>>>> Perhaps I don't understand the format of this, I tried the following
>>>>>>
>>>>>>
>>>>> and
>>>>
>>>>
>>>>> get an error:
>>>>>>
>>>>>> <configuration>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>> <includes>${basedir}/src/main/java/**/*.java,${basedir}/target/generated-sources/**/*.java</includes>
>>>>
>>>>
>>>>> </configuration>
>>>>>>
>>>>>> -Dave
>>>>>>
>>>>>>
>>>>>> On Thu, Aug 6, 2009 at 2:45 PM, Alexander <[email protected]>
>>>>>>
>>>>>>
>>>>> wrote:
>>>>
>>>>
>>>>> Wont help you *includes *goal?
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>> http://maven.apache.org/plugins/maven-source-plugin/aggregate-mojo.html#includes
>>>>
>>>>
>>>>> 2009/8/7 David Hoffer <[email protected]>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>> How can I configure the Maven Source Plugin to include source files
>>>>>>>>
>>>>>>>>
>>>>>>> in
>>>>
>>>>
>>>>> the
>>>>>>>
>>>>>>>
>>>>>>>> /target/generated-sources folder? I would assume it would do this
>>>>>>>>
>>>>>>>>
>>>>>>> by
>>>>
>>>>
>>>>> default but I don't even see a way to configure this. It always
>>>>>>>>
>>>>>>>>
>>>>>>> ignores
>>>>
>>>>
>>>>> additional source here. Can somebody help me?
>>>>>>>>
>>>>>>>> -Dave
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> Regards,
>>>>>>> Alexander
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: [email protected]
>>>> For additional commands, e-mail: [email protected]
>>>>
>>>>
>>>>
>>>>
>>>
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>