开发者

How to deal with uncompilable source code in web app projects that need to be deployed for testing?

开发者 https://www.devze.com 2023-04-09 18:06 出处:网络
I have a web app project under development using Maven 2 that I want to deploy on server to be able to view the webpages for testing purposes while developing. Howver there is also a lot of uncompilab

I have a web app project under development using Maven 2 that I want to deploy on server to be able to view the webpages for testing purposes while developing. Howver there is also a lot of uncompilable code in the project because of which I am getting Compilation failure errors while trying to build & package the project as war for deployment. How can I deploy such project with uncompileable classes, or better say开发者_运维问答, how do I view my webpages while keeping aside the uncompilable java classes in the source packages of the project ?


Using Maven 2 for a JSF2.0(facelets) project with Netbeans 6.9 & glassfish 3.01.


Check compiler plugin and compile mojo which is called during at compile phase. Default value for failOnError is true. You should make it false.

http://maven.apache.org/plugins/maven-compiler-plugin/compile-mojo.html#failOnError

<build>
 <plugins>
  <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-compiler-plugin</artifactId>
    <version>2.3.2</version>
    <configuration>
     <failOnError>false</failOnError>
    </configuration>
  </plugin>
 </plugins>
</build>

I think that this configuration will be enough.

0

精彩评论

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

关注公众号