Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/maven/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
当我试图编译一个与包含单个代理的ESB项目相关的.car应用程序时,为什么会出现这个Maven错误?_Maven_Jakarta Ee_Wso2_Wso2esb_Wso2ei - Fatal编程技术网

当我试图编译一个与包含单个代理的ESB项目相关的.car应用程序时,为什么会出现这个Maven错误?

当我试图编译一个与包含单个代理的ESB项目相关的.car应用程序时,为什么会出现这个Maven错误?,maven,jakarta-ee,wso2,wso2esb,wso2ei,Maven,Jakarta Ee,Wso2,Wso2esb,Wso2ei,我当时正在研究VFS的概念,并试图实施本教程: 但我对此有些怀疑: 使用此示例配置启动ESB(如下所述:)工作正常: wso2ei-samples.bat -sn 254 因此,基本上我的电脑上有这个文件中定义的254示例: C:\WSO2\EI\6.3.0\samples\service-bus\synapse_sample_254.xml 我认为使用前面的-sn 253参数启动EI将执行此流程。具体是如何工作的?我的想法是,它将代理放入这个文件synapse_sample_254.xm

我当时正在研究VFS的概念,并试图实施本教程:

但我对此有些怀疑:

使用此示例配置启动ESB(如下所述:)工作正常:

wso2ei-samples.bat -sn 254
因此,基本上我的电脑上有这个文件中定义的254示例:

C:\WSO2\EI\6.3.0\samples\service-bus\synapse_sample_254.xml
我认为使用前面的-sn 253参数启动EI将执行此流程。具体是如何工作的?我的想法是,它将代理放入这个文件synapse_sample_254.xml,并在EI启动后自动部署它。但我对这一断言却心不在焉

无论如何,它是这样工作的

问题是,我试图在创建代理的ESB项目中实现此行为,但在本例中它不起作用

我所做的:

1) 我创建了一个ESB配置项目(名为VFSTest

2) 在这个项目中,我创建了一个自定义代理。新建-->代理服务-->创建新的代理服务。我将“代理服务名称”设置为VFSProxy。然后我选择了自定义代理作为代理服务类型下拉列表的值。因此,我的新代理被创建

3) 我为该代理插入以下代码(使用选项卡):

如您所见,错误似乎是:

[ERROR] Failed to execute goal on project VFSTestCAP: Could not resolve dependencies for project com.example.VFSTestCAP:VFSTestCAP:carbon/application:1.0.0: Could not find artifact com.example.VFSTest.proxy-service:VFSProxy:xml:1.0.0 in wso2-nexus (http://maven.wso2.org/nexus/content/groups/wso2-public/) -> [Help 1]
为什么它试图从Nexus检索VFSProxy?它作为XML流定义到我的ESB项目中


有什么问题吗?我错过了什么?如何修复它并创建我的汽车部署应用程序?

首先,您必须以与capp项目相同的方式构建代理项目。现在,如果您尝试构建capp,它将成功,因为相关的依赖项将位于本地maven存储库中


PS:如果您想使用maven构建car文件,最好使用maven多模块项目。这将首先安装工件,然后相应地安装capp。否则,仅导出capp就足够了。

首先,您必须以与capp项目相同的方式构建代理项目。现在,如果您尝试构建capp,它将成功,因为相关的依赖项将位于本地maven存储库中


PS:如果您想使用maven构建car文件,最好使用maven多模块项目。这将首先安装工件,然后相应地安装capp。否则,只需导出capp就足够了。

您提供的新代理名称与您使用示例代理中的代码复制的名称之间可能存在名称不匹配(如您的帖子所示)

生成新代理时,Eclipse会自动在artifacts.xml文件中创建一个条目。如果名称与代理代码中的名称不相同,那么当maven试图解决CAR项目的依赖关系时,可能会导致问题


检查这一点的最佳方法是将pom文件中的依赖项与ESB项目中的artifacts.xml进行比较。如果您更改了名称,请确保与实际代理定义中的名称匹配(以防止将来混淆)

您提供的新代理名称与您使用示例代理代码复制的名称之间可能存在名称不匹配(如您的帖子所示)

生成新代理时,Eclipse会自动在artifacts.xml文件中创建一个条目。如果名称与代理代码中的名称不相同,那么当maven试图解决CAR项目的依赖关系时,可能会导致问题


检查这一点的最佳方法是将pom文件中的依赖项与ESB项目中的artifacts.xml进行比较。如果您更改了名称,请确保与实际代理定义中的名称匹配(以防止将来混淆)

您是否尝试过从Eclipse导出复合应用程序项目(右键单击CAR projectt)?另外,您可以共享ESB项目的artifact.xml和CAR项目pom.xml吗?您提供的新代理的名称与使用示例代理代码复制的名称(如您的帖子所示)之间可能存在名称不匹配@ophychius您是我的day mate,这是一个与代理名称相关的问题。现在它可以工作了…但是现在我在部署后发现了另一个错误…现在我很高兴能提供帮助,我会把它放在子孙后代的问题的答案中。您是否尝试过Eclipse的Export Composite应用程序项目(右键单击CAR projectt)?另外,您可以共享ESB项目的artifact.xml和CAR项目pom.xml吗?您提供的新代理的名称与使用示例代理代码复制的名称(如您的帖子所示)之间可能存在名称不匹配@ophychius您是我的day mate,这是一个与代理名称相关的问题。现在它可以工作了…但现在我在部署后又遇到了一个错误…现在我很高兴能提供帮助,为了子孙后代,我会把它写进一个答案中
[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building VFSTestCAP 1.0.0
[INFO] ------------------------------------------------------------------------
[INFO] Downloading: http://maven.wso2.org/nexus/content/groups/wso2-public/org/apache/maven/plugins/maven-resources-plugin/maven-metadata.xml
[INFO] Downloading: http://maven.wso2.org/nexus/content/groups/wso2-public/org/apache/maven/plugins/maven-resources-plugin/maven-metadata.xml
[INFO] Downloading: http://dist.wso2.org/maven2/org/apache/maven/plugins/maven-resources-plugin/maven-metadata.xml
[INFO] Downloaded: http://dist.wso2.org/maven2/org/apache/maven/plugins/maven-resources-plugin/maven-metadata.xml (397 B at 0.3 KB/sec)
[INFO] Downloaded: http://maven.wso2.org/nexus/content/groups/wso2-public/org/apache/maven/plugins/maven-resources-plugin/maven-metadata.xml (843 B at 0.6 KB/sec)
[INFO] Downloaded: http://maven.wso2.org/nexus/content/groups/wso2-public/org/apache/maven/plugins/maven-resources-plugin/maven-metadata.xml (843 B at 0.6 KB/sec)
[INFO] Downloading: http://maven.wso2.org/nexus/content/groups/wso2-public/org/apache/maven/plugins/maven-compiler-plugin/maven-metadata.xml
[INFO] Downloading: http://maven.wso2.org/nexus/content/groups/wso2-public/org/apache/maven/plugins/maven-compiler-plugin/maven-metadata.xml
[INFO] Downloading: http://dist.wso2.org/maven2/org/apache/maven/plugins/maven-compiler-plugin/maven-metadata.xml
[INFO] Downloaded: http://maven.wso2.org/nexus/content/groups/wso2-public/org/apache/maven/plugins/maven-compiler-plugin/maven-metadata.xml (2 KB at 1.4 KB/sec)
[INFO] Downloaded: http://dist.wso2.org/maven2/org/apache/maven/plugins/maven-compiler-plugin/maven-metadata.xml (402 B at 0.5 KB/sec)
[INFO] Downloaded: http://maven.wso2.org/nexus/content/groups/wso2-public/org/apache/maven/plugins/maven-compiler-plugin/maven-metadata.xml (2 KB at 1.3 KB/sec)
[INFO] Downloading: http://dist.wso2.org/maven2/org/apache/maven/plugins/maven-surefire-plugin/maven-metadata.xml
[INFO] Downloading: http://maven.wso2.org/nexus/content/groups/wso2-public/org/apache/maven/plugins/maven-surefire-plugin/maven-metadata.xml
[INFO] Downloading: http://maven.wso2.org/nexus/content/groups/wso2-public/org/apache/maven/plugins/maven-surefire-plugin/maven-metadata.xml
[INFO] Downloaded: http://dist.wso2.org/maven2/org/apache/maven/plugins/maven-surefire-plugin/maven-metadata.xml (491 B at 0.6 KB/sec)
[INFO] Downloaded: http://maven.wso2.org/nexus/content/groups/wso2-public/org/apache/maven/plugins/maven-surefire-plugin/maven-metadata.xml (2 KB at 2.0 KB/sec)
[INFO] Downloaded: http://maven.wso2.org/nexus/content/groups/wso2-public/org/apache/maven/plugins/maven-surefire-plugin/maven-metadata.xml (2 KB at 2.0 KB/sec)
[INFO] Downloading: http://maven.wso2.org/nexus/content/groups/wso2-public/org/apache/maven/plugins/maven-install-plugin/maven-metadata.xml
[INFO] Downloading: http://dist.wso2.org/maven2/org/apache/maven/plugins/maven-install-plugin/maven-metadata.xml
[INFO] Downloading: http://maven.wso2.org/nexus/content/groups/wso2-public/org/apache/maven/plugins/maven-install-plugin/maven-metadata.xml
[INFO] Downloaded: http://dist.wso2.org/maven2/org/apache/maven/plugins/maven-install-plugin/maven-metadata.xml (366 B at 0.5 KB/sec)
[INFO] Downloaded: http://maven.wso2.org/nexus/content/groups/wso2-public/org/apache/maven/plugins/maven-install-plugin/maven-metadata.xml (663 B at 0.8 KB/sec)
[INFO] Downloaded: http://maven.wso2.org/nexus/content/groups/wso2-public/org/apache/maven/plugins/maven-install-plugin/maven-metadata.xml (663 B at 0.8 KB/sec)
[INFO] Downloading: http://maven.wso2.org/nexus/content/groups/wso2-public/org/apache/maven/plugins/maven-deploy-plugin/maven-metadata.xml
[INFO] Downloading: http://maven.wso2.org/nexus/content/groups/wso2-public/org/apache/maven/plugins/maven-deploy-plugin/maven-metadata.xml
[INFO] Downloading: http://dist.wso2.org/maven2/org/apache/maven/plugins/maven-deploy-plugin/maven-metadata.xml
[INFO] Downloaded: http://dist.wso2.org/maven2/org/apache/maven/plugins/maven-deploy-plugin/maven-metadata.xml (394 B at 0.5 KB/sec)
[INFO] Downloaded: http://maven.wso2.org/nexus/content/groups/wso2-public/org/apache/maven/plugins/maven-deploy-plugin/maven-metadata.xml (749 B at 0.9 KB/sec)
[INFO] Downloaded: http://maven.wso2.org/nexus/content/groups/wso2-public/org/apache/maven/plugins/maven-deploy-plugin/maven-metadata.xml (749 B at 0.9 KB/sec)
[INFO] Downloading: http://maven.wso2.org/nexus/content/groups/wso2-public/com/example/VFSTest/proxy-service/VFSProxy/1.0.0/VFSProxy-1.0.0.pom
[INFO] Downloading: http://dist.wso2.org/maven2/com/example/VFSTest/proxy-service/VFSProxy/1.0.0/VFSProxy-1.0.0.pom
[INFO] Downloading: https://repo.maven.apache.org/maven2/com/example/VFSTest/proxy-service/VFSProxy/1.0.0/VFSProxy-1.0.0.pom
[WARNING] The POM for com.example.VFSTest.proxy-service:VFSProxy:xml:1.0.0 is missing, no dependency information available
[INFO] Downloading: http://maven.wso2.org/nexus/content/groups/wso2-public/com/example/VFSTest/proxy-service/VFSProxy/1.0.0/VFSProxy-1.0.0.xml
[INFO] Downloading: http://dist.wso2.org/maven2/com/example/VFSTest/proxy-service/VFSProxy/1.0.0/VFSProxy-1.0.0.xml
[INFO] Downloading: https://repo.maven.apache.org/maven2/com/example/VFSTest/proxy-service/VFSProxy/1.0.0/VFSProxy-1.0.0.xml
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 11.597 s
[INFO] Finished at: 2018-10-12T11:21:42+02:00
[INFO] Final Memory: 20M/295M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project VFSTestCAP: Could not resolve dependencies for project com.example.VFSTestCAP:VFSTestCAP:carbon/application:1.0.0: Could not find artifact com.example.VFSTest.proxy-service:VFSProxy:xml:1.0.0 in wso2-nexus (http://maven.wso2.org/nexus/content/groups/wso2-public/) -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[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/DependencyResolutionException
[ERROR] Failed to execute goal on project VFSTestCAP: Could not resolve dependencies for project com.example.VFSTestCAP:VFSTestCAP:carbon/application:1.0.0: Could not find artifact com.example.VFSTest.proxy-service:VFSProxy:xml:1.0.0 in wso2-nexus (http://maven.wso2.org/nexus/content/groups/wso2-public/) -> [Help 1]