Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

how connect jira-plugin-sdk to oracle? (pom.xml dependency)

dr6den dr6den
Contributor
July 12, 2011

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&#257371426

but it dont work. How correct set dependency. Is it enough for connecting sdk to oracle?

4 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

1 vote
Answer accepted
Jobin Kuruvilla [Adaptavist]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 12, 2011

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>

0 votes
dr6den dr6den
Contributor
July 17, 2011

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.

0 votes
dr6den dr6den
Contributor
July 16, 2011

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?

0 votes
dr6den dr6den
Contributor
July 12, 2011

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 use
mvn 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?
Jobin Kuruvilla [Adaptavist]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 12, 2011

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?

dr6den dr6den
Contributor
July 16, 2011

perhaps you mean atlas-mvn install?

Jobin Kuruvilla [Adaptavist]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 16, 2011

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?

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

TAGS
AUG Leaders

Atlassian Community Events