English 中文(简体)
未经编辑的Som.xml
原标题:Show compiler warnings without editing pom.xml

在我用马文汇编材料时,我总是要展示编辑的警告和解释。 我知道如何通过编辑<代码>pom.xml来做到这一点,但我只想不这样做(因此,我可以把<代码>/code>编辑起来)。

我尝试:

mvn -Dmaven.compiler.showWarnings=true -Dmaven.compiler.showDeprecation=true clean compile

but this doesn t show any warnings (if I modify the pom.xml to show them, they are there).

两种表述(maven.compiler.showWarningsmaven.compiler.showDeprecation)exist

我有什么错误?

问题回答

引证。

mvn clean install -Dmaven.compiler.showDeprecation=true -Dmaven.compiler.showWarnings=true > warnings.txt

也许,你可以总结一下这些内容,而不是具体地描述P。

这将是这样的情况(我没有检验这一点):

<profiles>
    <profile>
        <id>development</id>
        <build>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <configuration>
                <!-- compiler options go here -->
            </configuration>
        </plugin>
        </build>
    </profile>
</profiles>

而后又是这样。

mvn compile -Pdebug




相关问题
JavaFX with Maven [closed]

I recently started a JavaFX project, and I d like to use Maven as my compiler/deployment tool. Is there a good tutorial or plugin to integrate JavaFX and Maven?

How to upload jar to respository?

I have jar files that cannot be found on Maven Central repository. I would like to add the jar so I can just include extra tag in my pom.xml file and other developer can use the jar. What are the ...

Debug Maven project in Eclipse with third party sources

I am currently developing a maven project in eclipse. The m2eclipse plugin works beautifully. It even works out of the box with debugging. But when I am debugging open source third party libarries. ...

Could Free Pascal benefit of something like Apache Maven?

Apache Maven is a very popular build and dependency management tool in the Java open source ecosphere. I did some tests to find out if it can handle compiled Free Pascal / Delphi units and found it ...

Run a single test method with maven

I know you can run all the tests in a certain class using: mvn test -Dtest=classname But I want to run an individual method and -Dtest=classname.methodname doesn t seem to work.

Uploading a directory using sftp with Maven

How can I upload a directory - Eclipse update site - using sftp with public key authentication in Maven? For background information: I m using tycho to build an Eclipse plugin and want to get the ...

What are solid NMaven or build servers for .NET alternatives?

Maven had a long history and is well supported in the Java world. NMaven has received a less successful start and has never become as popular in the C#/.NET world as its larger cousin was in the Java ...

热门标签