I early used mysql in my plugins. Suc dependency:
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.10</version>
</dependency>
And now I am trying connect to oracle. I havent found anything about it except
http://forums.atlassian.com/thread.jspa?messageID=257371426�
but it dont work. How correct set dependency. Is it enough for connecting sdk to oracle?
Community moderators have prevented the ability to post new answers.
Due the binary license there is no public repository with the Oracle Driver JAR. You can however install the ojdbc jar to your local maven repo using the following command:
mvn install:install-file -DgroupId=com.oracle -DartifactId=ojdbc14 -Dversion=${version}-Dpackaging=jar -Dfile=ojdbc.jar
and then use the dependency as follows in the pom.
<dependency>
<groupId>com.oracle</groupId>
<artifactId>ojdbc14</artifactId>
<version>${version}
</version>
</dependency>
Thanks for help
atlas-mvn doesnt work correct, in atlas-plugin-sdk is maven situated. I wrote path to it in runtime variables.
then wrote mvn install and all worked fine.
Dont use atlas for adding dependency to local repository use standard maven.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for answer.
I havent understood exectly what yuo sai about.
1. I downloaded file of drover ojdbc14, and add such dependency to pom.xml:
<dependency>
<groupId>com.oracle</groupId>
<artifactId>ojdbc14</artifactId>
<version>10.2.0.5.0</version>
<scope>system</scope>
<systemPath>C:\Java\atlassian-plugin-sdk-3.3.4\ojdbc14.jar</systemPath>
</dependency>
project compiled successfully, but I was getting ClassNotFoundException when tried to connect.
2.atlas-mvn install:install-file -Dfile={correct path to ojdbc14.jar }
-DgroupId=com.oracle -DartifactId=ojdbc14 -Dversion=10.2.0.5.0 -Dpackaging=jar
dont work : Build error
The plugin "org.apache.maven.plugins.maven-C-plugin" does not exist or no valid version could be found.
3.I tried driver on simple java project worked perfect, I tried on maven project worked too. Only through atlassian sdk I cant connect. What is wrong in my code?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for answer. I have atlassian-plugin-sdk and at first I tried
atlas-mvn install:install-file -DgroupId=com.oracle -DartifactId=ojdbc14 -Dversion=${version}-Dpackaging=jar -Dfile=ojdbc.jar
There wasnt command install, than I tried usemvn install:install-file -DgroupId=com.oracle -DartifactId=ojdbc14 -Dversion=${version}-Dpackaging=jar -Dfile=ojdbc.jar
for maven that installed with sdk path atlassian-plugin-sdk-3.3.4\apache-maven\bin. dependency were installed
but command atlas-create cant show artifact as previous. Should I use maven for building? out of sdk?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
No if it is installed successfully atlas-mvn create should pick it up. Is it using the same local repository? Also have you given a valid version instead of ${version}? say, 10.0.1 or something?
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.
Yes, use atlas-mvn instead of mvn. After install command, you can package the plugin jar with the dependency scope compile instead od system.
Also, after packaging is done can you make sure the jar is embedded in the MET-INF/lib folder?
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.