使用带有配置文件构建 openjpa-maven-plugin 的 Maven 进行编译不起作用

问题描述

  • Maven 命令行

    mvn clean deploy -X -U -P aws -Dprofile=jboss -Pjboss -Dmaven.repo.local=./newrepo

  • 在 Maven 中配置的配置文件

enter image description here

  • 将 Nexus 迁移到另一台服务器后开始出现错误

  • 使用 maven 构建项目时出现以下错误

[ERROR] Failed to execute goal org.apache.openjpa:openjpa-maven-plugin:2.2.0:enhance (enhancer) on project XPTO: Execution enhancer of goal org.apache.openjpa:openjpa-maven-plugin:2.2.0:enhance Failed: org.apache.openjpa.persistence.PersistenceProductDerivation:java.io.IOException: org.xml.sax.SAXNotRecognizedException: http://java.sun.com/xml/jaxp/properties/schemaLanguage -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.openjpa:openjpa-maven-plugin:2.2.0:enhance (enhancer) on project XPTO: Execution enhancer of goal org.apache.openjpa:openjpa-maven-plugin:2.2.0:enhance Failed: org.apache.openjpa.persistence.PersistenceProductDerivation:java.io.IOException: org.xml.sax.SAXNotRecognizedException: http://java.sun.com/xml/jaxp/properties/schemaLanguage
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:224)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:120)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:355)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:155)
    at org.apache.maven.cli.MavenCli.execute(MavenCli.java:584)
    at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:216)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:160)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.plugin.PluginExecutionException: Execution enhancer of goal org.apache.openjpa:openjpa-maven-plugin:2.2.0:enhance Failed: org.apache.openjpa.persistence.PersistenceProductDerivation:java.io.IOException: org.xml.sax.SAXNotRecognizedException: http://java.sun.com/xml/jaxp/properties/schemaLanguage
    at org.apache.maven.plugin.DefaultBuildpluginManager.executeMojo(DefaultBuildpluginManager.java:143)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
    ... 19 more
Caused by: java.util.MissingResourceException: org.apache.openjpa.persistence.PersistenceProductDerivation:java.io.IOException: org.xml.sax.SAXNotRecognizedException: http://java.sun.com/xml/jaxp/properties/schemaLanguage
    at org.apache.openjpa.lib.conf.ProductDerivations.reportErrors(ProductDerivations.java:365)
    at org.apache.openjpa.lib.conf.ProductDerivations.load(ProductDerivations.java:354)
    at org.apache.openjpa.lib.conf.ProductDerivations.loadDefaults(ProductDerivations.java:318)
    at org.apache.openjpa.lib.conf.Configurations.populateConfiguration(Configurations.java:353)
    at org.apache.openjpa.enhance.PCEnhancer.run(PCEnhancer.java:4438)
    at org.apache.openjpa.enhance.PCEnhancer$1.run(PCEnhancer.java:4409)
    at org.apache.openjpa.lib.conf.Configurations.launchRunnable(Configurations.java:708)
    at org.apache.openjpa.lib.conf.Configurations.runAgainstAllAnchors(Configurations.java:693)
    at org.apache.openjpa.enhance.PCEnhancer.run(PCEnhancer.java:4404)
    at org.apache.openjpa.tools.maven.AbstractOpenJpaEnhancerMojo.enhance(AbstractOpenJpaEnhancerMojo.java:133)
    at org.apache.openjpa.tools.maven.AbstractOpenJpaEnhancerMojo.execute(AbstractOpenJpaEnhancerMojo.java:95)
    at org.apache.maven.plugin.DefaultBuildpluginManager.executeMojo(DefaultBuildpluginManager.java:132)
    ... 20 more
Caused by: java.io.IOException: org.xml.sax.SAXNotRecognizedException: http://java.sun.com/xml/jaxp/properties/schemaLanguage
    at org.apache.openjpa.lib.Meta.XMLMetaDataParser.parseNewResource(XMLMetaDataParser.java:379)
    at org.apache.openjpa.lib.Meta.XMLMetaDataParser.parse(XMLMetaDataParser.java:318)
    at org.apache.openjpa.lib.Meta.XMLMetaDataParser.parse(XMLMetaDataParser.java:295)
    at org.apache.openjpa.lib.Meta.XMLMetaDataParser.parse(XMLMetaDataParser.java:268)
    at org.apache.openjpa.persistence.PersistenceProductDerivation$ConfigurationParser.parse(PersistenceProductDerivation.java:509)
    at org.apache.openjpa.persistence.PersistenceProductDerivation.parseResources(PersistenceProductDerivation.java:359)
    at org.apache.openjpa.persistence.PersistenceProductDerivation.load(PersistenceProductDerivation.java:326)
    at org.apache.openjpa.persistence.PersistenceProductDerivation.loadDefaults(PersistenceProductDerivation.java:278)
    at org.apache.openjpa.lib.conf.ProductDerivations.load(ProductDerivations.java:344)
    ... 30 more
Caused by: org.xml.sax.SAXNotRecognizedException: http://java.sun.com/xml/jaxp/properties/schemaLanguage
    at gnu.xml.aelfred2.XmlReader.getProperty(XmlReader.java:181)
    at gnu.xml.aelfred2.XmlReader.setProperty(XmlReader.java:166)
    at gnu.xml.aelfred2.JAXPFactory$JaxpParser.setProperty(JAXPFactory.java:147)
    at org.apache.openjpa.lib.Meta.XMLMetaDataParser.parseNewResource(XMLMetaDataParser.java:365)
    ... 38 more
[ERROR] 
[ERROR] 
[ERROR] For more information about the errors and possible solutions,please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException
[ERROR] 
[ERROR] After correcting the problems,you can resume the build with the command

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...