I am trying to build confluence from source code and I get build error
Asked by Ramesh Gari:

Hi,

I am trying to build confluence from source code and I get build error.

FYI: I have already added the jar in my local repository, but it is not trying to find the jar from the local.

Below is the stack trace:

\[INFO\] Unable to find resource 'javax.jms:jms:jar:1.1' in repository atlassian-p

roxy (

[](https://m2proxy.atlassian.com/repository/public)<https://m2proxy.atlassian.com/repository/public>)

Downloading:

[](https://m2proxy.atlassian.com/contrib/javax/jms/jms/1.1/jms-1.1.jar)<https://m2proxy.atlassian.com/contrib/javax/jms/jms/1.1/jms-1.1.jar>

\[INFO\] Unable to find resource 'javax.jms:jms:jar:1.1' in repository atlassian-c

ontrib (

[](https://m2proxy.atlassian.com/contrib)<https://m2proxy.atlassian.com/contrib>)

Downloading:

[](https://maven-repository.dev.java.net/nonav/repository/javax.jms/ja)<https://maven-repository.dev.java.net/nonav/repository/javax.jms/ja>

rs/jms-1.1.jar

\[WARNING\] Unable to get resource 'javax.jms:jms:jar:1.1' from repository java.ne

t (

[](https://maven-repository.dev.java.net/nonav/repository)<https://maven-repository.dev.java.net/nonav/repository>): Error transferring f

ile: [maven-repository.dev.java.net](http://maven-repository.dev.java.net)

Downloading:

[](http://repo1.maven.org/maven2/javax/jms/jms/1.1/jms-1.1.jar)<http://repo1.maven.org/maven2/javax/jms/jms/1.1/jms-1.1.jar>

\[INFO\] Unable to find resource 'javax.jms:jms:jar:1.1' in repository central (ht

tp://repo1.maven.org/maven2)

55K downloaded (atlassian-plugins-webfragment-2.11.0-m1.jar)

58K downloaded (multitenant-core-1.0-m14.jar)

Downloading:

[](https://m2proxy.atlassian.com/repository/public/com/atlassian/plugi)<https://m2proxy.atlassian.com/repository/public/com/atlassian/plugi>

ns/atlassian-plugins-core/2.11.0-m1/atlassian-plugins-core-2.11.0-m1.jar

316K downloaded (cglib-nodep-2.1_3.jar)

269K downloaded (atlassian-plugins-core-2.11.0-m1.jar)

\[INFO\] ------------------------------------------------------------------------

\[ERROR\] BUILD ERROR

\[INFO\] ------------------------------------------------------------------------

\[INFO\] Failed to resolve artifact.

Missing:

----------

1) javax.jms:jms:jar:1.1

Try downloading the file manually from:

[](http://java.sun.com/products/jms/docs.html)<http://java.sun.com/products/jms/docs.html>

Then, install it using the command:

mvn install:install-file -DgroupId=javax.jms -DartifactId=jms -Dversion=1.

1 -Dpackaging=jar -Dfile=/path/to/file

Alternatively, if you host your own repository you can deploy the file there:

mvn deploy:deploy-file -DgroupId=javax.jms -DartifactId=jms -Dversion=1.1

-Dpackaging=jar -Dfile=/path/to/file -Durl=\[url\] -DrepositoryId=\[id\]

Path to dependency:

1) com.atlassian.sal:sal-api:atlassian-plugin:2.10.11

2) com.atlassian.plugins:atlassian-plugins-webfragment:jar:2.11.0-m1

3) com.atlassian.plugins:atlassian-plugins-core:jar:2.11.0-m1

4) com.atlassian.multitenant:multitenant-core:jar:1.0-m14

5) log4j:log4j:jar:1.2.15

6) javax.jms:jms:jar:1.1

----------

1 required artifact is missing.

for artifact:

com.atlassian.sal:sal-api:atlassian-plugin:2.10.11

from the specified remote repositories:

central (

[](http://repo1.maven.org/maven2)<http://repo1.maven.org/maven2>),

atlassian-contrib (

[](https://m2proxy.atlassian.com/contrib)<https://m2proxy.atlassian.com/contrib>),

atlassian-proxy (

[](https://m2proxy.atlassian.com/repository/public)<https://m2proxy.atlassian.com/repository/public>)

?

?

\[INFO\] ------------------------------------------------------------------------

\[INFO\] For more information, run Maven with the -e switch

\[INFO\] ------------------------------------------------------------------------

\[INFO\] Total time: 5 seconds

\[INFO\] Finished at: Thu Mar 20 11:47:17 MST 2014

\[INFO\] Final Memory: 12M/243M

\[INFO\] ------------------------------------------------------------------------

C:\\Users\\rgari\\workspace\\confluence-5.4.4-source\>


Answers:
author: Umair Haroon
body: Hi Ramesh. I am getting the same problem. The file is already in my local repo but still I get the same error as yours.Can you suggest how you fixed this problem?


author: mai_nakagawa
body: Hi Ramesh,

I got the same error and solved it with the following command:

```
mvn install:install-file -DgroupId=javax.jms -DartifactId=jms -Dversion=1.1 -Dpackaging=jar -Dfile=/path/to/file -Dmaven.repo.local=./localrepo
```

What I added is *-Dmaven.repo.local* parameter. Hope this helps!

comments: author: Umair Haroon
body: This didnt help. The file was already installed in the local repo and when I do your above command still the build.bat on the source code fails.


author: jing_hwa_cheok
body: Hi Ramesh,

From the stacktrace, it seem that you missing this jar javax.jms:jms:jar:1.1 in your respotory therefore the build failed

You can try to install the jar to the maven repository bundled with the source code. I believe this should solve this issue by downloading the jar manually then installing with the command mentioned in the stacktrace:  

```
Try downloading the file manually from:http://java.sun.com/products/jms/docs.htmlThen, install it using the command:mvn install:install-file -DgroupId=javax.jms -DartifactId=jms -Dversion=1.1 -Dpackaging=jar -Dfile=/path/to/file
```

Alternatively, you can put the jar file directly into the correct directory in the maven repository. You just have to create a folder with the name "1.1" if the folder does not exist.

Kind Regards,  
Jing Hwa

comments: author: Ramesh Gari
body: Hi Jing,

Thanks for your response, but I already have the jar placed in my local maven repository. It in this location -

**C:\\Users\\rgari\\.m2\\repository\\javax\\jms\\jms\\1.1\\jms-1.1.jar**

Also if you see the stack trace its not even searching for the jar in my local repository.


author: jing_hwa_cheok
body: Hi Ramesh,  

Have you try to install the jar again using this command?

```
mvn install:install-file -DgroupId=javax.jms -DartifactId=jms -Dversion=1 -Dpackaging=jar -Dfile=/path/to/file
```


author: Ramesh Gari
body: Guys please repond to this it would be of great help...

Thanks in advance