dev@glassfish.java.net

Having trouble building Glassfish 3.1.2 from source

From: Bergquist, Brett <BBergquist_at_canoga.com>
Date: Sat, 11 Aug 2012 17:19:14 -0700

I am trying to build Glassfish 3.1.2 and am having a problem. I have Maven 2.2.1 installed:

MacbookPro ~/Development/glassfish/3.1.2 $ mvn --version
Apache Maven 2.2.1 (r801777; 2009-08-06 15:16:01-0400)
Java version: 1.6.0_33
Java home: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
Default locale: en_US, platform encoding: MacRoman
OS name: "mac os x" version: "10.6.8" arch: "x86_64" Family: "mac"
MacbookPro ~/Development/glassfish/3.1.2 $
MacbookPro ~/Development/glassfish/3.1.2 $


Here is my settings.xml:

  <mirrors>
    <!-- mirror
     | Specifies a repository mirror site to use instead of a given repository. The repository that
     | this mirror serves has an ID that matches the mirrorOf element of this mirror. IDs are used
     | for inheritance and direct lookup purposes, and must be unique across the set of mirrors.
     |
    <mirror>
      <id>mirrorId</id>
      <mirrorOf>repositoryId</mirrorOf>
      <name>Human Readable Name for this Mirror.</name>
      <url>http://my.repository.com/repo/path</url<http://my.repository.com/repo/path%3c/url>>
    </mirror>
     -->
    <mirror>
      <id>maven-central</id>
      <url>http://repo1.maven.org/maven2/</url<http://repo1.maven.org/maven2/%3c/url>>
      <mirrorOf>*,!eclipselink.repository</mirrorOf>
    </mirror>
  </mirrors>

Here is the last of the output when running "mvn install"

[INFO] ------------------------------------------------------------------------
[INFO] Building Deployment Object Library
[INFO] task-segment: [install]
[INFO] ------------------------------------------------------------------------
Downloading: http://repo1.maven.org/maven2//org/eclipse/persistence/javax.persistence/2.0.4.v201112200901/javax.persistence-2.0.4.v201112200901.pom<http://repo1.maven.org/maven2/org/eclipse/persistence/javax.persistence/2.0.4.v201112200901/javax.persistence-2.0.4.v201112200901.pom>
[INFO] Unable to find resource 'org.eclipse.persistence:javax.persistence:pom:2.0.4.v201112200901' in repository glassfish-repo-archive (http://maven.glassfish.org/content/groups/glassfish)
Downloading: http://repo1.maven.org/maven2//org/eclipse/persistence/javax.persistence/2.0.4.v201112200901/javax.persistence-2.0.4.v201112200901.pom<http://repo1.maven.org/maven2/org/eclipse/persistence/javax.persistence/2.0.4.v201112200901/javax.persistence-2.0.4.v201112200901.pom>
[INFO] Unable to find resource 'org.eclipse.persistence:javax.persistence:pom:2.0.4.v201112200901' in repository central (http://repo1.maven.org/maven2)
Downloading: http://repo1.maven.org/maven2//org/eclipse/persistence/javax.persistence/2.0.4.v201112200901/javax.persistence-2.0.4.v201112200901.jar<http://repo1.maven.org/maven2/org/eclipse/persistence/javax.persistence/2.0.4.v201112200901/javax.persistence-2.0.4.v201112200901.jar>
[INFO] Unable to find resource 'org.eclipse.persistence:javax.persistence:jar:2.0.4.v201112200901' in repository glassfish-repo-archive (http://maven.glassfish.org/content/groups/glassfish)
Downloading: http://repo1.maven.org/maven2//org/eclipse/persistence/javax.persistence/2.0.4.v201112200901/javax.persistence-2.0.4.v201112200901.jar<http://repo1.maven.org/maven2/org/eclipse/persistence/javax.persistence/2.0.4.v201112200901/javax.persistence-2.0.4.v201112200901.jar>
[INFO] Unable to find resource 'org.eclipse.persistence:javax.persistence:jar:2.0.4.v201112200901' in repository central (http://repo1.maven.org/maven2)
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Failed to resolve artifact.

Missing:
----------
1) org.eclipse.persistence:javax.persistence:jar:2.0.4.v201112200901

  Try downloading the file manually from the project website.

  Then, install it using the command:
      mvn install:install-file -DgroupId=org.eclipse.persistence -DartifactId=javax.persistence -Dversion=2.0.4.v201112200901 -Dpackaging=jar -Dfile=/path/to/file

  Alternatively, if you host your own repository you can deploy the file there:
      mvn deploy:deploy-file -DgroupId=org.eclipse.persistence -DartifactId=javax.persistence -Dversion=2.0.4.v201112200901 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]

  Path to dependency:
            1) org.glassfish.main.deployment:dol:hk2-jar:3.1.2
            2) org.eclipse.persistence:javax.persistence:jar:2.0.4.v201112200901

----------
1 required artifact is missing.

for artifact:
  org.glassfish.main.deployment:dol:hk2-jar:3.1.2

from the specified remote repositories:
  maven-central (http://repo1.maven.org/maven2/)



[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 50 seconds
[INFO] Finished at: Sat Aug 11 20:13:13 EDT 2012
[INFO] Final Memory: 143M/269M
[INFO] ------------------------------------------------------------------------
MacbookPro ~/Development/glassfish/3.1.2 $

Any help will be greatly appreciated. I also tried with Glassfish 3.1.1 and ran into similar problems so I figured I would go with the latest release and try again.