小编ilu*_*ilu的帖子

Emma运行时控制器没有启动

我的主要目标是使用CTL coverage.get在正在运行的Web应用程序上使用EMMA获取代码覆盖率.我使用emma maven插件.

因此,我使用检测代码部署我的Web应用程序.
在tomcat日志中看到:

EMMA: collecting runtime coverage data ...
Run Code Online (Sandbox Code Playgroud)

但没有:

EMMA: runtime controller started on port [47653]
Run Code Online (Sandbox Code Playgroud)

这意味着我无法使用ctl,因为没有人在听它.
运行时控制器无法启动的原因是什么?

我的父pom.xml:

<project>
        ...
         <build>
            <plugins>
                ...
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                        <artifactId>emma-maven-plugin</artifactId>
                        <inherited>true</inherited>   
                        <executions>
                            <execution>
                                <id>instrument</id>
                                <phase>process-test-classes</phase>
                                <goals>
                                    <goal>instrument</goal>
                                </goals>
                            </execution>                            
                        </executions>
                </plugin>
                ...
            </plugins>
        </build>
        ... 
        <reporting>
            <plugins>        
                ...
                <plugin>      
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>emma-maven-plugin</artifactId>
                    <version>1.0-alpha-3</version>
                    <inherited>true</inherited>      
                </plugin>
                ...
            </plugins>
        </reporting>
        ...
    </project>
Run Code Online (Sandbox Code Playgroud)

提前致谢.任何提示都受到高度赞赏.

maven-2 code-coverage emma maven-plugin

4
推荐指数
1
解决办法
1832
查看次数

使用Quartz每30天进行一次月度工作

伙计们,

我有用户安排的月度工作(使用Quartz).用户提供开始日期f或第一个要运行的作业,它可以是1-31个月的任何一天

我的问题是如何使用cron触发器安排此操作,记住并非所有月份都有31,30,29天.在这种情况下,作业应该在最接近的一个月中运行.所以,让我们说四月只有30天,所以工作必须在4月30日运行.

可以使用单个cron触发器完成吗?或者它应该是触发器的组合?我尝试使用CronExpression来查看它如何处理这种情况:

CronExpression ce = new CronExpression("0 0 0 30 JAN-DEC ? *");
Date nextValidTime = ce.getNextValidTimeAfter(//**27th of February**//);
Run Code Online (Sandbox Code Playgroud)

我的nextValidTime等于3月30日,所以cron只是"跳过"2月.任何帮助将受到高度赞赏.提前致谢.

java jobs triggers quartz-scheduler

4
推荐指数
1
解决办法
5201
查看次数