Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/348.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何降低JavaAnt任务中的日志级别_Java_Maven_Logging_Ant_Pom.xml - Fatal编程技术网

如何降低JavaAnt任务中的日志级别

如何降低JavaAnt任务中的日志级别,java,maven,logging,ant,pom.xml,Java,Maven,Logging,Ant,Pom.xml,我有以下配置 <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-antrun-plugin</artifactId> <version>1.8</version> <executions> <execution> <id&

我有以下配置

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-antrun-plugin</artifactId>
    <version>1.8</version>
    <executions>
        <execution>
            <id>generate-code</id>
            <phase>generate-sources</phase>
            <goals>
                <goal>run</goal>
            </goals>
            <configuration>
                <tasks>
                    <java classname="org.apache.axis2.wsdl.WSDL2Java" fork="true">
                        <arg line="-uri wsdl/DTPSampleService.wsdl -u -uw -o target/generated -p org.wso2.carbon.dataservices.samples.dtp_sample -ns2p http://ws.wso2.org/dataservice/dtp_sample=org.wso2.carbon.dataservices.samples.types.dtp_sample" />
                        <classpath refid="maven.dependency.classpath" />
                        <classpath refid="maven.compile.classpath" />
                        <classpath refid="maven.runtime.classpath" />
                    </java>
                </tasks>
            </configuration>
        </execution>
    </executions>
</plugin>
有没有办法,我可以将日志级别更改为info

我试过以下方法,但似乎没有效果

<java classname="org.apache.axis2.wsdl.WSDL2Java" fork="true">
    <jvmarg value="-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog" />
    <jvmarg value="-Dorg.apache.commons.logging.simplelog.defaultlog=off" />
    <sysproperty key="org.apache.commons.logging.Log" value="org.apache.commons.logging.impl.SimpleLog"/>
    <sysproperty key="org.apache.commons.logging.simplelog.defaultlog" value="off"/>
    <arg line="-uri wsdl/RDBMSSample.wsdl -u -uw -o target/generated -p org.wso2.carbon.dataservices.samples.rdbms_sample -ns2p http://ws.wso2.org/dataservice/rdbms_sample1=org.wso2.carbon.dataservices.samples.types.rdbms_sample" />
    <classpath refid="maven.dependency.classpath" />
    <classpath refid="maven.compile.classpath" />
    <classpath refid="maven.runtime.classpath" />
</java>

<java classname="org.apache.axis2.wsdl.WSDL2Java" fork="true">
    <jvmarg value="-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog" />
    <jvmarg value="-Dorg.apache.commons.logging.simplelog.defaultlog=off" />
    <sysproperty key="org.apache.commons.logging.Log" value="org.apache.commons.logging.impl.SimpleLog"/>
    <sysproperty key="org.apache.commons.logging.simplelog.defaultlog" value="off"/>
    <arg line="-uri wsdl/RDBMSSample.wsdl -u -uw -o target/generated -p org.wso2.carbon.dataservices.samples.rdbms_sample -ns2p http://ws.wso2.org/dataservice/rdbms_sample1=org.wso2.carbon.dataservices.samples.types.rdbms_sample" />
    <classpath refid="maven.dependency.classpath" />
    <classpath refid="maven.compile.classpath" />
    <classpath refid="maven.runtime.classpath" />
</java>