Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Building JIRA 5.1 from Source - Build Error

Michael Saupe July 10, 2012

Hello,

I followed the isntructions on the website https://confluence.atlassian.com/display/JIRA/Building+JIRA+from+Source, which means I successfully installed the restricted third party (.jar) libraries to my local Maven repository before starting the JIRA 5.1 build process (using the build.bat in my windows environment).

Nevertheless I get the following build error when building the module "JIRA 4 Adapter":

[INFO] Building JIRA 4 Adapter
[INFO]    task-segment: [clean, install]
[INFO] ------------------------------------------------------------------------
[INFO] [clean:clean]
[INFO] [resources:resources]
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory D:\_atlassian-jira-5.1-source\jira4-a
dapter\src\main\resources
Downloading: https://m2proxy.atlassian.com/repository/public/jta/jta/1.0.1/jta-1
.0.1.pom
[INFO] Unable to find resource 'jta:jta:pom:1.0.1' in repository atlassian-proxy
 (https://m2proxy.atlassian.com/repository/public)
Downloading: https://m2proxy.atlassian.com/contrib/jta/jta/1.0.1/jta-1.0.1.pom
[INFO] Unable to find resource 'jta:jta:pom:1.0.1' in repository atlassian-contr
ib (https://m2proxy.atlassian.com/contrib)
Downloading: http://repo1.maven.org/maven2/jta/jta/1.0.1/jta-1.0.1.pom
[INFO] Unable to find resource 'jta:jta:pom:1.0.1' in repository central (http:/
/repo1.maven.org/maven2)
Downloading: https://m2proxy.atlassian.com/repository/public/jndi/jndi/1.2.1/jnd
i-1.2.1.pom
[INFO] Unable to find resource 'jndi:jndi:pom:1.2.1' in repository atlassian-pro
xy (https://m2proxy.atlassian.com/repository/public)
Downloading: https://m2proxy.atlassian.com/contrib/jndi/jndi/1.2.1/jndi-1.2.1.po
m
[INFO] Unable to find resource 'jndi:jndi:pom:1.2.1' in repository atlassian-con
trib (https://m2proxy.atlassian.com/contrib)
Downloading: http://repo1.maven.org/maven2/jndi/jndi/1.2.1/jndi-1.2.1.pom
[INFO] Unable to find resource 'jndi:jndi:pom:1.2.1' in repository central (http
://repo1.maven.org/maven2)
Downloading: https://m2proxy.atlassian.com/repository/public/jta/jta/1.0.1/jta-1
.0.1.jar
Downloading: https://m2proxy.atlassian.com/repository/public/jndi/jndi/1.2.1/jnd
i-1.2.1.jar
[INFO] Unable to find resource 'jta:jta:jar:1.0.1' in repository atlassian-proxy
 (https://m2proxy.atlassian.com/repository/public)
Downloading: https://m2proxy.atlassian.com/contrib/jta/jta/1.0.1/jta-1.0.1.jar
[INFO] Unable to find resource 'jndi:jndi:jar:1.2.1' in repository atlassian-pro
xy (https://m2proxy.atlassian.com/repository/public)
Downloading: https://m2proxy.atlassian.com/contrib/jndi/jndi/1.2.1/jndi-1.2.1.ja
r
[INFO] Unable to find resource 'jta:jta:jar:1.0.1' in repository atlassian-contr
ib (https://m2proxy.atlassian.com/contrib)
Downloading: http://repo1.maven.org/maven2/jta/jta/1.0.1/jta-1.0.1.jar
[INFO] Unable to find resource 'jndi:jndi:jar:1.2.1' in repository atlassian-con
trib (https://m2proxy.atlassian.com/contrib)
Downloading: http://repo1.maven.org/maven2/jndi/jndi/1.2.1/jndi-1.2.1.jar
[INFO] Unable to find resource 'jta:jta:jar:1.0.1' in repository central (http:/
/repo1.maven.org/maven2)
[INFO] Unable to find resource 'jndi:jndi:jar:1.2.1' in repository central (http
://repo1.maven.org/maven2)
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Failed to resolve artifact.

Missing:
----------
1) jta:jta:jar:1.0.1

  Try downloading the file manually from the project website.

  Then, install it using the command:
      mvn install:install-file -DgroupId=jta -DartifactId=jta -Dversion=1.0.1 -D
packaging=jar -Dfile=/path/to/file

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

      mvn deploy:deploy-file -DgroupId=jta -DartifactId=jta -Dversion=1.0.1 -Dpa
ckaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]

  Path to dependency:
        1) com.atlassian.labs:jira4-adapter:jar:0.6.1
        2) com.atlassian.jira:atlassian-jira:jar:4.3.4
        3) jta:jta:jar:1.0.1

2) jndi:jndi:jar:1.2.1

  Try downloading the file manually from the project website.

  Then, install it using the command:
      mvn install:install-file -DgroupId=jndi -DartifactId=jndi -Dversion=1.2.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=jndi -DartifactId=jndi -Dversion=1.2.1 -D
packaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]

  Path to dependency:
        1) com.atlassian.labs:jira4-adapter:jar:0.6.1
        2) com.atlassian.jira:atlassian-jira:jar:4.3.4
        3) jndi:jndi:jar:1.2.1

----------
2 required artifacts are missing.

for artifact:
  com.atlassian.labs:jira4-adapter:jar:0.6.1

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)

What do I need to configure?
It seems that my local Maven repository is not recognized during the build process.

Cheers,
Michael

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

2 votes
Answer accepted
Julien Hoarau
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.
July 10, 2012

JIRA 5.1 build scripts override maven localRepository.

call mvn2.bat clean install -f "atlassian-secure-random/pom.xml" -Dmaven.test.skip -s %SETTINGSFILE% -Dmaven.repo.local=%cd%\%LOCALREPO% %*

You have two choices:

  • Change the maven.repo.local property in the build scripts (build.bat or build.sh):
    -Dmaven.repo.local=YOUR_REPO_PATH
  • Or copy the required artifact in the repository used by default by the build script.
Michael Saupe July 10, 2012

Hi Julien,

thanks for your post, but as mentioned in my original post I already installed successfully the third party jars in my local maven repository. I did this since I followed the Atlassian instructions you mentioned...

Nevertheless I get this error and it seems to me that my local maven repository is not recognized during this build process otherwise it should recognize that these jars are party of my local repository.

Cheers,
Michael

Michael Saupe July 10, 2012

Hi Julien,

thanks for your post, but as mentioned in my original post I already installed successfully the third party jars in my local maven repository. I did this since I followed the Atlassian instructions you mentioned...

Nevertheless I get this error and it seems to me that my local maven repository is not recognized during this build process otherwise it should recognize that these jars are party of my local repository.

Cheers,
Michael

Julien Hoarau
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.
July 10, 2012

Oh sorry... I miss the useful info in your post. I've edited my answer, it should be better now =)

Michael Saupe July 12, 2012

The answer from the Atlassian support is similar to one of your choices:

There is already a bug https://jira.atlassian.com/browse/JRA-28565 but after looking through at the build.bat file, it appears JIRA is looking through at the localrepo directory in the source distribution. The workaround to this issue at the moment is to do the following:

# Copy the {{.m2/repository/jndi}} and {{.m2/repository/jta}} folders # Place them in to the {{$SOURCEFOLDER/localrepo}} directory. If it complains that it already exist, over ride the contents.
# Rebuild again

Cheers,
Michael

Alok Singh March 5, 2015

Thanks Michael!

TAGS
AUG Leaders

Atlassian Community Events