我正在尝试使用此配置文件在CentOS中运行FitNesse:
<profile>
<id>fitnesse</id>
<build>
<plugins>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.6</version>
<executions>
<execution>
<id>start-fitnesse</id>
<phase>test</phase>
<configuration>
<tasks>
<echo taskname="fitnesse" message="Starting FitNesse..." />
<java classname="fitnesseMain.FitNesseMain"
classpathref="maven.runtime.classpath" fork="true">
<arg line="-p 9595" />
<arg line="-d ." />
</java>
</tasks>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>org.fitnesse.plugins</groupId>
<artifactId>maven-classpath-plugin</artifactId>
<version>1.6</version>
<scope>runtime</scope>
</dependency>
</dependencies>
</profile>我正在使用maven.classpath将依赖项jars添加到Fitnesse中
${maven.classpath}但在这种情况下,我得到了
undefined variable: maven.classpath注意:我可以看到FitNesse维基页面。
发布于 2017-11-18 00:41:11
要使用该插件,您必须确保它对wiki可用(我通常使用maven依赖插件将其复制到wiki的plugins目录)。仅仅将其添加为maven依赖项是不够的。
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.0.0</version>
<executions>
<execution>
<id>copy-plugins</id>
<phase>generate-resources</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>org.fitnesse.plugins</groupId>
<artifactId>maven-classpath-plugin</artifactId>
<version>${maven-classpath-plugin.version}</version>
<classifier>jar-with-dependencies</classifier>
<overWrite>true</overWrite>
</artifactItem>
</artifactItems>
<outputDirectory>${project.basedir}/wiki/plugins</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>此外,您还必须(从README复制):
SymbolTypes = fitnesse.wikitext.widgets.MavenClasspathSymbolType
!pomFile /path/to/pom.xml
您可以将文件定义为pom.xml@compile以包括特定范围。
https://stackoverflow.com/questions/47290913
复制相似问题