Java MuleStudio 工作室:工作室目标未能执行
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/24554383/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
MuleStudio studio:studio goal failed to execute
提问by Andres
I copied/pasted a working project in my Mule Studio workspace (from within Mule Studio) to create a new project. After that, I could do a mvn clean install on the new project and everything worked fine.
我在我的 Mule Studio 工作区(从 Mule Studio 中)复制/粘贴了一个工作项目以创建一个新项目。之后,我可以在新项目上进行 mvn clean install 并且一切正常。
Then, after any modification on the pom (i.e. add a blank line), I'm getting the following error (On an exclamation mark over the project name). I can still execute mvn clean install without errors and obtain a jar that I can deploy. However, I'd like to eliminate the error.
然后,在对 pom 进行任何修改后(即添加一个空行),我收到以下错误(在项目名称上的感叹号上)。我仍然可以毫无错误地执行 mvn clean install 并获得一个可以部署的 jar。但是,我想消除错误。
Build problem on project ProjectName, studio:studio goal failed to execute, check the Maven Output console for logs
项目 ProjectName 上的构建问题,studio:studio 目标无法执行,请检查 Maven 输出控制台以获取日志
EDIT
编辑
This is what I can read in the console
这是我可以在控制台中读取的内容
[ERROR] No plugin found for prefix 'studio' in the current project and in the plugin groups [org.apache.maven.plugins, mojo.codehaus.maven.plugins, org.codehaus.mojo] available from the repositories [local (C:\_jde\maven\repo), nexus (http://nexusserver00:8080/nexus/content/groups/public)] -> [Help 1]
org.apache.maven.plugin.prefix.NoPluginFoundForPrefixException: No plugin found for prefix 'studio' in the current project and in the plugin groups [org.apache.maven.plugins, mojo.codehaus.maven.plugins, org.codehaus.mojo] available from the repositories [local (C:\_jde\maven\repo), nexus (http://nexusserver00:8080/nexus/content/groups/public)]
at org.apache.maven.plugin.prefix.internal.DefaultPluginPrefixResolver.resolve(DefaultPluginPrefixResolver.java:94)
at org.apache.maven.lifecycle.internal.MojoDescriptorCreator.findPluginForPrefix(MojoDescriptorCreator.java:262)
at org.apache.maven.lifecycle.internal.MojoDescriptorCreator.getMojoDescriptor(MojoDescriptorCreator.java:222)
at org.apache.maven.lifecycle.internal.DefaultLifecycleTaskSegmentCalculator.calculateTaskSegments(DefaultLifecycleTaskSegmentCalculator.java:106)
at org.apache.maven.lifecycle.internal.DefaultLifecycleTaskSegmentCalculator.calculateTaskSegments(DefaultLifecycleTaskSegmentCalculator.java:86)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:98)
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(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
[ERROR]
Observation:
观察:
When I run this build on the project that doesn't show the error on Mule Studio, I get exactly the same error message.
当我在 Mule Studio 上没有显示错误的项目上运行这个构建时,我得到完全相同的错误消息。
采纳答案by Andres
Finally I solved it this way:
最后我是这样解决的:
Copy the new project to another folder and remove it from current workspace.
In Window/Preferences/Mule Studio/Maven Settings, uncheck both checkboxes (Enable Maven Suppport and Enable Automatic Maintenance).
Import the project.
Check both checkboxes unchecked in step 2.
将新项目复制到另一个文件夹并将其从当前工作区中删除。
在窗口/首选项/Mule Studio/Maven 设置中,取消选中两个复选框(启用 Maven 支持和启用自动维护)。
导入项目。
选中步骤 2 中未选中的两个复选框。
The error does not show anymore.
错误不再显示。
回答by Ale Sequeira
Try adding this repository definition to your pluginRepository section in your pom.xml or settings.xml:
尝试将此存储库定义添加到 pom.xml 或 settings.xml 中的 pluginRepository 部分:
<pluginRepositories>
...
<pluginRepository>
<id>mule-ee-public</id>
<url>https://repository.mulesoft.org/nexus/content/repositories/releases</url>
</pluginRepository>
...
</pluginRepositories>
Perhaps because an Studio error this repository is not taken into account, and it is needed to download the plugin.
可能是因为 Studio 错误,此存储库未考虑在内,需要下载插件。
回答by Ivan Bondarenko
An old thread, but maybe someone will find it useful in addition to Ale Sequeira's post.
一个旧线程,但也许除了Ale Sequeira的帖子之外,有人会发现它很有用。
You must replace http://repository.mulesoft.org/releases/repo with https://repository.mulesoft.org/nexus/content/repositories/releases/one everywhere. This is because the 1st repo responses with 301 redirection to the 2nd one, and Maven-2 handles that incorrectly. Maven-3 is alright though.
你必须在任何地方用https://repository.mulesoft.org/nexus/content/repositories/releases/替换http://repository.mulesoft.org/releases/repo 。这是因为第一个 repo 响应 301 重定向到第二个,而 Maven-2 处理错误。不过 Maven-3 没问题。
回答by Prabhat Gaur
Just close all other projects if you are using Anypoint Studio and then update the dependencies or run project. Worked several times in my case.
如果您使用 Anypoint Studio,只需关闭所有其他项目,然后更新依赖项或运行项目。在我的情况下工作了几次。