com.atlassian.plugin.PluginParseException: Unable to scan for host components in plugin classes
at com.atlassian.plugin.osgi.factory.transform.stage.HostComponentSpringStage.execute(HostComponentSpringStage.java:62)
at com.atlassian.plugin.osgi.factory.transform.DefaultPluginTransformer.transform(DefaultPluginTransformer.java:146)
at com.atlassian.plugin.osgi.factory.OsgiPluginFactory.createOsgiPluginJar(OsgiPluginFactory.java:301)
at com.atlassian.plugin.osgi.factory.OsgiPluginFactory.create(OsgiPluginFactory.java:224)
at com.atlassian.plugin.loaders.ScanningPluginLoader.deployPluginFromUnit(ScanningPluginLoader.java:155)
at com.atlassian.plugin.loaders.ScanningPluginLoader.loadAllPlugins(ScanningPluginLoader.java:89)
at com.atlassian.plugin.loaders.PermissionCheckingPluginLoader.loadAllPlugins(PermissionCheckingPluginLoader.java:24)
at com.atlassian.plugin.manager.DefaultPluginManager.init(DefaultPluginManager.java:250)
at com.atlassian.bamboo.container.BambooContainer.init(BambooContainer.java:177)
at com.atlassian.bamboo.container.BambooContainer.initialise(BambooContainer.java:160)
at com.atlassian.bamboo.upgrade.UpgradeLauncher.initialiseBambooContainer(UpgradeLauncher.java:188)
at com.atlassian.bamboo.upgrade.UpgradeLauncher.upgradeAndStartBamboo(UpgradeLauncher.java:93)
at com.atlassian.bamboo.upgrade.UpgradeLauncher.contextInitialized(UpgradeLauncher.java:39)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3934)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4429)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:526)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:850)
at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:724)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:493)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1206)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:314)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:722)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:516)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:583)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Caused by: java.io.IOException: Error parsing class file
at com.atlassian.plugin.osgi.util.ClassBinaryScanner.scanClassBinary(ClassBinaryScanner.java:66)
at com.atlassian.plugin.osgi.factory.transform.stage.HostComponentSpringStage.findUsedHostComponents(HostComponentSpringStage.java:194)
at com.atlassian.plugin.osgi.factory.transform.stage.HostComponentSpringStage.execute(HostComponentSpringStage.java:58)
... 36 more
Caused by: java.lang.IllegalArgumentException
at java.nio.Buffer.position(Buffer.java:236)
at aQute.lib.osgi.Clazz.crawl(Clazz.java:1033)
at aQute.lib.osgi.Clazz.doCode(Clazz.java:958)
at aQute.lib.osgi.Clazz.doAttribute(Clazz.java:783)
at aQute.lib.osgi.Clazz.doAttributes(Clazz.java:751)
at aQute.lib.osgi.Clazz.parseClassFile(Clazz.java:560)
at aQute.lib.osgi.Clazz.parseClassFile(Clazz.java:369)
at aQute.lib.osgi.Clazz.parseClassFileWithCollector(Clazz.java:359)
at com.atlassian.plugin.osgi.util.ClassBinaryScanner.scanClassBinary(ClassBinaryScanner.java:38)
... 38 more
2014-10-01 14:56:34,402 WARN [ThreadPoolAsyncTaskExecutor::Thread 2] [TypeConverterDelegate] PropertyEditor [com.sun.beans.editors.EnumEditor] found through deprecated global PropertyEditorManager fallback - con
2014-10-01 14:56:34,592 INFO [ThreadPoolAsyncTaskExecutor::Thread 7] [TargetScanner] Found plugin reload target directory 'C:\atlastutorial\gainplugin\src\main'
2014-10-01 14:56:34,771 INFO [ThreadPoolAsyncTaskExecutor::Thread 7] [TargetScanner] Found plugin reload target directory 'C:\atlastutorial\gainplugin\src\test'
2014-10-01 14:56:34,884 ERROR [main] [OsgiPlugin] Detected an error (BundleException) enabling the plugin 'com.iii.abhishek.gainplugin-tests' : Unresolved constraint in bundle com.iii.abhishek.gainplugin-tests [
2014-10-01 14:56:34,885 WARN [main] [OsgiPlugin] Unable to enable plugin 'com.iii.abhishek.gainplugin-tests'
2014-10-01 14:56:34,885 WARN [main] [OsgiPlugin] Because of this exception
com.atlassian.plugin.osgi.container.OsgiContainerException: Cannot start plugin: com.iii.abhishek.gainplugin-tests
at com.atlassian.plugin.osgi.factory.OsgiPlugin.enableInternal(OsgiPlugin.java:483)
at com.atlassian.plugin.impl.AbstractPlugin.enable(AbstractPlugin.java:273)
at com.atlassian.plugin.manager.PluginEnabler.actualEnable(PluginEnabler.java:116)
at com.atlassian.plugin.manager.PluginEnabler.enable(PluginEnabler.java:101)
at com.atlassian.plugin.manager.DefaultPluginManager.addPlugins(DefaultPluginManager.java:900)
at com.atlassian.plugin.manager.DefaultPluginManager.init(DefaultPluginManager.java:291)
at com.atlassian.bamboo.container.BambooContainer.init(BambooContainer.java:177)
at com.atlassian.bamboo.container.BambooContainer.initialise(BambooContainer.java:160)
at com.atlassian.bamboo.upgrade.UpgradeLauncher.initialiseBambooContainer(UpgradeLauncher.java:188)
at com.atlassian.bamboo.upgrade.UpgradeLauncher.upgradeAndStartBamboo(UpgradeLauncher.java:93)
at com.atlassian.bamboo.upgrade.UpgradeLauncher.contextInitialized(UpgradeLauncher.java:39)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3934)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4429)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:526)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:850)
at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:724)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:493)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1206)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:314)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:722)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:516)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:583)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Caused by: org.osgi.framework.BundleException: Unresolved constraint in bundle com.iii.abhishek.gainplugin-tests [83]: Unable to resolve 83.0: missing requirement [83.0] package; (package=com.iii.abhishek.gain)
at org.apache.felix.framework.Felix.resolveBundle(Felix.java:3409)
at org.apache.felix.framework.Felix.startBundle(Felix.java:1709)
at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:905)
at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:892)
at com.atlassian.plugin.osgi.factory.OsgiPlugin.enableInternal(OsgiPlugin.java:459)
... 34 more
2014-10-01 14:56:34,885 ERROR [main] [PluginEnabler] Unable to enable plugin com.iii.abhishek.gainplugin-tests
com.atlassian.plugin.osgi.container.OsgiContainerException: Cannot start plugin: com.iii.abhishek.gainplugin-tests
at com.atlassian.plugin.osgi.factory.OsgiPlugin.enableInternal(OsgiPlugin.java:483)
at com.atlassian.plugin.impl.AbstractPlugin.enable(AbstractPlugin.java:273)
at com.atlassian.plugin.manager.PluginEnabler.actualEnable(PluginEnabler.java:116)
at com.atlassian.plugin.manager.PluginEnabler.enable(PluginEnabler.java:101)
at com.atlassian.plugin.manager.DefaultPluginManager.addPlugins(DefaultPluginManager.java:900)
at com.atlassian.plugin.manager.DefaultPluginManager.init(DefaultPluginManager.java:291)
at com.atlassian.bamboo.container.BambooContainer.init(BambooContainer.java:177)
at com.atlassian.bamboo.container.BambooContainer.initialise(BambooContainer.java:160)
at com.atlassian.bamboo.upgrade.UpgradeLauncher.initialiseBambooContainer(UpgradeLauncher.java:188)
at com.atlassian.bamboo.upgrade.UpgradeLauncher.upgradeAndStartBamboo(UpgradeLauncher.java:93)
at com.atlassian.bamboo.upgrade.UpgradeLauncher.contextInitialized(UpgradeLauncher.java:39)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3934)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4429)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:526)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:850)
at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:724)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:493)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1206)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:314)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:722)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:516)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:583)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Caused by: org.osgi.framework.BundleException: Unresolved constraint in bundle com.iii.abhishek.gainplugin-tests [83]: Unable to resolve 83.0: missing requirement [83.0] package; (package=com.iii.abhishek.gain)
at org.apache.felix.framework.Felix.resolveBundle(Felix.java:3409)
at org.apache.felix.framework.Felix.startBundle(Felix.java:1709)
at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:905)
at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:892)
at com.atlassian.plugin.osgi.factory.OsgiPlugin.enableInternal(OsgiPlugin.java:459)
... 34 more
Community moderators have prevented the ability to post new answers.
Hi Krystian,
Just an update.
I just got what i was missing, now code is working smoothly.
Thank you so much..
-Abhishek
Hi, Abhishek. How you solve this problem? I have the same.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI, Can you share the solution?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Krystian,
Here is the link to the repository:
https://github.com/AbhishekKumar4/FirstRepo
Please guide me now, what i am missing. This plugin parse exception is really killing me now.
Thanks in Advance,
Abhishek
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
As I said earlier
I can help you further if you prepare a sample project that reproduces the same problem and share it with me via bitbicket/github.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Krystian,
Thank you so much for help.This issue is because of the selenium dependencies not getting resolved.
I will really appreciate if you can help me on this.
I have a java class:
Which has code like this:
import java.io.File; import java.io.IOException; import java.lang.reflect.Constructor; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.net.URL; import java.util.Iterator; import java.util.LinkedHashMap; import java.util.List; import java.util.concurrent.TimeUnit; import org.apache.commons.io.FileUtils; import org.openqa.selenium.By; import org.openqa.selenium.OutputType; import org.openqa.selenium.TakesScreenshot; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebDriverBackedSelenium; import org.openqa.selenium.WebElement; import org.openqa.selenium.android.AndroidDriver; import org.openqa.selenium.chrome.ChromeDriver; import org.openqa.selenium.firefox.FirefoxDriver; import org.openqa.selenium.firefox.FirefoxProfile; import org.openqa.selenium.ie.InternetExplorerDriverService; import org.openqa.selenium.remote.CapabilityType; import org.openqa.selenium.remote.DesiredCapabilities; import org.openqa.selenium.remote.RemoteWebDriver; import org.openqa.selenium.remote.service.DriverService; import org.openqa.selenium.safari.SafariDriver; import org.openqa.selenium.support.ui.Select; import com.atlassian.bamboo.build.logger.BuildLogger; import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.ObjectMapper; import com.iii.automation.duointerfaces.WebStepsParent; import com.iii.automation.i18n.Convert; import com.iii.automation.interfaces.InterfaceC; import com.iii.automation.keyword.domainobjects.websteps.StepData; import com.iii.automation.result.ConditionHandler; import com.iii.automation.result.ExecutionResults; import com.iii.automation.testcase.TestCaseHandler; import com.iii.automation.testsuite.TestSuiteHandler; import com.iii.automation.tool.ToolVariables; import com.thoughtworks.selenium.Selenium; import static com.iii.gain.plugin.MyFirstTask.tContext; public class WebSession extends InterfaceC { BuildLogger buildLogger=tContext.getBuildLogger(); private Selenium selenium = null; private WebDriver driver = null; private WebStepsParent unMarshelledActionFile=null; private String pathOfActionFile=null; private String actionName; private TestCaseHandler tcHandler; private DriverService service=null; public String stepType=null; public static LinkedHashMap<TestCaseHandler, Integer> handlerAndCurrentCountMap=new LinkedHashMap<TestCaseHandler, Integer>(); public static int pageObject_result=ExecutionResults.PASS; public String getPathOfActionFile() { return pathOfActionFile; } public void setPathOfActionFile(String pathOfActionFile) { this.pathOfActionFile = pathOfActionFile; } public int launchApplication() { buildLogger.addBuildLogEntry("Executing step - -> Launching Application"); try { selenium = new WebDriverBackedSelenium(driver,ToolVariables.applicationUrl); driver.get(ToolVariables.applicationUrl); Thread.currentThread().sleep(ToolVariables.executionSpeed); } catch(Exception e) { buildLogger.addBuildLogEntry("Launching Application Failed"); return ExecutionResults.FAIL; } return ExecutionResults.PASS; } public void unMarshel() { try { ObjectMapper objectMapper=new ObjectMapper(); objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); com.iii.automation.keyword.domainobjects.websteps.WebStepWrapper webStepWrapper=objectMapper.readValue(new File(getPathOfActionFile()), com.iii.automation.keyword.domainobjects.websteps.WebStepWrapper.class); unMarshelledActionFile = webStepWrapper.getWebstep(); } catch(Exception e) { e.printStackTrace(); unMarshelledActionFile=null; } } @Override public int setUp() { try { //String browserName=tcHandler.isTcForParallel?tcHandler.browserName:ToolVariables.browserName; String browserName=ToolVariables.browserName; if (browserName.equalsIgnoreCase("firefox")) { if(tcHandler.isTcForParallel) { //threadDriver = new ThreadLocal<RemoteWebDriver>(); DesiredCapabilities capabilities = new DesiredCapabilities(); capabilities.setCapability(FirefoxDriver.PROFILE, new FirefoxProfile()); capabilities.setBrowserName(DesiredCapabilities.firefox().getBrowserName()); //driver=new RemoteWebDriver(new URL("http://localhost:8888/wd/hub"), capabilities); //driver=new RemoteWebDriver(new URL("http://"+tcHandler.getAddress()+":"+tcHandler.getPort()+"/wd/hub"), capabilities); driver.manage().timeouts().implicitlyWait(6000,TimeUnit.MILLISECONDS); } else { driver = new FirefoxDriver(); driver.manage().timeouts().implicitlyWait(6000,TimeUnit.MILLISECONDS); } } else if (browserName.equalsIgnoreCase("google_chrome")) { if(tcHandler.isTcForParallel) { /*DesiredCapabilities capabilities = new DesiredCapabilities(); capabilities.setBrowserName("chrome");*/ DesiredCapabilities capability = DesiredCapabilities.chrome(); System.setProperty("webdriver.chrome.driver", ToolVariables.chrome_driverPath); //driver = new RemoteWebDriver(new URL("http://172.16.77.142:5555/wd/hub"), capabilities); //driver = new RemoteWebDriver(new URL("http://"+tcHandler.getAddress()+":"+tcHandler.getPort()+"/wd/hub"), capability); driver.manage().timeouts().implicitlyWait(6000,TimeUnit.MILLISECONDS); } else { //service = new ChromeDriverService.Builder().usingDriverExecutable(new File(ToolVariables.chrome_driverPath)).usingAnyFreePort().build(); //try { //service.start(); //} catch (IOException e) { //what to do???? // } System.setProperty("webdriver.chrome.driver", ToolVariables.chrome_driverPath); //driver = new RemoteWebDriver(service.getUrl(), DesiredCapabilities.chrome()); driver=new ChromeDriver( DesiredCapabilities.chrome()); } } else if (browserName.equalsIgnoreCase("internet_explorer")) { if(tcHandler.isTcForParallel) { DesiredCapabilities capabilities = new DesiredCapabilities(); capabilities.setBrowserName(DesiredCapabilities.internetExplorer().getBrowserName()); //capabilities.setVersion("10"); String iePath=ToolVariables.iEExecutable; System.out.println("iePath: "+iePath); //System.setProperty("webdriver.ie.driver","D:\\IEDriverServer.exe"); //driver = new RemoteWebDriver(new URL("http://"+tcHandler.getAddress()+":"+tcHandler.getPort()+"/wd/hub"), capabilities); } else { service = new InternetExplorerDriverService.Builder().usingDriverExecutable(new File(ToolVariables.iEExecutable)).usingAnyFreePort().build(); try { service.start(); } catch (IOException e) { // TODO ???? } System.setProperty("WebDriver.ie.driver",ToolVariables.iEExecutable); driver = new RemoteWebDriver(service.getUrl(), DesiredCapabilities.internetExplorer()); } }else if (browserName.equalsIgnoreCase("Safari")) { if(tcHandler.isTcForParallel) { DesiredCapabilities capabilities = new DesiredCapabilities(); capabilities.setBrowserName("safari"); driver = new RemoteWebDriver(new URL(tcHandler.parallelURL), capabilities); } else { driver = new SafariDriver(); driver.manage().timeouts().implicitlyWait(6000,TimeUnit.MILLISECONDS); } }else if (browserName.equalsIgnoreCase("opera")) { if(tcHandler.isTcForParallel) { DesiredCapabilities capabilities = new DesiredCapabilities(); capabilities.setBrowserName("opera"); driver = new RemoteWebDriver(new URL(tcHandler.parallelURL), capabilities); } else { //driver = new OperaDriver(); //driver.manage().timeouts().implicitlyWait(6000,TimeUnit.MILLISECONDS); } }else if (browserName.equalsIgnoreCase("android_browser")) { try { System.out.println("cmd /c start "+System.getProperty("user.dir")+"\\resources\\AndroidBrowserCommands.bat"); Runtime.getRuntime().exec("cmd /c start "+System.getProperty("user.dir")+"\\resources\\AndroidBrowserCommands.bat"); } catch (IOException e) { e.printStackTrace(); } Thread.sleep(7000); driver = new AndroidDriver(); }else if (browserName.equalsIgnoreCase("iOS_browser")){ System.out.println("In IOS browser session"); DesiredCapabilities capabilities = new DesiredCapabilities(); capabilities.setCapability(CapabilityType.BROWSER_NAME, "iOS"); capabilities.setCapability(CapabilityType.VERSION, "6.1"); capabilities.setCapability("device", "iPhone Simulator"); capabilities.setCapability(CapabilityType.PLATFORM, "Mac"); capabilities.setCapability("app", "safari"); driver = new RemoteWebDriver(new URL("http://0.0.0.0:4723/wd/hub"), capabilities); } if(TestSuiteHandler.stop==true) { return ExecutionResults.FAIL; } return ExecutionResults.PASS; } catch (Exception e) { buildLogger.addBuildLogEntry("Error while launching the browser instance"); e.printStackTrace(); return ExecutionResults.FAIL; } }
my pom looks like this:
<?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>com.iii.gain</groupId> <artifactId>GainPlugin</artifactId> <version>1.0-SNAPSHOT</version> <organization> <name>Example Company</name> <url>http://www.example.com/</url> </organization> <name>GainPlugin</name> <description>This is the com.iii.gain:GainPlugin plugin for Atlassian Bamboo.</description> <packaging>atlassian-plugin</packaging> <properties> <bamboo.version>5.6.2</bamboo.version> <bamboo.data.version>5.6.0</bamboo.data.version> <amps.version>5.0.4</amps.version> <plugin.testrunner.version>1.2.0</plugin.testrunner.version> </properties> <repositories> <repository> <id>openqa</id> <name>OpenQA Repository</name> <url>http://nexus.openqa.org/content/repositories/releases/</url> <snapshots> <enabled>false</enabled> </snapshots> <releases> <enabled>true</enabled> </releases> </repository> <repository> <id>opencast-public</id> <url>http://repository.opencastproject.org/nexus/content/repositories/public/</url> </repository> </repositories> <dependencies> <dependency> <groupId>com.atlassian.bamboo</groupId> <artifactId>atlassian-bamboo-web</artifactId> <version>${bamboo.version}</version> <scope>provided</scope> </dependency> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.10</version> <scope>test</scope> </dependency> <!-- WIRED TEST RUNNER DEPENDENCIES --> <dependency> <groupId>com.atlassian.plugins</groupId> <artifactId>atlassian-plugins-osgi-testrunner</artifactId> <version>${plugin.testrunner.version}</version> <scope>test</scope> </dependency> <dependency> <groupId>javax.ws.rs</groupId> <artifactId>jsr311-api</artifactId> <version>1.1.1</version> <scope>provided</scope> </dependency> <dependency> <groupId>com.google.code.gson</groupId> <artifactId>gson</artifactId> <version>2.2.2-atlassian-1</version> </dependency> <dependency> <groupId>com.fasterxml.jackson.core</groupId> <artifactId>jackson-core</artifactId> <version>2.1.1</version> </dependency> <dependency> <groupId>com.fasterxml.jackson.core</groupId> <artifactId>jackson-annotations</artifactId> <version>2.1.1</version> </dependency> <dependency> <groupId>com.fasterxml.jackson.core</groupId> <artifactId>jackson-databind</artifactId> <version>2.1.1</version> </dependency> <dependency> <groupId>com.atlassian.selenium</groupId> <artifactId>atlassian-selenium</artifactId> <version>1.3</version> </dependency> <dependency> <groupId>org.seleniumhq.selenium.client-drivers</groupId> <artifactId>selenium-java-client-driver</artifactId> <version>1.0.2</version> </dependency> <dependency> <groupId>com.atlassian.selenium</groupId> <artifactId>atlassian-webdriver-core</artifactId> <version>2.3-PHANTOM_JS_SPIKE</version> </dependency> </dependencies> <build> <plugins> <plugin> <groupId>com.atlassian.maven.plugins</groupId> <artifactId>maven-bamboo-plugin</artifactId> <version>${amps.version}</version> <extensions>true</extensions> <configuration> <productVersion>${bamboo.version}</productVersion> <productDataVersion>${bamboo.data.version}</productDataVersion> </configuration> </plugin> <plugin> <artifactId>maven-compiler-plugin</artifactId> <configuration> <source>1.7</source> <target>1.7</target> </configuration> </plugin> </plugins> </build> </project>
I am not getting why my selenium packages are not getting resolved, why maven is not able to download the artifacts.
even if i add these in my POM:
<dependency> <groupId>org.seleniumhq.selenium</groupId> <artifactId>selenium-java</artifactId> <version>2.33.0</version> <scope>compile</scope> </dependency> <dependency> <groupId>org.seleniumhq.selenium</groupId> <artifactId>selenium-server</artifactId> <version>2.33.0</version> <scope>compile</scope> </dependency> <dependency> <groupId>org.seleniumhq.selenium</groupId> <artifactId>selenium-server-standalone</artifactId> <version>2.33.0</version> <scope>compile</scope> </dependency>
Its not working..
Thanks in Advance.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Abhishek
I can help you further if you prepare a sample project that reproduces the same problem and share it with me via bitbicket/github.
Basically if you you're saying that your plugin should import com.iii.abhishek.gain.*;
then some other plugin should export this package. IMO your plugin should also export this package, also please make up your mind and use one place for your bundle instructions (either pom.xml or atlassian-plugin.xml)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Krystian,
Yes this package is in my plugin. I want to know is it mandatory to give all the packages of my project in <Import-Package> and <Export-Package>? Because previously my plugin was up without using any import or export instructions.
Thanks in advance,
Abhishek
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In your POM you have:
<instructions>
<Import-Package>com.iii.abhishek.gain.*;</Import-Package>
</instructions>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
POM looks like this :
<?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>com.iii.abhishek</groupId> <artifactId>gainplugin</artifactId> <version>1.0-SNAPSHOT</version> <organization> <name>Example Company</name> <url>http://www.example.com/</url> </organization> <name>gainplugin</name> <description>This is the com.iii.abhishek:gainplugin plugin for Atlassian Bamboo.</description> <packaging>atlassian-plugin</packaging> <properties> <bamboo.version>5.6.2</bamboo.version> <bamboo.data.version>5.6.0</bamboo.data.version> <amps.version>5.0.4</amps.version> <plugin.testrunner.version>1.2.0</plugin.testrunner.version> </properties> <dependencies> <dependency> <groupId>com.atlassian.bamboo</groupId> <artifactId>atlassian-bamboo-web</artifactId> <version>${bamboo.version}</version> <scope>provided</scope> </dependency> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.10</version> <scope>test</scope> </dependency> <!-- WIRED TEST RUNNER DEPENDENCIES --> <dependency> <groupId>com.atlassian.plugins</groupId> <artifactId>atlassian-plugins-osgi-testrunner</artifactId> <version>${plugin.testrunner.version}</version> <scope>test</scope> </dependency> <dependency> <groupId>javax.ws.rs</groupId> <artifactId>jsr311-api</artifactId> <version>1.1.1</version> <scope>provided</scope> </dependency> <dependency> <groupId>com.google.code.gson</groupId> <artifactId>gson</artifactId> <version>2.2.2-atlassian-1</version> <scope>compile</scope> </dependency> <dependency> <groupId>com.fasterxml.jackson.core</groupId> <artifactId>jackson-core</artifactId> <version>2.1.1</version> <scope>compile</scope> </dependency> <dependency> <groupId>com.fasterxml.jackson.core</groupId> <artifactId>jackson-annotations</artifactId> <version>2.1.1</version> <scope>compile</scope> </dependency> <dependency> <groupId>com.googlecode.json-simple</groupId> <artifactId>json-simple</artifactId> <version>1.1</version> <scope>compile</scope> </dependency> <dependency> <groupId>com.fasterxml.jackson.core</groupId> <artifactId>jackson-databind</artifactId> <version>2.1.1</version> <scope>compile</scope> </dependency> <dependency> <groupId>org.seleniumhq.selenium</groupId> <artifactId>selenium-java</artifactId> <version>2.33.0</version> <scope>compile</scope> </dependency> <dependency> <groupId>org.seleniumhq.selenium</groupId> <artifactId>selenium-server</artifactId> <version>2.33.0</version> <scope>compile</scope> </dependency> <dependency> <groupId>org.seleniumhq.selenium</groupId> <artifactId>selenium-server-standalone</artifactId> <version>2.33.0</version> <scope>compile</scope> </dependency> <dependency> <groupId>com.google.collections</groupId> <artifactId>google-collections</artifactId> <version>1.0</version> <scope>compile</scope> </dependency> </dependencies> <build> <plugins> <plugin> <groupId>com.atlassian.maven.plugins</groupId> <artifactId>maven-bamboo-plugin</artifactId> <version>${amps.version}</version> <extensions>true</extensions> <configuration> <productVersion>${bamboo.version}</productVersion> <productDataVersion>${bamboo.data.version}</productDataVersion> <instructions> <Import-Package>com.iii.abhishek.gain.*;</Import-Package> </instructions> </configuration> </plugin> <plugin> <artifactId>maven-compiler-plugin</artifactId> <configuration> <source>1.6</source> <target>1.6</target> </configuration> </plugin> </plugins> </build> </project>
and this is my atlassian-plugin.xml
<atlassian-plugin key="${project.groupId}.${project.artifactId}" name="${project.name}" plugins-version="2"> <plugin-info> <description>${project.description}</description> <version>${project.version}</version> <vendor name="${project.organization.name}" url="${project.organization.url}" /> <param name="plugin-icon">images/pluginIcon.png</param> <param name="plugin-logo">images/pluginLogo.png</param> <bundle-instructions> <Import-Package> org.openqa.selenium.*;version="[1.0,2.33)", com.fasterxml.jackson.databind.*;version="[1.0,2.2)", com.opera.core.systems.*;version="[1.0,2.33)", com.thoughtworks.selenium.*;version="[1.0,2.33)", com.atlassian.bamboo.*;version="[1.0,5.7)", com.iii.abhishek.gain.*;version="[1.0,2.0)" </Import-Package> </bundle-instructions> </plugin-info> <!-- add our i18n resource --> <resource type="i18n" name="i18n" location="gainplugin"/> <!-- add our web resources --> <web-resource key="gainplugin-resources" name="gainplugin Web Resources"> <dependency>com.atlassian.auiplugin:ajs</dependency> <resource type="download" name="gainplugin.css" location="/css/gainplugin.css"/> <resource type="download" name="gainplugin.js" location="/js/gainplugin.js"/> <resource type="download" name="images/" location="/images"/> <context>gainplugin</context> </web-resource> <!-- publish our component --> <component key="myPluginComponent" class="com.iii.abhishek.gain.MyPluginComponentImpl" public="true"> <interface>com.iii.abhishek.gain.MyPluginComponent</interface> </component> <!-- import from the product container --> <component-import key="applicationProperties" interface="com.atlassian.sal.api.ApplicationProperties" /> <taskType key="myFirstTask" name="My First Task" class="com.iii.abhishek.gain.MyFirstTask"> <description>A task that prints 'Hello, World!'</description> </taskType> </atlassian-plugin>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Abhishek
I understand that this a problem with your plugin. I can take a look if you'll make your sourcecode available or create a simplified version of a project that reproduces this faulty behavior.
Most important message is here:
Caused by: org.osgi.framework.BundleException: Unresolved constraint in bundle com.iii.abhishek.gainplugin-tests [83]: Unable to resolve 83.0: missing requirement [83.0] package; (package=com.iii.abhishek.gain)
this kind of error is usually related to missing/wrong Export-Packages
instructions in your bundle
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Community moderators have prevented the ability to post new answers.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.