maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benson Margulies <bimargul...@gmail.com>
Subject Re: Excluding certain files from compilation or checking
Date Sun, 27 Aug 2017 03:03:43 GMT
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 <seth@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 <rfscholte@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 <seth@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-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>

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


Mime
View raw message