You are viewing a plain text version of this content. The canonical link for it is here.
Posted to npanday-users@incubator.apache.org by Eric Kolotyluk <er...@kolotyluk.net> on 2011/09/17 18:29:20 UTC
Wildcard includeSource
Is there some way to wildCard the <includeSource> element? I have a
project in which the source is generated by another phase in another
project in Maven, so there are source files being added and deleted all
the time. It is really not convenient to have to itemize ever source
file in the <configuration> element, but I noticed that if I don't the
sources do not get compiled.
I cannot seem to find any documentation on the <includedSources> and
<includedSource> elements.
On the other hand, maven-compile-plugin seems to know to copy all the
sources found to the target directory anyway, but only the ones in the
<includedSources> element actually get compiled.
As an aside, why is it named maven-compile-plugin instead of
maven-compiler-plugin like for Java?
<build>
<sourceDirectory>./</sourceDirectory>
<plugins>
<plugin>
<groupId>org.apache.npanday.plugins</groupId>
<artifactId>maven-compile-plugin</artifactId>
<version>1.4.0-incubating</version>
<extensions>true</extensions>
<configuration>
<frameworkVersion>4.0</frameworkVersion>
<includeSources>
<includeSource>Properties\AssemblyInfo.cs</includeSource>
<includeSource>src\main\csharp\com\kodak\intersystem\common\Intersystem.generated.cs</includeSource>
<includeSource>src\main\csharp\com\kodak\intersystem\service\Service.generated.cs</includeSource>
</includeSources>
</configuration>
</plugin>
</plugins>
</build>
Re: Wildcard includeSource
Posted by Eric Kolotyluk <er...@gmail.com>.
Fair enough - that makes sense to me :-)
Cheers, Eric
On 2011-09-23 12:01 PM, Wendy Smoak wrote:
> On Sat, Sep 17, 2011 at 2:29 PM, Eric Kolotyluk<er...@kolotyluk.net> wrote:
>
>> As an aside, why is it named maven-compile-plugin instead of
>> maven-compiler-plugin like for Java?
> Pretty sure the original author did that on purpose, because he
> thought it was wrong in Maven. ;)
>
> That is, we have 'clean' 'deploy' and 'install' so it should be
> 'compile', not 'compiler'.
>
> No opinion, I just remember asking the same thing, long ago.
>
Re: Wildcard includeSource
Posted by Wendy Smoak <ws...@gmail.com>.
On Sat, Sep 17, 2011 at 2:29 PM, Eric Kolotyluk <er...@kolotyluk.net> wrote:
> As an aside, why is it named maven-compile-plugin instead of
> maven-compiler-plugin like for Java?
Pretty sure the original author did that on purpose, because he
thought it was wrong in Maven. ;)
That is, we have 'clean' 'deploy' and 'install' so it should be
'compile', not 'compiler'.
No opinion, I just remember asking the same thing, long ago.
--
Wendy
Re: Wildcard includeSource
Posted by Eric Kolotyluk <er...@gmail.com>.
OK, omitting the <includedSources> element seems to work best for now.
I voted for the bug fix.
Thanks, Eric
On 2011-09-19 8:06 PM, Brett Porter wrote:
> On 18/09/2011, at 4:29 AM, Eric Kolotyluk wrote:
>
>> Is there some way to wildCard the<includeSource> element? I have a project in which the source is generated by another phase in another project in Maven, so there are source files being added and deleted all the time. It is really not convenient to have to itemize ever source file in the<configuration> element, but I noticed that if I don't the sources do not get compiled.
>>
>> I cannot seem to find any documentation on the<includedSources> and<includedSource> elements.
>>
>> On the other hand, maven-compile-plugin seems to know to copy all the sources found to the target directory anyway, but only the ones in the<includedSources> element actually get compiled.
> Unfortunately it's not currently possible to wildcard it. You would be interested in voting for: https://issues.apache.org/jira/browse/NPANDAY-210
>
> What you can do is omit it altogether - that will then use /recurse. Given your source directory is ./ the thing you will need to avoid is having any source code you weren't expecting to be in a subdirectory, including target.
>
>> As an aside, why is it named maven-compile-plugin instead of maven-compiler-plugin like for Java?
> I don't think there was a particular reason - maybe accidental, and now retained for historical reasons.
>
> - Brett
>
> --
> Brett Porter
> brett@apache.org
> http://brettporter.wordpress.com/
> http://au.linkedin.com/in/brettporter
>
>
>
>
Re: Wildcard includeSource
Posted by Brett Porter <br...@apache.org>.
On 18/09/2011, at 4:29 AM, Eric Kolotyluk wrote:
> Is there some way to wildCard the <includeSource> element? I have a project in which the source is generated by another phase in another project in Maven, so there are source files being added and deleted all the time. It is really not convenient to have to itemize ever source file in the <configuration> element, but I noticed that if I don't the sources do not get compiled.
>
> I cannot seem to find any documentation on the <includedSources> and <includedSource> elements.
>
> On the other hand, maven-compile-plugin seems to know to copy all the sources found to the target directory anyway, but only the ones in the <includedSources> element actually get compiled.
Unfortunately it's not currently possible to wildcard it. You would be interested in voting for: https://issues.apache.org/jira/browse/NPANDAY-210
What you can do is omit it altogether - that will then use /recurse. Given your source directory is ./ the thing you will need to avoid is having any source code you weren't expecting to be in a subdirectory, including target.
>
> As an aside, why is it named maven-compile-plugin instead of maven-compiler-plugin like for Java?
I don't think there was a particular reason - maybe accidental, and now retained for historical reasons.
- Brett
--
Brett Porter
brett@apache.org
http://brettporter.wordpress.com/
http://au.linkedin.com/in/brettporter