开发者

How to ignore .java files when compiling using maven?

开发者 https://www.devze.com 2023-01-14 23:33 出处:网络
I have .java files in my source directory that don\'t compile yet due to some API change. I would like to fix sources one by one开发者_运维百科 and it would be useful to ignore some of them to run tes

I have .java files in my source directory that don't compile yet due to some API change. I would like to fix sources one by one开发者_运维百科 and it would be useful to ignore some of them to run tests.


With the maven compiler plugin and the exclude option:

  <build>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <configuration>
                <excludes>
                    <exclude>**/*Point*.java</exclude>
                </excludes>
            </configuration>
         </plugin>
     </plugins>
  </build>

Resources:

  • Maven 2 Compiler plugin - Compile mojo
0

精彩评论

暂无评论...
验证码 换一张
取 消