jira plugin pom copy jtd

Angelo Diego Crabolu May 19, 2014

How can I modify my plugin's pom.xml file so that it copies jtds-1.2.4.jar to my JiraPlugin\target\jira\webapp\WEB-INF\lib after compiling?

2 answers

0 votes
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.
May 19, 2014

Why do you want the jar file under WEB-INF/lib? If it is needed by the plugin, it should only be under the plugins classpath. You can just give the dependency scope as compile and the jar will be available in the META-INF/lib folder after packaging.

Angelo Diego Crabolu May 19, 2014

I have an sql test server for jira and I want to be connected to it when I do a atlas-run after atlas-clean, to do that I copy dbconfig.xml in jira/home but I get an error for the missing drivers

0 votes
BenjiI
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.
May 19, 2014

Hi Angelo,

Add the following dependency to your pom.xml:

<dependency>
    <groupId>net.sourceforge.jtds</groupId>
    <artifactId>jtds</artifactId>
    <version>1.2.4</version>
</dependency>

Hope this helps?!

Angelo Diego Crabolu May 19, 2014

It doesen't look like the file is copied to WEB-INF/lib

BenjiI
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.
May 19, 2014

Hi Angelo,

Is the file somewhere in your package?

BenjiI
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.
May 19, 2014

Hi Angelo,

Normally you would update your driver in de lib directory of your tomcat. Since you are apparently testing on you local machine, you can use the following plugin to manualy copy files to the target directory:

http://maven.apache.org/plugins/maven-resources-plugin/examples/copy-resources.html

Angelo Diego Crabolu May 19, 2014

Hi Benji, can I do that in the pom file after compiling but before running tomcat?

I already tried using that plugin but the phase where maven copies the other bundled jars fails with an error

BenjiI
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.
May 19, 2014

Hi Angelo,

The phase tag in the plugin configuration tells maven when to execute the action. More info about the maven build cycle

http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html

The validate phase is even before compilation, so you probably need to add it to the compile or package phase.

Angelo Diego Crabolu May 20, 2014

Hi Benji, thanks for the hint, unfortunately I tried with every phase but none is run after the lib directory creation or just before jira is run

Suggest an answer

Log in or Sign up to answer