Hi,

this can't be correct:
<excludes>**/.,*.java</excludes>

this means: exclude all files called . (yes, just dot) and exclude all *.java files in the root. Don't think you're excluding anything, running with debug logging will probably confirm that.

Robert

On Sun, 27 Aug 2017 22:54:42 +0200, Seth Goldstein <s...@cmu.edu> wrote:

You are absolutely correct. In case others want this - exclude files from
being checked and compiled - Here is the relevant part of the pom file:

    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>2.0.2</version>
        <configuration>
        <excludes>
          <exclude>**/.,*.java</exclude>
        </excludes>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-checkstyle-plugin</artifactId>
        <version>2.17</version>
        <executions>
          <execution>
            <id>validate</id>
            <phase>validate</phase>
            <goals>
              <goal>check</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <configLocation>config/checkstyle.xml</configLocation>
          <excludes>**/.,*.java</excludes>
        </configuration>
      </plugin>
    </plugins>



--------------
Seth Copen Goldstein
Carnegie Mellon University
Computer Science Dept
7111 GHC
412-268-3828

On Sat, Aug 26, 2017 at 11:03 PM, Benson Margulies <bimargul...@gmail.com>
wrote:

You have excluded it from the checkstyle plugin, but it's the Java
compiler which is discontented. You need to configure the compiler
plugin, as well.

On Sat, Aug 26, 2017 at 12:03 PM, Seth Goldstein <s...@cmu.edu> wrote:
> I would have expected that too, however:
>
>       <plugin>
>         <groupId>org.apache.maven.plugins</groupId>
>         <artifactId>maven-checkstyle-plugin</artifactId>
>         <version>2.17</version>
>         <executions>
>           <execution>
>             <id>validate</id>
>             <phase>validate</phase>
>             <goals>
>               <goal>check</goal>
>             </goals>
>           </execution>
>         </executions>
>         <configuration>
>           <configLocation>config/checkstyle.xml</configLocation>
>           <excludes>**/.,*.java</excludes>
>         </configuration>
>       </plugin>
>
> And it reports that:
>
> [ERROR]
> /mnt/shared/seth/courses/619/f17/src/my-app/src/main/java/
com/mycompany/app/.,foo.java:[7,7]
> error: class App is public, should be declared in a file named App.java
>
> So, still getting .,* files.  Wish this would work properly.
>
>
> --------------
> Seth Copen Goldstein
> Carnegie Mellon University
> Computer Science Dept
> 7111 GHC
> 412-268-3828
>
> On Sat, Aug 26, 2017 at 6:47 AM, Robert Scholte <rfscho...@apache.org>
> wrote:
>
>> I would expect it to be **/.*
>> **/ means zero or more directories
>> .* any file with a dot followed by anything
>>
>> Robert
>>
>> ps. repeating the same element within configuration like you did with
>> <excludes/> means the last one will win.
>>
>>
>> On Fri, 25 Aug 2017 23:26:58 +0200, Seth Goldstein <s...@cmu.edu>
wrote:
>>
>> I am trying to exclude all files that begin with '.,' from being
checked or
>>> compiled.  Is there a quick and easy way to do this?  The following
does
>>> NOT work:
>>>
>>>       <plugin>
>>>         <groupId>org.apache.maven.plugins</groupId>
>>>         <artifactId>maven-checkstyle-plugin</artifactId>
>>>         <version>2.17</version>
>>>         <executions>
>>>           <execution>
>>>             <id>validate</id>
>>>             <phase>validate</phase>
>>>             <goals>
>>>               <goal>check</goal>
>>>             </goals>
>>>           </execution>
>>>         </executions>
>>>         <configuration>
>>>           <excludes>.,*.java</excludes>
>>>           <excludes>**/.,*.java</excludes>
>>>           <excludes>**/**/.,*.java</excludes>
>>>           <excludes>**/**/**/.,*.java</excludes>
>>>           <excludes>**/**/**/**/.,*.java</excludes>
>>>           <excludes>**/**/**/**/**/.,*.java</excludes>
>>>  <excludes>src/main/java/com/mycompany/app/.,*.java</excludes>
>>>         </configuration>
>>>       </plugin>
>>>
>>> Any suggestions?
>>>
>>> -seth
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
>> For additional commands, e-mail: users-h...@maven.apache.org
>>
>>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org

Reply via email to