我正在使用$(信息在输出上写一些东西,然后我正在检查是否存在恐怖,然后我正在使用$(错误。我在输出中可以看到的是以防万一多个$(信息函数是$(错误输出并不总是在结尾。有时甚至在中间。取决于制作过程的速度。可以'等待'直到所有$(信息将被处理?
<?xml version="1.0"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>project</groupId>
<artifactId>project.pom</artifactId>
<version>X.Y.Z</version>
<packaging>pom</packaging>
<name>My project</name>
<description>My project</description>
<prerequisites>
<maven>${maven.version.min}</maven>
</prerequisites>
<modules>
<module>project.core</module>
<module>project.backend</module>
</modules>
<distributionManagement>
<repository>
//repositories
</repository>
<snapshotRepository>
//repositories
</snapshotRepository>
</distributionManagement>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>project</groupId>
<artifactId>project.core</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>project</groupId>
<artifactId>project.backend</artifactId>
<version>${project.version}</version>
</dependency>
</dependencyManagement>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.sonarsource.scanner.maven</groupId>
<artifactId>sonar-maven-plugin</artifactId>
<version>3.0.2</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.3</version>
</plugin>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<manifest>
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
<addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
</manifest>
</archive>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>
答案 0 :(得分:2)
info
输出转到stdout,error
输出转到stderr。默认情况下,stdout是缓冲的,stderr是无缓冲的;这就是他们出现不同的原因。你不会说你正在使用什么版本的GNU,但如果你升级到更新的版本,我相信它会在每次写入后刷新stdout和stderr,所以你不应再看到这个问题了(开始使用GNU make 4.0我相信。)
或者你可以使用像stdbuf这样的工具,它可能已经安装在你的系统上(如果它是一个GNU / Linux系统)来运行GNU make。