【问题标题】:Connection properties error when starting JBoss as a Maven plugin将 JBoss 作为 Maven 插件启动时出现连接属性错误
【发布时间】:2014-04-14 16:03:16
【问题描述】:

我正在尝试在我的 PC 上安装内容管理系统 Polopoly。当我运行 mvn p:run 命令时出现以下错误(这是为了使用嵌入式数据库、jboss 和 web 容器启动 Polopoly 安装):

Failed to execute goal com.polopoly.extensions-maven-plugin:10.6.1-fp1
1-c871a5b:run (default-cli) on project myproject: Could not deploy com.polopoly.
extensions-maven-plugin:import-scan: Could not scan content: Could not create
content importer: org.apache.maven.plugin.MojoExecutionException: Unable to read
connection properties. Could not get connection properties from 'http://localho
st:8081/connection-properties/connection.properties', nor from backup 'C:\Users\
hollandv\AppData\Local\Temp\http___localhost_8081_connection-properties_connecti
on.properties'. ->

错误的详细版本如下:

[ERROR] Failed to execute goal com.polopoly.extensions-maven-plugin:10.6.1-fp1
1-c871a5b:run (default-cli) on project myproject: Could not deploy com.polopoly.
extensions-maven-plugin:import-scan: Could not scan content: Could not create
content importer: org.apache.maven.plugin.MojoExecutionException: Unable to read
connection properties. Could not get connection properties from 'http://localho
st:8081/connection-properties/connection.properties', nor from backup 'C:\Users\
hollandv\AppData\Local\Temp\http___localhost_8081_connection-properties_connecti
on.properties'. -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal c
om.polopoly.extensions-maven-plugin:10.6.1-fp11-c871a5b:run (default-cli) on p
roject myproject: Could not deploy com.polopoly.extensions-maven-plugin:import
-scan
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor
.java:213)
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.buildProje
ct(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProje
ct(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBu
ild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(Lifecycl
eStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Laun
cher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.jav
a:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(La
uncher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:
352)
Caused by: org.apache.maven.plugin.MojoFailureException: Could not deploy com.po
lopoly.extensions-maven-plugin:import-scan
at com.polopoly.maven.AbstractExecutePluginMojo.executePlugin(AbstractEx
ecutePluginMojo.java:85)
at com.polopoly.maven.PolopolyRunMojo.execute(PolopolyRunMojo.java:28)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(Default
BuildPluginManager.java:101)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor
.java:209)
... 19 more
Caused by: org.apache.maven.plugin.MojoFailureException: Could not scan content
at com.polopoly.maven.ContentScanMojo.execute(ContentScanMojo.java:299)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(Default
BuildPluginManager.java:101)
at com.polopoly.maven.AbstractExecutePluginMojo.executePlugin(AbstractEx
ecutePluginMojo.java:83)
... 22 more
Caused by: org.apache.maven.plugin.MojoExecutionException: Could not create cont
ent importer: org.apache.maven.plugin.MojoExecutionException: Unable to read con
nection properties.
at com.polopoly.maven.util.MavenPluginContentImporter.createImporter(Mav
enPluginContentImporter.java:60)
at com.polopoly.maven.util.MavenPluginContentImporter.<init>(MavenPlugin
ContentImporter.java:24)
at com.polopoly.maven.ContentScanMojo.createImporter(ContentScanMojo.jav
a:306)
at com.polopoly.maven.ContentScanMojo.execute(ContentScanMojo.java:192)
... 24 more
Caused by: org.apache.maven.plugin.MojoExecutionException: Unable to read connec
tion properties.
at com.polopoly.plugin.ContentImporter.<init>(ContentImporter.java:57)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstruct
orAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingC
onstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at com.polopoly.maven.util.MavenPluginContentImporter.createImporter(Mav
enPluginContentImporter.java:45)
... 27 more
Caused by: java.io.IOException: Could not get connection properties from 'http:/
/localhost:8081/connection-properties/connection.properties', nor from backup 'C
:\Users\hollandv\AppData\Local\Temp\http__localhost_8081_connection-properties
connection.properties'.
at com.polopoly.application.BackedupConnectionProperties.retrieveAndStor
e(BackedupConnectionProperties.java:188)
at com.polopoly.application.BackedupConnectionProperties.retrieveAndBack
up(BackedupConnectionProperties.java:112)
at com.polopoly.application.BackedupConnectionProperties.retrieveAndBack
up(BackedupConnectionProperties.java:79)
at com.polopoly.application.ConnectionProperties.<init>(ConnectionProper
ties.java:219)
at com.polopoly.plugin.ContentImporter.<init>(ContentImporter.java:51)
... 32 more
[ERROR]
[ERROR]
[ERROR] For more information about the errors and possible solutions, please rea
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureExc
eption

我已验证 Jetty Maven 插件已在项目的 pom.xml 文件中使用 p.connectionPropertiesUrl ${polopoly.connection-properties} 进行配置,但这并没有解决问题。有没有其他人遇到过这个问题,您知道如何解决吗?

【问题讨论】:

    标签: java maven jboss maven-jetty-plugin


    【解决方案1】:

    您使用哪个版本的 Maven?试试 maven 版本 3.0.x :) 它会工作的!

    你使用的 maven 命令是什么?

    尝试:

    mvn 清洁安装 -Pall mvn jboss:开始 mvn 码头:运行所有

    最好的问候 雷内

    【讨论】:

    • 谢谢。我正在使用版本 3.0.5。事实证明,部分问题在于 McAfee 防病毒软件使用了 Polopoly 尝试连接的同一端口。一旦我更改了 Polopoly 端口,我就能够成功启动它。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-05-16
    • 1970-01-01
    • 1970-01-01
    • 2010-12-17
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多