Hi, I’m trying to create a custom JAR extension. I’ve followed the tutorial on how to create and deploy a component and I’ve updated my xwiki.properties so that the extension repositories include a local Maven repository. The HelloWorld component gets built as expected and it gets deployed successfully in the local Maven repository, as described on the extension creation page. However the component won’t show up in the list of available extensions in the Extension Manager, even after a restart, and there is no error in the Jetty log. I noticed that the tutorial mentions extension.repositories=local:maven:file://${sys:user.home}/.m2/repository
while the properties file mentions extension.repositories=maven-local:maven:file://${sys:user.home}/.m2/repository
. Could there be an issue with the syntax? Is there a way to list all the repositories effectively taken into account by XWiki? Or is there something missing in the component for it to be added to the list of extensions? Thank you.
The documentation indicates
click on Advanced Search and enter your extension’s id and version and follow the instructions
did you do that or just tried the simple search ?
There is no search support for Maven repositories (mostly because there is no standard way to search in a standard Maven repository), you need to use “Advanced search” (which means indicating exactly the id and version of the extension you want).
Thanks a lot @tmortagne, I had overlooked that part indeed. Entering the extension id and version returns the expected result. I’m now facing a very strange behaviour: immediately after reading your answer I got a successful match when searching for my extension, but after a restart, the extension does not show up anymore in the result list while no other change occurred in the config of XWiki. I’m testing two extensions: the one of the tutorial, as is (id: com.acme:example, version: 1.0-SNAPSHOT), and a custom one. None of them are found by the extension manager anymore and there is no error in the log file. Would you know a way to sort this out?
You can enable DEBUG log on org.xwiki.extension.repository.internal.DefaultExtensionRepositoryManager to get more infos.
Thanks. I get the following errors once the DEBUG logger enabled:
2017-11-23 11:58:50,562 [Core extension repository updater] DEBUG aultExtensionRepositoryManager - Could not find extension [net.sf.json-lib:json-lib:jdk15/2.4] in repository [local:maven:file://home/ubuntu/.m2/repository]
org.xwiki.extension.ExtensionNotFoundException: Could not find artifact [net.sf.json-lib:json-lib:jar:jdk15:2.4] descriptor
at org.xwiki.extension.repository.aether.internal.AetherExtensionRepository.resolveMaven(AetherExtensionRepository.java:401)
at org.xwiki.extension.repository.aether.internal.AetherExtensionRepository.resolveMaven(AetherExtensionRepository.java:386)
at org.xwiki.extension.repository.aether.internal.AetherExtensionRepository.resolveMaven(AetherExtensionRepository.java:380)
at org.xwiki.extension.repository.aether.internal.AetherExtensionRepository.resolve(AetherExtensionRepository.java:186)
at org.xwiki.extension.repository.internal.DefaultExtensionRepositoryManager.resolve(DefaultExtensionRepositoryManager.java:288)
at org.xwiki.extension.repository.internal.core.DefaultCoreExtensionScanner.updateExtensions(DefaultCoreExtensionScanner.java:116)
at org.xwiki.extension.repository.internal.core.DefaultCoreExtensionRepository$1.run(DefaultCoreExtensionRepository.java:138)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.eclipse.aether.resolution.ArtifactResolutionException: Could not find artifact net.sf.json-lib:json-lib:pom:2.4 in local (file://home/ubuntu/.m2/repository)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:444)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:246)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:223)
at org.xwiki.extension.repository.aether.internal.AetherExtensionRepository.loadPom(AetherExtensionRepository.java:514)
at org.xwiki.extension.repository.aether.internal.AetherExtensionRepository.resolveMaven(AetherExtensionRepository.java:397)
... 7 common frames omitted
Caused by: org.eclipse.aether.transfer.ArtifactNotFoundException: Could not find artifact net.sf.json-lib:json-lib:pom:2.4 in local (file://home/ubuntu/.m2/repository)
at org.eclipse.aether.connector.basic.ArtifactTransportListener.transferFailed(ArtifactTransportListener.java:39)
at org.eclipse.aether.connector.basic.BasicRepositoryConnector$TaskRunner.run(BasicRepositoryConnector.java:355)
at org.eclipse.aether.util.concurrency.RunnableErrorForwarder$1.run(RunnableErrorForwarder.java:67)
at org.eclipse.aether.connector.basic.BasicRepositoryConnector$DirectExecutor.execute(BasicRepositoryConnector.java:581)
at org.eclipse.aether.connector.basic.BasicRepositoryConnector.get(BasicRepositoryConnector.java:249)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownloads(DefaultArtifactResolver.java:520)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:421)
... 11 common frames omitted
`
`2017-11-23 11:58:51,452 [Core extension repository updater] DEBUG aultExtensionRepositoryManager - Could not find extension [com.google.inject:guice:no_aop/4.1.0] in repository [local:maven:file://home/ubuntu/.m2/repository]
org.xwiki.extension.ExtensionNotFoundException: Could not find artifact [com.google.inject:guice:jar:no_aop:4.1.0] descriptor
at org.xwiki.extension.repository.aether.internal.AetherExtensionRepository.resolveMaven(AetherExtensionRepository.java:401)
at org.xwiki.extension.repository.aether.internal.AetherExtensionRepository.resolveMaven(AetherExtensionRepository.java:386)
at org.xwiki.extension.repository.aether.internal.AetherExtensionRepository.resolveMaven(AetherExtensionRepository.java:380)
at org.xwiki.extension.repository.aether.internal.AetherExtensionRepository.resolve(AetherExtensionRepository.java:186)
at org.xwiki.extension.repository.internal.DefaultExtensionRepositoryManager.resolve(DefaultExtensionRepositoryManager.java:288)
at org.xwiki.extension.repository.internal.core.DefaultCoreExtensionScanner.updateExtensions(DefaultCoreExtensionScanner.java:116)
at org.xwiki.extension.repository.internal.core.DefaultCoreExtensionRepository$1.run(DefaultCoreExtensionRepository.java:138)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.eclipse.aether.resolution.ArtifactResolutionException: Could not find artifact com.google.inject:guice:pom:4.1.0 in local (file://home/ubuntu/.m2/repository)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:444)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:246)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:223)
at org.xwiki.extension.repository.aether.internal.AetherExtensionRepository.loadPom(AetherExtensionRepository.java:514)
at org.xwiki.extension.repository.aether.internal.AetherExtensionRepository.resolveMaven(AetherExtensionRepository.java:397)
... 7 common frames omitted
Caused by: org.eclipse.aether.transfer.ArtifactNotFoundException: Could not find artifact com.google.inject:guice:pom:4.1.0 in local (file://home/ubuntu/.m2/repository)
at org.eclipse.aether.connector.basic.ArtifactTransportListener.transferFailed(ArtifactTransportListener.java:39)
at org.eclipse.aether.connector.basic.BasicRepositoryConnector$TaskRunner.run(BasicRepositoryConnector.java:355)
at org.eclipse.aether.util.concurrency.RunnableErrorForwarder$1.run(RunnableErrorForwarder.java:67)
at org.eclipse.aether.connector.basic.BasicRepositoryConnector$DirectExecutor.execute(BasicRepositoryConnector.java:581)
at org.eclipse.aether.connector.basic.BasicRepositoryConnector.get(BasicRepositoryConnector.java:249)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownloads(DefaultArtifactResolver.java:520)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:421)
... 11 common frames omitted
Well all that is not really related to your extension. You should wait until it calms down and then trying searching your extension.
Right, I waited longer and ran a search again, I get the error below showing that the Extension Manager doesn’t find the extension while it is present in /home/ubuntu/.m2/repository/com/acme/example/1.0-SNAPSHOT
. Am I searching with a wrong ID? (ID: com.acme:example, Version: 1.0-SNAPSHOT)
2017-11-23 13:40:45,886 [https://ow2con.dev.ow2.org/bin/admin/XWiki/XWikiPreferences?section=XWiki.Extensions&extensionId=com.acme%3Aexample&extensionVersion=1.0-SNAPSHOT] DEBUG aultExtensionRepositoryManager - Could not find extension [com.acme:example/1.0-SNAPSHOT] in repository [local:maven:file://home/ubuntu/.m2/repository]
org.xwiki.extension.ExtensionNotFoundException: Could not find artifact [com.acme:example:jar:1.0-SNAPSHOT] descriptor
at org.xwiki.extension.repository.aether.internal.AetherExtensionRepository.resolveMaven(AetherExtensionRepository.java:401)
Could you paste the complete stack trace. There might be a bit more details in it.
Sure here it is:
2017-11-23 13:56:53,908 [https://ow2con.dev.ow2.org/bin/admin/XWiki/XWikiPreferences?section=XWiki.Extensions&extensionId=com.acme%3Aexample&extensionVersion=1.0-SNAPSHOT] DEBUG aultExtensionRepositoryManager - Could not find extension [com.acme:example/1.0-SNAPSHOT] in repository [local:maven:file://home/ubuntu/.m2/repository]
org.xwiki.extension.ExtensionNotFoundException: Could not find artifact [com.acme:example:jar:1.0-SNAPSHOT] descriptor
at org.xwiki.extension.repository.aether.internal.AetherExtensionRepository.resolveMaven(AetherExtensionRepository.java:401)
at org.xwiki.extension.repository.aether.internal.AetherExtensionRepository.resolveMaven(AetherExtensionRepository.java:386)
at org.xwiki.extension.repository.aether.internal.AetherExtensionRepository.resolveMaven(AetherExtensionRepository.java:380)
at org.xwiki.extension.repository.aether.internal.AetherExtensionRepository.resolve(AetherExtensionRepository.java:186)
at org.xwiki.extension.repository.internal.DefaultExtensionRepositoryManager.resolve(DefaultExtensionRepositoryManager.java:288)
at org.xwiki.extension.internal.DefaultExtensionManager.resolveExtensionFromInstalled(DefaultExtensionManager.java:128)
at org.xwiki.extension.internal.DefaultExtensionManager.resolveExtension(DefaultExtensionManager.java:111)
at org.xwiki.extension.script.ExtensionManagerScriptService.resolve(ExtensionManagerScriptService.java:250)
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.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.doInvoke(UberspectImpl.java:395)
at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:384)
at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:173)
at org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:280)
at org.apache.velocity.runtime.parser.node.ASTReference.value(ASTReference.java:567)
at org.apache.velocity.runtime.parser.node.ASTExpression.value(ASTExpression.java:71)
at org.apache.velocity.runtime.parser.node.ASTSetDirective.render(ASTSetDirective.java:142)
at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:72)
at org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:87)
at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:72)
at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:342)
at org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:106)
at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:72)
at org.apache.velocity.runtime.directive.VelocimacroProxy.render(VelocimacroProxy.java:216)
at org.apache.velocity.runtime.directive.RuntimeMacro.render(RuntimeMacro.java:311)
at org.apache.velocity.runtime.directive.RuntimeMacro.render(RuntimeMacro.java:230)
at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:207)
at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:72)
at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:342)
at org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:106)
at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:72)
at org.apache.velocity.runtime.directive.VelocimacroProxy.render(VelocimacroProxy.java:216)
at org.apache.velocity.runtime.directive.RuntimeMacro.render(RuntimeMacro.java:311)
at org.apache.velocity.runtime.directive.RuntimeMacro.render(RuntimeMacro.java:230)
at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:207)
at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:72)
at org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:87)
at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:72)
at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:342)
at org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:106)
at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:342)
at org.xwiki.velocity.internal.DefaultVelocityEngine.evaluateInternal(DefaultVelocityEngine.java:259)
at org.xwiki.velocity.internal.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:222)
at com.xpn.xwiki.render.DefaultVelocityManager.evaluate(DefaultVelocityManager.java:361)
at org.xwiki.rendering.internal.macro.velocity.VelocityMacro.evaluateString(VelocityMacro.java:131)
at org.xwiki.rendering.internal.macro.velocity.VelocityMacro.evaluateString(VelocityMacro.java:52)
at org.xwiki.rendering.macro.script.AbstractScriptMacro.evaluateBlock(AbstractScriptMacro.java:286)
at org.xwiki.rendering.macro.script.AbstractScriptMacro.execute(AbstractScriptMacro.java:182)
at org.xwiki.rendering.macro.script.AbstractScriptMacro.execute(AbstractScriptMacro.java:58)
at org.xwiki.rendering.internal.transformation.macro.MacroTransformation.transform(MacroTransformation.java:272)
at org.xwiki.rendering.internal.transformation.DefaultRenderingContext.transformInContext(DefaultRenderingContext.java:183)
at org.xwiki.rendering.internal.transformation.DefaultTransformationManager.performTransformations(DefaultTransformationManager.java:95)
at org.xwiki.display.internal.DocumentContentDisplayer.display(DocumentContentDisplayer.java:263)
at org.xwiki.display.internal.DocumentContentDisplayer.display(DocumentContentDisplayer.java:133)
at org.xwiki.display.internal.DocumentContentDisplayer.display(DocumentContentDisplayer.java:58)
at org.xwiki.display.internal.DefaultDocumentDisplayer.display(DefaultDocumentDisplayer.java:96)
at org.xwiki.display.internal.DefaultDocumentDisplayer.display(DefaultDocumentDisplayer.java:39)
at org.xwiki.sheet.internal.SheetDocumentDisplayer.display(SheetDocumentDisplayer.java:123)
at org.xwiki.sheet.internal.SheetDocumentDisplayer.display(SheetDocumentDisplayer.java:52)
at org.xwiki.display.internal.ConfiguredDocumentDisplayer.display(ConfiguredDocumentDisplayer.java:68)
at org.xwiki.display.internal.ConfiguredDocumentDisplayer.display(ConfiguredDocumentDisplayer.java:42)
at com.xpn.xwiki.doc.XWikiDocument.display(XWikiDocument.java:1146)
at com.xpn.xwiki.doc.XWikiDocument.getRenderedContent(XWikiDocument.java:1187)
at com.xpn.xwiki.XWiki.getRenderedContent(XWiki.java:3958)
at com.xpn.xwiki.XWiki.include(XWiki.java:3895)
at com.xpn.xwiki.api.XWiki.includeForm(XWiki.java:1766)
at com.xpn.xwiki.api.XWiki.includeForm(XWiki.java:1726)
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.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.doInvoke(UberspectImpl.java:395)
at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:384)
at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:173)
at org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:280)
at org.apache.velocity.runtime.parser.node.ASTReference.render(ASTReference.java:369)
at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:72)
at org.apache.velocity.runtime.directive.VelocimacroProxy.render(VelocimacroProxy.java:216)
at org.apache.velocity.runtime.directive.RuntimeMacro.render(RuntimeMacro.java:311)
at org.apache.velocity.runtime.directive.RuntimeMacro.render(RuntimeMacro.java:230)
at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:207)
at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:72)
at org.apache.velocity.runtime.parser.node.ASTElseIfStatement.render(ASTElseIfStatement.java:92)
at org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:106)
at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:72)
at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:342)
at org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:106)
at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:72)
at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:342)
at org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:106)
at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:342)
at org.xwiki.velocity.internal.DefaultVelocityEngine.evaluateInternal(DefaultVelocityEngine.java:259)
at org.xwiki.velocity.internal.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:222)
at com.xpn.xwiki.render.DefaultVelocityManager.evaluate(DefaultVelocityManager.java:361)
at org.xwiki.rendering.internal.macro.velocity.VelocityMacro.evaluateString(VelocityMacro.java:131)
at org.xwiki.rendering.internal.macro.velocity.VelocityMacro.evaluateString(VelocityMacro.java:52)
at org.xwiki.rendering.macro.script.AbstractScriptMacro.evaluateBlock(AbstractScriptMacro.java:286)
at org.xwiki.rendering.macro.script.AbstractScriptMacro.execute(AbstractScriptMacro.java:182)
at org.xwiki.rendering.macro.script.AbstractScriptMacro.execute(AbstractScriptMacro.java:58)
at org.xwiki.rendering.internal.transformation.macro.MacroTransformation.transform(MacroTransformation.java:272)
at org.xwiki.rendering.internal.transformation.DefaultRenderingContext.transformInContext(DefaultRenderingContext.java:183)
at org.xwiki.rendering.internal.transformation.DefaultTransformationManager.performTransformations(DefaultTransformationManager.java:95)
at org.xwiki.display.internal.DocumentContentDisplayer.display(DocumentContentDisplayer.java:263)
at org.xwiki.display.internal.DocumentContentDisplayer.display(DocumentContentDisplayer.java:133)
at org.xwiki.display.internal.DocumentContentDisplayer.display(DocumentContentDisplayer.java:58)
at org.xwiki.display.internal.DefaultDocumentDisplayer.display(DefaultDocumentDisplayer.java:96)
at org.xwiki.display.internal.DefaultDocumentDisplayer.display(DefaultDocumentDisplayer.java:39)
at org.xwiki.sheet.internal.SheetDocumentDisplayer.display(SheetDocumentDisplayer.java:239)
at org.xwiki.sheet.internal.SheetDocumentDisplayer.applySheet(SheetDocumentDisplayer.java:219)
at org.xwiki.sheet.internal.SheetDocumentDisplayer.maybeDisplayWithSheet(SheetDocumentDisplayer.java:174)
at org.xwiki.sheet.internal.SheetDocumentDisplayer.display(SheetDocumentDisplayer.java:111)
at org.xwiki.sheet.internal.SheetDocumentDisplayer.display(SheetDocumentDisplayer.java:52)
at org.xwiki.display.internal.ConfiguredDocumentDisplayer.display(ConfiguredDocumentDisplayer.java:68)
at org.xwiki.display.internal.ConfiguredDocumentDisplayer.display(ConfiguredDocumentDisplayer.java:42)
at com.xpn.xwiki.script.display.DisplayScriptService.document(DisplayScriptService.java:134)
at com.xpn.xwiki.script.display.DisplayScriptService.content(DisplayScriptService.java:197)
at com.xpn.xwiki.script.display.DisplayScriptService.content(DisplayScriptService.java:156)
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.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.doInvoke(UberspectImpl.java:395)
at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:384)
at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:173)
at org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:280)
at org.apache.velocity.runtime.parser.node.ASTReference.render(ASTReference.java:369)
at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:72)
at org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:87)
at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:72)
at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:342)
at org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:106)
at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:342)
at org.xwiki.velocity.internal.DefaultVelocityEngine.evaluateInternal(DefaultVelocityEngine.java:259)
at org.xwiki.velocity.internal.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:222)
at com.xpn.xwiki.render.DefaultVelocityManager.evaluate(DefaultVelocityManager.java:361)
at com.xpn.xwiki.internal.template.InternalTemplateManager.evaluateContent(InternalTemplateManager.java:806)
at com.xpn.xwiki.internal.template.InternalTemplateManager.render(InternalTemplateManager.java:682)
at com.xpn.xwiki.internal.template.InternalTemplateManager.lambda$renderFromSkin$0(InternalTemplateManager.java:657)
at com.xpn.xwiki.internal.security.authorization.DefaultAuthorExecutor.call(DefaultAuthorExecutor.java:85)
at com.xpn.xwiki.internal.template.InternalTemplateManager.renderFromSkin(InternalTemplateManager.java:656)
at com.xpn.xwiki.internal.template.InternalTemplateManager.renderFromSkin(InternalTemplateManager.java:635)
at com.xpn.xwiki.internal.template.InternalTemplateManager.render(InternalTemplateManager.java:621)
at com.xpn.xwiki.internal.template.DefaultTemplateManager.render(DefaultTemplateManager.java:78)
at com.xpn.xwiki.XWiki.evaluateTemplate(XWiki.java:2120)
at com.xpn.xwiki.web.Utils.parseTemplate(Utils.java:180)
at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:463)
at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:210)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:425)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:228)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:449)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:687)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:841)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1634)
at com.xpn.xwiki.web.ActionFilter.doFilter(ActionFilter.java:112)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1621)
at org.xwiki.wysiwyg.filter.ConversionFilter.doFilter(ConversionFilter.java:127)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1621)
at org.xwiki.container.servlet.filters.internal.SetHTTPHeaderFilter.doFilter(SetHTTPHeaderFilter.java:63)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1621)
at org.xwiki.container.servlet.filters.internal.SavedRequestRestorerFilter.doFilter(SavedRequestRestorerFilter.java:208)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1621)
at org.xwiki.container.servlet.filters.internal.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:111)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1621)
at org.xwiki.resource.servlet.RoutingFilter.doFilter(RoutingFilter.java:134)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1613)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:541)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:190)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1593)
at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1239)
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:168)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:481)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1562)
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:166)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1141)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:213)
at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:118)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
at org.eclipse.jetty.server.Server.handle(Server.java:564)
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:320)
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251)
at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:279)
at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:110)
at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:124)
at org.eclipse.jetty.util.thread.Invocable.invokePreferred(Invocable.java:122)
at org.eclipse.jetty.util.thread.strategy.ExecutingExecutionStrategy.invoke(ExecutingExecutionStrategy.java:58)
at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:201)
at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:133)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:672)
at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:590)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.eclipse.aether.resolution.ArtifactResolutionException: Could not find artifact com.acme:example:pom:1.0-SNAPSHOT in local (file://home/ubuntu/.m2/repository)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:444)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:246)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:223)
at org.xwiki.extension.repository.aether.internal.AetherExtensionRepository.loadPom(AetherExtensionRepository.java:514)
at org.xwiki.extension.repository.aether.internal.AetherExtensionRepository.resolveMaven(AetherExtensionRepository.java:397)
... 198 common frames omitted
Caused by: org.eclipse.aether.transfer.ArtifactNotFoundException: Could not find artifact com.acme:example:pom:1.0-SNAPSHOT in local (file://home/ubuntu/.m2/repository)
at org.eclipse.aether.connector.basic.ArtifactTransportListener.transferFailed(ArtifactTransportListener.java:39)
at org.eclipse.aether.connector.basic.BasicRepositoryConnector$TaskRunner.run(BasicRepositoryConnector.java:355)
at org.eclipse.aether.util.concurrency.RunnableErrorForwarder$1.run(RunnableErrorForwarder.java:67)
at org.eclipse.aether.connector.basic.BasicRepositoryConnector$DirectExecutor.execute(BasicRepositoryConnector.java:581)
at org.eclipse.aether.connector.basic.BasicRepositoryConnector.get(BasicRepositoryConnector.java:249)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownloads(DefaultArtifactResolver.java:520)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:421)
... 202 common frames omitted
You seem to be using the wrong artifact id (you’re using one that is of “pom” type): Could not find artifact com.acme:example:pom:1.0-SNAPSHOT in local (file://home/ubuntu/.m2/repository)
I’m surprised to get this id in the log, because the one I’m entering in the advanced search form of the extension manager is the following:
EXTENSION ID: com.acme:example
VERSION: 1.0-SNAPSHOT
Check the corresponding pom.xml to see the type…
ok I’ve tested with:
mvn archetype:generate \
-DarchetypeArtifactId=xwiki-commons-component-archetype \
-DarchetypeGroupId=org.xwiki.commons \
-DarchetypeVersion=9.10
And indeed this generates a single maven module with a jar pom (when the packaging is not specified it’s “jar”).
I’ve tested and installed it in a clean new XWiki 9.10 version and it worked fine.
I’ve used com.acme:example
and 1.0-SNAPSHOT
version.
We are talking about the descriptor here so yes of course it’s searching for the pom. This is not install log.
So according to the error Aether cannot find any /home/ubuntu/.m2/repository/com/acme/example/1.0-SNAPSHOT/example-1.0-SNAPSHOT.pom
file.
And when I built (mvn clean install
) the generated component it installed both the JAR and the pom:
[INFO] Installing /private/tmp/example/target/example-1.0-SNAPSHOT.jar to /Users/vmassol/.m2/repository/com/acme/example/1.0-SNAPSHOT/example-1.0-SNAPSHOT.jar
[INFO] Installing /private/tmp/example/pom.xml to /Users/vmassol/.m2/repository/com/acme/example/1.0-SNAPSHOT/example-1.0-SNAPSHOT.pom
On my end, the file /home/ubuntu/.m2/repository/com/acme/example/1.0-SNAPSHOT/example-1.0-SNAPSHOT.pom
exists indeed. I don’t understand why it is not found.
ubuntu@sandbox:~$ ll /home/ubuntu/.m2/repository/com/acme/example/1.0-SNAPSHOT/example-1.0-SNAPSHOT.pom
-rw-rw---- 1 ubuntu ubuntu 2547 Nov 22 20:19 /home/ubuntu/.m2/repository/com/acme/example/1.0-SNAPSHOT/example-1.0-SNAPSHOT.pom
Actually I missed it first but you have a missing / in your configuration. Should be file:///home/ubuntu/.m2/repository
as in file://
for the protocol and /home/ubuntu/.m2/repository
for the path.