Cannot build Bitbucket from source code

I am having issues following this guide:
https://developer.atlassian.com/server/bitbucket/how-tos/building-bitbucket-server-from-source-code/

Some of the file and folder names are wrong but I managed to change the commands to match. After running ./build.sh from the root directory it’s trying to install packages from Index of maven-external/ but cannot find jar:12.2.0.1-atlassian-hosted. The docs say to use this version when installing the JDBC driver.

Full error:
[ERROR] Failed to execute goal on project bitbucket-dao-impl: Could not resolve dependencies for project com.atlassian.bitbucket.server:bitbucket-dao-impl:jar:7.8.0: Could not find artifact com.oracle.jdbc:ojdbc8:jar:12.2.0.1-atlassian-hosted in atlassian-proxy ([https://packages.atlassian.com/maven/repository/public\](Index of maven-external/))

I am trying to build 7.8.0 from the source so I can make some small changes to the code. I would expect this to work on every version though. We’ve also had issues in the past building from the source code. Are there any other docs or FAQ pages to help?

To update back here as well - I think the issue is that the install-file command is slightly off compared to the dependencies that are in Bitbucket’s pom.xml files, where the groupID and version in the install command doesn’t match what’s expected.

Try running the following instead and see if you get any further:

./mvn354.sh install:install-file -DgroupId=com.oracle.jdbc -DartifactId=ojdbc8 -Dversion=12.2.0.1-atlassian-hosted -Dpackaging=jar -Dfile=ojdbc8.jar -Dmaven.repo.local="`pwd`/localrepo"

I have a PR in to get the command in that document updated, but let me know if you get any further after installing the JAR under that different groupID and version.

Thanks,

  • Evan