I'm getting the following when trying to use org.apache.commons.csv:
The import org.apache.commons.csv cannot be resolved
I don't really know what I'm doing wrong. I downloaded the jar file directly from apache.
I executed the following to let maven know about it:
mvn install:install-file -Dfile=../../Downloads/commons-csv-1.2/commons-csv-1.2.jar -DgroupId=org.apache.commons -DartifactId=commons-csv -Dversion=1.2 -Dpackaging=jar -DgeneratePom=true
And I updated my pom.xml to add the dependency:
<dependency> <groupId>org.apache.commons</groupId> <artifactId>commons-csv</artifactId> <version>1.2</version> <scope>provided</scope> </dependency>
I'm not sure what I'm missing here. I thought I followed what I needed to via this article, but clearly I'm not getting something right. Any help is appreciated!
Community moderators have prevented the ability to post new answers.
Hi Mike,
Try deleting the scope tag. Run atlas-mvn eclipse:eclipse
Regards
Nelson
Hi Nelson, Thanks for the advice, but I'm still getting the same result: {code} [INFO] [talledLocalContainer] 2015-10-08 18:45:22,215 localhost-startStop-1 ERROR [c.a.plugin.manager.DefaultPluginManager] There was an error loading the descriptor 'JamaMentions' of plugin 'zeeaero.jamamentions'. Disabling. [INFO] [talledLocalContainer] java.lang.RuntimeException: Unable to enable web fragment [INFO] [talledLocalContainer] at com.atlassian.plugin.web.descriptors.AbstractWebFragmentModuleDescriptor.enabled(AbstractWebFragmentModuleDescriptor.java:133) [INFO] [talledLocalContainer] at com.atlassian.plugin.web.descriptors.DefaultWebPanelModuleDescriptor.enabled(DefaultWebPanelModuleDescriptor.java:179) [INFO] [talledLocalContainer] at com.atlassian.plugin.manager.DefaultPluginManager.notifyModuleEnabled(DefaultPluginManager.java:2168) [INFO] [talledLocalContainer] at com.atlassian.plugin.manager.DefaultPluginManager.enableConfiguredPluginModule(DefaultPluginManager.java:1850) [INFO] [talledLocalContainer] at com.atlassian.plugin.manager.DefaultPluginManager.enableConfiguredPluginModules(DefaultPluginManager.java:1822) [INFO] [talledLocalContainer] at com.atlassian.plugin.manager.DefaultPluginManager.enableDependentPlugins(DefaultPluginManager.java:1268) [INFO] [talledLocalContainer] at com.atlassian.plugin.manager.DefaultPluginManager.addPlugins(DefaultPluginManager.java:1221) [INFO] [talledLocalContainer] at com.atlassian.plugin.manager.DefaultPluginManager.earlyStartup(DefaultPluginManager.java:513) [INFO] [talledLocalContainer] at com.atlassian.jira.plugin.JiraPluginManager.earlyStartup(JiraPluginManager.java:112) [INFO] [talledLocalContainer] at com.atlassian.jira.plugin.JiraPluginManager.start(JiraPluginManager.java:100) [INFO] [talledLocalContainer] at com.atlassian.jira.ComponentManager$PluginSystem.start(ComponentManager.java:675) [INFO] [talledLocalContainer] at com.atlassian.jira.ComponentManager.quickStart(ComponentManager.java:196) [INFO] [talledLocalContainer] at com.atlassian.jira.ComponentManager.start(ComponentManager.java:168) [INFO] [talledLocalContainer] at com.atlassian.jira.upgrade.PluginSystemLauncher.start(PluginSystemLauncher.java:35) [INFO] [talledLocalContainer] at com.atlassian.jira.startup.DefaultJiraLauncher.lambda$postDbLaunch$6(DefaultJiraLauncher.java:136) [INFO] [talledLocalContainer] at com.atlassian.jira.config.database.DatabaseConfigurationManagerImpl.doNowOrEnqueue(DatabaseConfigurationManagerImpl.java:356) [INFO] [talledLocalContainer] at com.atlassian.jira.config.database.DatabaseConfigurationManagerImpl.doNowOrWhenDatabaseActivated(DatabaseConfigurationManagerImpl.java:226) [INFO] [talledLocalContainer] at com.atlassian.jira.startup.DefaultJiraLauncher.postDbLaunch(DefaultJiraLauncher.java:126) [INFO] [talledLocalContainer] at com.atlassian.jira.startup.DefaultJiraLauncher.lambda$start$4(DefaultJiraLauncher.java:92) [INFO] [talledLocalContainer] at com.atlassian.jira.util.devspeed.JiraDevSpeedTimer.run(JiraDevSpeedTimer.java:34) [INFO] [talledLocalContainer] at com.atlassian.jira.startup.DefaultJiraLauncher.start(DefaultJiraLauncher.java:90) [INFO] [talledLocalContainer] at com.atlassian.jira.startup.LauncherContextListener.contextInitialized(LauncherContextListener.java:84) [INFO] [talledLocalContainer] ... 8 filtered [INFO] [talledLocalContainer] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [INFO] [talledLocalContainer] at java.util.concurrent.FutureTask.run(FutureTask.java:266) [INFO] [talledLocalContainer] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [INFO] [talledLocalContainer] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [INFO] [talledLocalContainer] at java.lang.Thread.run(Thread.java:745) [INFO] [talledLocalContainer] Caused by: com.atlassian.plugin.PluginParseException: Unable to load the module's display conditions: Could not load 'zeeaero.JamaMentionsProvider' in plugin zeeaero.jamamentions [INFO] [talledLocalContainer] at com.atlassian.plugin.web.descriptors.ContextProviderElementParser.makeContextProvider(ContextProviderElementParser.java:64) [INFO] [talledLocalContainer] at com.atlassian.plugin.web.descriptors.AbstractWebFragmentModuleDescriptor.enabled(AbstractWebFragmentModuleDescriptor.java:111) [INFO] [talledLocalContainer] ... 34 more [INFO] [talledLocalContainer] Caused by: com.atlassian.plugin.web.conditions.ConditionLoadingException: Could not load 'zeeaero.JamaMentionsProvider' in plugin zeeaero.jamamentions [INFO] [talledLocalContainer] at com.atlassian.jira.plugin.webfragment.JiraWebFragmentHelper.loadContextProvider(JiraWebFragmentHelper.java:78) [INFO] [talledLocalContainer] ... 35 more [INFO] [talledLocalContainer] Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'zeeaero.JamaMentionsProvider': Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [zeeaero.JamaMentionsProvider]: Constructor threw exception; nested exception is java.lang.Error: Unresolved compilation problems: [INFO] [talledLocalContainer] The import org.apache.commons.csv cannot be resolved [INFO] [talledLocalContainer] CSVParser cannot be resolved to a type [INFO] [talledLocalContainer] [INFO] [talledLocalContainer] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1101) [INFO] [talledLocalContainer] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1046) [INFO] [talledLocalContainer] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476) [INFO] [talledLocalContainer] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:342) [INFO] [talledLocalContainer] ... 2 filtered [INFO] [talledLocalContainer] at java.lang.reflect.Method.invoke(Method.java:497) [INFO] [talledLocalContainer] at com.atlassian.plugin.osgi.spring.DefaultSpringContainerAccessor.createBean(DefaultSpringContainerAccessor.java:112) [INFO] [talledLocalContainer] at com.atlassian.jira.plugin.PluginInjector.newInstance(PluginInjector.java:30) [INFO] [talledLocalContainer] at com.atlassian.jira.plugin.webfragment.JiraWebFragmentHelper.loadContextProvider(JiraWebFragmentHelper.java:64) [INFO] [talledLocalContainer] ... 36 more [INFO] [talledLocalContainer] Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [zeeaero.JamaMentionsProvider]: Constructor threw exception; nested exception is java.lang.Error: Unresolved compilation problems: [INFO] [talledLocalContainer] The import org.apache.commons.csv cannot be resolved [INFO] [talledLocalContainer] CSVParser cannot be resolved to a type [INFO] [talledLocalContainer] [INFO] [talledLocalContainer] at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:163) [INFO] [talledLocalContainer] at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:89) [INFO] [talledLocalContainer] ... 46 more [INFO] [talledLocalContainer] Caused by: java.lang.Error: Unresolved compilation problems: [INFO] [talledLocalContainer] The import org.apache.commons.csv cannot be resolved [INFO] [talledLocalContainer] CSVParser cannot be resolved to a type [INFO] [talledLocalContainer] [INFO] [talledLocalContainer] at zeeaero.JamaMentionsProvider.<init>(JamaMentionsProvider.java:11) [INFO] [talledLocalContainer] at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) [INFO] [talledLocalContainer] ... 1 filtered [INFO] [talledLocalContainer] at java.lang.reflect.Constructor.newInstance(Constructor.java:422) [INFO] [talledLocalContainer] at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:147) [INFO] [talledLocalContainer] ... 48 more {code}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
what about atlas-mvn eclipse:clean then atlas-mvn eclipse:eclipse
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Somehow it finally worked. I'm guessing that doing the cleans and rebuilds actually probably did fix the problem. Thanks for the help!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
check that your are downloading the jar to the same location that eclipse has as its maven home directory .
I had something similar recently with IntellijIDEA and found that the maven home directory for the project was reset and not where I was downloading things to... thus my POM XML reported nothing wrong but my imports failed. Once I set the Maven Home Directory back to /atlassian-plugin-sdk/apache-maven-3.2.1 everything worked fine.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.