小编Tra*_*irk的帖子

生成包含Cobertura报告的maven站点

我有一些已经通过maven进行网站生成的项目,我想在其中集成cobertura报告,但我似乎没有运行的maven目标将生成本地预览供我查看,其中包括Cobertura报告中的现场.我想确保它们在我将pom更改到repo之前正确生成并且已经生成了破坏的站点.

下面是我添加到maven poms(父级和模块)的内容,但是我运行时看到的网站mvn site:run不包括cobertura报告:

<project>
...
    <build>
    <plugins>
        <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>cobertura-maven-plugin</artifactId>
            <configuration>
                <check>
                    <haltOnFailure>false</haltOnFailure>
                    <regexes>
                        <regex>
                            <pattern>parent-package-name-here.*</pattern>
                            <branchRate>80</branchRate>
                            <lineRate>80</lineRate>
                        </regex>
                    </regexes>
                </check>
                <instrumentation>
                    <includes>
                        <include>parent-package-name-here/**/*.class</include>
                    </includes>
                </instrumentation>
            </configuration>
            <executions>
                <execution>
                    <id>clean</id>
                    <phase>pre-site</phase>
                    <goals>
                        <goal>clean</goal>
                    </goals>
                </execution>
                <execution>
                    <id>instrument</id>
                    <phase>site</phase>
                    <goals>
                        <goal>instrument</goal>
                        <goal>cobertura</goal>
                        <goal>check</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>
    </plugins>
</build>
...
<reporting>
        <plugins>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>cobertura-maven-plugin</artifactId>
            </plugin>
        </plugins>
</reporting>
...
</project>
Run Code Online (Sandbox Code Playgroud)

我应该用什么maven命令来生成带有cobertura报告的网站?或者,我应该添加(另外)以使网站生成包括cobertura报告?

java maven-2 code-coverage cobertura

7
推荐指数
1
解决办法
1万
查看次数

对于在单个语句中多次出现的替换变量,如何只对SQL Developer/SQL +提示一次?

我的查询大致如下:

 select * 
  from A_TABLE 
  where A_COLUMN = '&aVariable'
    union
 select * 
  from A_TABLE 
  where B_COLUMN = '&aVariable';
Run Code Online (Sandbox Code Playgroud)

但是当我运行它时,SQL Developer会提示我两次变量,即使它是相同的变量.

如果有一种方法可以让它只为一次使用两次的变量提示一次,我该怎么做?

希望使用脚本,它必须是一个可执行查询.

sql variables plsql substitution

5
推荐指数
2
解决办法
2万
查看次数

标签 统计

cobertura ×1

code-coverage ×1

java ×1

maven-2 ×1

plsql ×1

sql ×1

substitution ×1

variables ×1