0

Do we need to put maven dependencies manually in WSO2_HOME\repository\components\lib folder ?

The Scenario here is : When I build the Maven Bundle Project in WSO2 Developer Studio, it gets all Maven Dependencies resolved

but when I try to deploy this OSGi bundle as JAR Service through WSO2 Application Server GUI it gives

java.lang.ClassNotFoundException: org.springframework.dao.support.PersistenceExceptionTranslator

After that I put spring-tx.jar to

WSO2_HOME\repository\components\lib folder

and after this the Exception was gone ..

So the main question pop up here is that,

Is wso2 able to resolve maven dependencies from local .m2 repository or not ?

4

2 回答 2

1

当您构建时,它将获得 m2 repo 的依赖项,因为您在 pom.xml 中有它们。因此,当您进行部署时,您必须创建具有依赖项的 jar 才能完成此操作。否则,依赖项不会部署在 Application Server 中。您可以使用 maven 插件来创建具有依赖项的 jar。看到这个

于 2013-09-05T05:38:37.600 回答
1
Is wso2 able to resolve maven dependencies from local .m2 repository or not ?

不,您必须将其打包在 jar 中,或者将它们放在repository/components/lib文件夹中(或者repository/components/dropins如果它已经是 OSGi 包)。WSO2 Carbon 不会自动解决缺少的外部依赖项。

于 2013-09-05T06:32:28.430 回答