jspc-maven-plugin由于缺少类而无法编译

琼斯

在maven项目中,运行mvn软件包时收到以下错误:

[ERROR] Failed to execute goal org.codehaus.mojo:jspc-maven-plugin:1.4.6:compile (jspc) on project cto-reporting: Execution jspc of goal org.codehaus.mojo:jspc-maven-plugin:1.4.6:compile failed: A required class was missing while executing org.codehaus.mojo:jspc-maven-plugin:1.4.6:compile: org/apache/commons/logging/LogFactory
[ERROR] -----------------------------------------------------
[ERROR] realm =    plugin>org.codehaus.mojo:jspc-maven-plugin:1.4.6
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
[ERROR] urls[0] = file:/c:/devapps/maven/repository/org/codehaus/mojo/jspc-maven-plugin/1.4.6/jspc-maven-plugin-1.4.6.jar
[ERROR] urls[1] = file:/c:/devapps/maven/repository/org/codehaus/plexus/plexus-utils/1.0.4/plexus-utils-1.0.4.jar
[ERROR] urls[2] = file:/c:/devapps/maven/repository/junit/junit/3.8.1/junit-3.8.1.jar
[ERROR] urls[3] = file:/c:/devapps/maven/repository/log4j/log4j/1.2.13/log4j-1.2.13.jar
[ERROR] urls[4] = file:/c:/devapps/maven/repository/tomcat/jasper-compiler/5.5.15/jasper-compiler-5.5.15.jar
[ERROR] urls[5] = file:/c:/devapps/maven/repository/javax/servlet/jsp-api/2.0/jsp-api-2.0.jar
[ERROR] urls[6] = file:/c:/devapps/maven/repository/ant/ant/1.6.5/ant-1.6.5.jar
[ERROR] urls[7] = file:/c:/devapps/maven/repository/tomcat/jasper-compiler-jdt/5.5.15/jasper-compiler-jdt-5.5.15.jar
[ERROR] urls[8] = file:/c:/devapps/maven/repository/org/eclipse/jdt/core/3.1.1/core-3.1.1.jar
[ERROR] urls[9] = file:/c:/devapps/maven/repository/tomcat/jasper-runtime/5.5.15/jasper-runtime-5.5.15.jar
[ERROR] urls[10] = file:/c:/devapps/maven/repository/javax/servlet/servlet-api/2.4/servlet-api-2.4.jar
[ERROR] urls[11] = file:/c:/devapps/maven/repository/commons-el/commons-el/1.0/commons-el-1.0.jar
[ERROR] Number of foreign imports: 1
[ERROR] import: Entry[import  from realm ClassRealm[parent: ClassRealm[maven.api, parent: null]]]
[ERROR] 
[ERROR] -----------------------------------------------------: org.apache.commons.logging.LogFactory

从父pom中,我获得以下信息:

  <plugin>
    <groupId>org.codehaus.mojo</groupId>
    <artifactId>jspc-maven-plugin</artifactId>
    <executions>
      <execution>
        <id>jspc</id>
        <goals>
          <goal>compile</goal>
        </goals>
        <configuration>
          <source>1.5</source>
          <target>1.5</target>
          <webFragmentFile>C:\temp\web-fragment.xml</webFragmentFile>
          <outputWebXml>C:\temp\jspweb.xml</outputWebXml>
        </configuration>
      </execution>
    </executions>
    <configuration>
      <source>1.5</source>
      <target>1.5</target>
      <webFragmentFile>C:\temp\web-fragment.xml</webFragmentFile>
      <outputWebXml>C:\temp\jspweb.xml</outputWebXml>
    </configuration>
  </plugin>

我已经尝试在我的pom中添加commons-logging,即使它已经在父pom中了,我仍然遇到相同的错误。有人知道什么地方可能出问题吗?以前,该项目运行良好。

琼斯

发生错误的原因是,我已更改为Maven 3.0.5,并且该项目是在maven 2.2.1中创建的。因此,通过改回到2.2.1,一切都解决了。

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章

IntelliJ由于缺少类而无法运行gradle项目

Maven无法编译依赖于rt.jar的类

无法使用Maven-assembly-plugin设置类路径

执行org.apache.maven.plugins:maven-war-plugin:2.1.1:war时缺少必需的类

GWT Maven Eclipse插件-由于类重复而导致编译失败

具有maven-antrun-plugin的Maven Ant BuildException ...无法找到Javac编译器

无法再编译Vaadin项目(无法执行目标com.vaadin:vaatin-maven-plugin)

Maven:“目标”文件夹下缺少已编译的类

如何手动包含由于防火墙限制而无法获取maven更新的jar文件

jspc-maven-plugin不执行?

Maven编译错误-无法执行目标org.apache.maven.plugins:maven-compiler-plugin:3.5.1:compile

缺少Maven插件

Maven:Maven构建中的类下缺少文件

camel-salesforce-maven-plugin生成的代码无法编译

Maven Project类无法编译

使用Maven编译范围时jar中缺少依赖类

我的应用程序由于类重复而无法编译

使用测试范围时,Maven无法编译测试类

Android APK缺少源类(使用Maven编译)

使用Maven动态类编译和加载

Maven无法编译

在CQ5 Archtype中使用JspC时,在Maven项目中找不到global.jsp吗?

Cargo Maven插件由于“负向偏移”而无法下载和解压缩Jetty zip

我怎样才能使scala-maven-plugin看到由maven-compiler-plugin编译的类?

javasisst-由于“缺少”字段而无法编译

缺少 Maven Surefire 插件?

Maven 构建失败 - 缺少主类

为什么当我从 jaxws-maven-plugin 生成 wsdl 类时,由于缺少 ProviderImpl,它们无法在运行时运行?

Intellij:maven clean verify:无法执行目标org.jasig.mojo.jspc:jspc-maven-plugin:2.0.2:compile:无法编译JSPS