首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >使用java 11不创建正文和附件

使用java 11不创建正文和附件
EN

Stack Overflow用户
提问于 2019-01-10 17:46:27
回答 1查看 827关注 0票数 0

当我启动mvn clean test site并测试失败时,诱惑需要附加屏幕截图和正文,但在Java11正文和附件上没有创建。这也适用于Steps.Probably,它取决于Java版本和aspectJ库。

在Java 8上,它工作正常,没有显示异常。

也许有一些关于如何使用Java 11进行配置的想法

这里是pom.xml

代码语言:javascript
复制
<properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <compiler.version>11</compiler.version>
        <maven.surefire.version>2.22.0</maven.surefire.version>
        <maven.compiler.version>3.8.0</maven.compiler.version>
        <appium.version>7.0.0</appium.version>
        <selenium.version>3.141.59</selenium.version>

        <allure.testng.version>2.8.1</allure.testng.version>
        <allure.maven.plugin.version>2.9</allure.maven.plugin.version>
        <allure.report.version>2.7.0</allure.report.version>
        <aspectj.version>1.9.1</aspectj.version>
        <jetty.maven.plugin.version>9.4.12.RC2</jetty.maven.plugin.version>

        <exclude.tag></exclude.tag>
    </properties>

    <dependencies>
       <dependency>
            <groupId>io.qameta.allure</groupId>
            <artifactId>allure-testng</artifactId>
            <version>${allure.testng.version}</version>
        </dependency>
    </dependencies>
    
          <build>
            <plugins> 
              <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>${maven.surefire.version}</version>
                <configuration>
                    <suiteXmlFiles>
                      <suiteXmlFile>
                        src/test/resources/testng.xml
                      </suiteXmlFile>
                    </suiteXmlFiles>
                    <testFailureIgnore>true</testFailureIgnore>
                    <argLine>
                        --illegal-access=permit
                    </argLine>
                    <argLine>
                    -javaagent:"${settings.localRepository}/org/aspectj/aspectjweaver/${aspectj.version}/aspectjweaver-${aspectj.version}.jar"
                   </argLine>
                    <excludedGroups>${exclude.tag}</excludedGroups>
                </configuration>
                <dependencies>
                    <dependency>
                        <groupId>org.aspectj</groupId>
                        <artifactId>aspectjweaver</artifactId>
                        <version>${aspectj.version}</version>
                    </dependency>
                </dependencies>
            </plugin>
            
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>${maven.compiler.version}</version>
                <configuration>
                    <source>${compiler.version}</source>
                    <target>${compiler.version}</target>
                    <encoding>${project.build.sourceEncoding}</encoding>
                </configuration>
            </plugin>
            
            <plugin>
                <groupId>org.eclipse.jetty</groupId>
                <artifactId>jetty-maven-plugin</artifactId>
                <version>${jetty.maven.plugin.version}</version>
                <configuration>
                    <webAppSourceDirectory>
                      ${project.build.directory}\site\allure-maven-plugin
                    </webAppSourceDirectory>
                </configuration>
            </plugin>
          </plugins>
       </build>

    <reporting>
        <excludeDefaults>true</excludeDefaults>
        <plugins>
            <plugin>
                <groupId>io.qameta.allure</groupId>
                <artifactId>allure-maven</artifactId>
                <version>${allure.maven.plugin.version}</version>
            </plugin>
        </plugins>
    </reporting>
EN

回答 1

Stack Overflow用户

发布于 2019-02-06 17:14:30

问题是,从1.9.2版本开始,AspectJ就支持Java11。您正在使用1.9.1

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/54125878

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档