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

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)

Downloading:

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)

Downloading:

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): Error transferring f

ile: maven-repository.dev.java.net

Downloading:

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

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

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),

atlassian-contrib (

https://m2proxy.atlassian.com/contrib),

atlassian-proxy (

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>

4 answers

Guys please repond to this it would be of great help...

Thanks in advance

0 vote

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.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, 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

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.

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

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!

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.

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?

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published yesterday in Confluence

Three common content challenges + how to manage them

An efficient enterprise content management system, or ECM, is a must-have for companies that create work online (cough   cough, all companies). If content calendars, marketing plans, and bu...

67 views 0 4
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you