[
https://jira.codehaus.org/browse/MCOMPILER-174?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Herve Boutemy updated MCOMPILER-174:
------------------------------------
Description:
When you set a source file as
{code:xml} <configuration>
<excludes>
<exclude>com/you/example.java</exclude>
</excludes>
</configuration>{code}
it doesn't pass the file in with the list of .java files to javac. However, it
still passes in the ./src/ directory under the -sourcepath option to the javac
command. Thus, javac still knows that the file exists and can try to compile it
anyways under certain circumstances.
The passing of ./src/ under -sourcepath is redundant anyways, as every single
file to be compiled is passed (in my case, all 391 source files) to javac. The
only possible result from passing ./src/ (or at least the only one I can think
of) is that a file which is in your ./src/ directory yet excluded by the
maven-compiler-plugin can still be seen (and compiled) by javac. This can cause
inexplicable results and a lot of confusion since it operates in a
counter-intuitive way.
was:
When you set a source file as
<configuration>
<excludes>
<exclude>com/you/example.java</exclude>
</excludes>
</configuration>
it doesn't pass the file in with the list of .java files to javac. However, it
still passes in the ./src/ directory under the -sourcepath option to the javac
command. Thus, javac still knows that the file exists and can try to compile it
anyways under certain circumstances.
The passing of ./src/ under -sourcepath is redundant anyways, as every single
file to be compiled is passed (in my case, all 391 source files) to javac. The
only possible result from passing ./src/ (or at least the only one I can think
of) is that a file which is in your ./src/ directory yet excluded by the
maven-compiler-plugin can still be seen (and compiled) by javac. This can cause
inexplicable results and a lot of confusion since it operates in a
counter-intuitive way.
> Maven compiler plugin <excludes> doesn't work all the time
> ----------------------------------------------------------
>
> Key: MCOMPILER-174
> URL: https://jira.codehaus.org/browse/MCOMPILER-174
> Project: Maven Compiler Plugin
> Issue Type: Bug
> Affects Versions: 2.4, 2.5
> Environment: N/A
> Reporter: Matthew Lavin
>
> When you set a source file as
> {code:xml} <configuration>
> <excludes>
> <exclude>com/you/example.java</exclude>
> </excludes>
> </configuration>{code}
> it doesn't pass the file in with the list of .java files to javac. However,
> it still passes in the ./src/ directory under the -sourcepath option to the
> javac command. Thus, javac still knows that the file exists and can try to
> compile it anyways under certain circumstances.
> The passing of ./src/ under -sourcepath is redundant anyways, as every single
> file to be compiled is passed (in my case, all 391 source files) to javac.
> The only possible result from passing ./src/ (or at least the only one I can
> think of) is that a file which is in your ./src/ directory yet excluded by
> the maven-compiler-plugin can still be seen (and compiled) by javac. This can
> cause inexplicable results and a lot of confusion since it operates in a
> counter-intuitive way.
--
This message was sent by Atlassian JIRA
(v6.1.6#6162)