HOW TO BUILD CONFLUENCE SOURCE CODE TO USE MAVEN?

Hi, I get the source for Atlassian Open Source Licenses.

I follow it.

https://developer.atlassian.com/display/CONFDEV/Building+Confluence+From+Source+Code

1. Download Confluence source code for Atlassian Open Source Licenses.


[tasha@: confluence-5.2-m19-source]$ls

.................

2. Setting Maven

3. Run the following command

[tasha@: confluence-5.2-m19-source]$ .\maven\bin\mvn install:install-file -DgroupId=javax.mail -DartifactId=mail -Dversion=1.x.x -Dpackaging=jar -Dfile=Path/To/mail.jar

4. Run build.sh script

[tasha: confluence-5.2-m19-source]$./build.sh

------------------------------ Error Message Start ----------------------------------

[INFO] Scanning for projects...

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

[INFO] Building Atlassian Core

[INFO] task-segment: [clean, install]

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

[INFO] [clean:clean]

[INFO] Deleting /home/onycom/usr/local/confluence-5.2-m19-source/atlassian-core/target

[INFO] [enforcer:enforce {execution: enforce-build-environment}]

[INFO] [dependency:unpack {execution: copy-doclava-artifact}]

[INFO] Configured Artifact: com.atlassian.devrel:doclava-theme:0.16:jar

Downloading: https://m2proxy.atlassian.com/repository/public/com/atlassian/devrel/doclava-theme/0.16/doclava-theme-0.16.jar

[INFO] Unable to find resource 'com.atlassian.devrel:doclava-theme:jar:0.16' in repository atlassian-proxy (https://m2proxy.atlassian.com/repository/public)

Downloading: https://m2proxy.atlassian.com/contrib/com/atlassian/devrel/doclava-theme/0.16/doclava-theme-0.16.jar

[INFO] Unable to find resource 'com.atlassian.devrel:doclava-theme:jar:0.16' in repository atlassian-contrib (https://m2proxy.atlassian.com/contrib)

Downloading: http://repo1.maven.org/maven2/com/atlassian/devrel/doclava-theme/0.16/doclava-theme-0.16.jar

[INFO] Unable to find resource 'com.atlassian.devrel:doclava-theme:jar:0.16' in repository central (http://repo1.maven.org/maven2)

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

[ERROR] BUILD ERROR

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

[INFO] Unable to find artifact.

Embedded error: Unable to download the artifact from any repository

Try downloading the file manually from the project website.

Then, install it using the command:

mvn install:install-file -DgroupId=com.atlassian.devrel -DartifactId=doclava-theme -Dversion=0.16 -Dpackaging=jar -Dfile=/path/to/file

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

mvn deploy:deploy-file -DgroupId=com.atlassian.devrel -DartifactId=doclava-theme -Dversion=0.16 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]

com.atlassian.devrel:doclava-theme:jar:0.16

from the specified remote repositories:

central (http://repo1.maven.org/maven2),</strong<>>

atlassian-contrib (https://m2proxy.atlassian.com/contrib),</strong<>>

atlassian-proxy (https://m2proxy.atlassian.com/repository/public)</strong<>>

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

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

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

[INFO] Total time: 4 seconds

[INFO] Finished at: Wed Jul 03 09:53:41 KST 2013

[INFO] Final Memory: 32M/646M

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

I download doclava-theme-0.16.jar file. And following command

[tasha@: confluence-5.2-m19-s...

1 answer

1 accepted

0 vote

Hi SuHyun Jeon,

The command that you're using install the jar file into the default maven repository.

mvn install:install-file -DgroupId=com.atlassian.devrel -DartifactId=doclava-theme -Dversion=0.16 -Dpackaging=jar -Dfile=/path/to/file

The build.sh script that you're using does refer to another repository which is bundle together with the source code. You can see this from the location that you're trying to install for the mail jar.

.\maven\bin\mvn install:install-file -DgroupId=javax.mail -DartifactId=mail -Dversion=1.x.x -Dpackaging=jar -Dfile=Path/To/mail.jar

In this case, you're installing it to the to this location .\maven\bin\mvn install . " .\" means current location which is inside the extrated source code folder.


You can try to install the jar to the maven repository bundled with the source code. I believe this should solve this issue

.\maven\bin\mvn install:install-file -DgroupId=com.atlassian.devrel -DartifactId=doclava-theme -Dversion=0.16 -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 "0.16" if the folder does not exist.

Kind Regards,
Jing Hwa

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
Posted Jul 10, 2018 in Confluence

We want to see the templates you've created in Confluence!

Hi Community, Jessica here from the Confluence Product Marketing team!  July’s community challenge is all about sharing pictures  — and as an extension of our first post on what ...

780 views 23 12
Join discussion

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