dev@glassfish.java.net

RE: building Glassfish 3.1.2 from source using maven

From: peter belbin <pbelbin_at_gmail.com>
Date: Mon, 19 Mar 2012 00:54:18 -0500

Ok, did that, and got the following:

 

[INFO] Building Embedded GlassFish Shell

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

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

[INFO] [clean:clean {execution: default-clean}]

[INFO] Deleting file set:
/opt/gf312src/3.1.2/extras/embedded/shell/glassfish-embedded-shell/target
(included: [**], excluded: [])

[INFO] [enforcer:enforce {execution: enforce-maven}]

[INFO] [enforcer:enforce {execution: enforce-versions}]

[INFO] [osgiversion:compute-osgi-version {execution: compute-osgi-version}]

[INFO] [gf:echo {execution: echo}]

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

[INFO] Building in
/opt/gf312src/3.1.2/extras/embedded/shell/glassfish-embedded-shell

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

[INFO] [dependency:build-classpath {execution: generate-classpath-file}]

[INFO] Wrote classpath file
'/opt/gf312src/3.1.2/extras/embedded/shell/glassfish-embedded-shell/target/t
mp/classpath.txt'.

[INFO] [resources:resources {execution: default-resources}]

[INFO] Using 'UTF-8' encoding to copy filtered resources.

[INFO] skip non existing resourceDirectory
/opt/gf312src/3.1.2/extras/embedded/shell/glassfish-embedded-shell/src/main/
resources

[INFO] [compiler:compile {execution: default-compile}]

[INFO] No sources to compile

[INFO] [bundle:manifest {execution: bundle-manifest}]

[WARNING] Ignoring project type jar - supportedProjectTypes = [hk2-jar,
bundle]

[INFO] [resources:testResources {execution: default-testResources}]

[INFO] Using 'UTF-8' encoding to copy filtered resources.

[INFO] skip non existing resourceDirectory
/opt/gf312src/3.1.2/extras/embedded/shell/glassfish-embedded-shell/src/test/
resources

[INFO] [compiler:testCompile {execution: default-testCompile}]

[INFO] No sources to compile

[INFO] [surefire:test {execution: default-test}]

[INFO] No tests to run.

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

[ERROR] BUILD ERROR

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

[INFO] Failed to configure plugin parameters for:
org.apache.maven.plugins:maven-jar-plugin:2.2

 

 

 

Cause: Cannot find setter nor field in
org.apache.maven.archiver.ManifestConfiguration for 'classpathLayoutType'

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

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

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

[INFO] Total time: 3 minutes 58 seconds

[INFO] Finished at: Mon Mar 19 00:52:37 CDT 2012

[INFO] Final Memory: 246M/494M

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

root_at_sol11:/opt/gf312src/3.1.2#

 

please advise.

 

Regards,

Peter

 

 

 

 

 

 

 

From: Jane Young [mailto:jane.young_at_oracle.com]
Sent: Monday, March 19, 2012 12:46 AM
To: peter belbin
Cc: dev_at_glassfish.java.net; 'Romain Grecourt'
Subject: Re: building Glassfish 3.1.2 from source using maven

 

Hi Peter,

Can you try adding MAVEN_OPTS="-Xmx512m -Xms256m -XX:MaxPermSize=512m" and
rebuild with the command "mvn -U clean install"?

Thanks,
Jane


On 3/18/12 10:39 PM, peter belbin wrote:

Ok, that seems to have improved things a bit. Thank you!

 

But, now, I'm getting, on mvn clean install, the following:

 

[INFO] Building in /opt/gf312src/3.1.2/persistence/cmp/support-ejb

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

[INFO] [antlr:generate {execution: default}]

[INFO] Using Antlr grammar:
/opt/gf312src/3.1.2/persistence/cmp/support-ejb/src/main/antlr/EJBQL.g

ANTLR Parser Generator Version 2.7.6 (2005-12-22) 1989-2005

 

[INFO] Using Antlr grammar:
/opt/gf312src/3.1.2/persistence/cmp/support-ejb/src/main/antlr/JDOQLCodeGene
ration.g

ANTLR Parser Generator Version 2.7.6 (2005-12-22) 1989-2005

 

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

[ERROR] BUILD ERROR

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

[INFO] error perforing antlt.Tool#main

 

Embedded error: PermGen space

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

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

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

[INFO] Total time: 3 minutes 38 seconds

[INFO] Finished at: Mon Mar 19 00:28:31 CDT 2012

[INFO] Final Memory: 211M/742M

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

root_at_sol11:/opt/gf312src/3.1.2# <mailto:root_at_sol11:/opt/gf312src/3.1.2>

 

 

immediately after this, I tried just: mvn install

 

and got this:

 

[INFO] Building Embedded GlassFish Shell

[INFO] task-segment: [install]

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

[INFO] [enforcer:enforce {execution: enforce-maven}]

[INFO] [enforcer:enforce {execution: enforce-versions}]

[INFO] [osgiversion:compute-osgi-version {execution: compute-osgi-version}]

[INFO] [gf:echo {execution: echo}]

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

[INFO] Building in
/opt/gf312src/3.1.2/extras/embedded/shell/glassfish-embedded-shell

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

[INFO] [dependency:build-classpath {execution: generate-classpath-file}]

[INFO] Skipped writing classpath file
'/opt/gf312src/3.1.2/extras/embedded/shell/glassfish-embedded-shell/target/t
mp/classpath.txt'. No changes found.

[INFO] [resources:resources {execution: default-resources}]

[INFO] Using 'UTF-8' encoding to copy filtered resources.

[INFO] skip non existing resourceDirectory
/opt/gf312src/3.1.2/extras/embedded/shell/glassfish-embedded-shell/src/main/
resources

[INFO] [compiler:compile {execution: default-compile}]

[INFO] No sources to compile

[INFO] [bundle:manifest {execution: bundle-manifest}]

[WARNING] Ignoring project type jar - supportedProjectTypes = [hk2-jar,
bundle]

[INFO] [resources:testResources {execution: default-testResources}]

[INFO] Using 'UTF-8' encoding to copy filtered resources.

[INFO] skip non existing resourceDirectory
/opt/gf312src/3.1.2/extras/embedded/shell/glassfish-embedded-shell/src/test/
resources

[INFO] [compiler:testCompile {execution: default-testCompile}]

[INFO] No sources to compile

[INFO] [surefire:test {execution: default-test}]

[INFO] No tests to run.

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

[ERROR] BUILD ERROR

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

[INFO] Failed to configure plugin parameters for:
org.apache.maven.plugins:maven-jar-plugin:2.2

 

 

 

Cause: Cannot find setter nor field in
org.apache.maven.archiver.ManifestConfiguration for 'classpathLayoutType'

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

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

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

[INFO] Total time: 2 minutes 10 seconds

[INFO] Finished at: Mon Mar 19 00:36:58 CDT 2012

[INFO] Final Memory: 178M/742M

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

 

 

 

The above is with:

 

MAVEN_OPTS='-Xmx2048m -Xms768m'

 

Please advise.

 

Regards,

Peter.

 

 

 

 

From: Jane Young [mailto:jane.young_at_oracle.com]
Sent: Sunday, March 18, 2012 8:50 PM
To: dev_at_glassfish.java.net
Cc: peter belbin; 'Romain Grecourt'
Subject: Re: building Glassfish 3.1.2 from source using maven

 

Can you change the mirror element to:





<mirror>

    <id>maven-central</id>

    <url>http://repo1.maven.org/maven2/</url>

    <mirrorOf>*,!eclipselink.repository,!netbeans.repository</mirrorOf>

</mirror>


Thanks,
Jane


On 3/18/12 6:26 PM, peter belbin wrote:

I believe I already have that in my setting.xml, which I include here:

 

<settings xmlns= <http://maven.apache.org/SETTINGS/1.1.0>
"http://maven.apache.org/SETTINGS/1.1.0"

  xmlns:xsi= <http://www.w3.org/2001/XMLSchema-instance>
"http://www.w3.org/2001/XMLSchema-instance"

  xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.1.0

                      http://maven.apache.org/xsd/settings-1.1.0.xsd">

  <localRepository/>

  <interactiveMode/>

  <usePluginRegistry/>

  <offline/>

  <pluginGroups/>

  <servers/>

<mirrors>

        <mirror>

                <id>maven-central</id>

                <url>http://repo1.maven.org/maven2/</url>

                <mirrorOf>*,!eclipselink.repository</mirrorOf>

        </mirror>

</mirrors>

  <proxies/>

  <profiles>

<profile>

<id>gf-repo</id>

    <repositories>

        <repository>

                <id>maven2-repository.dev.java.net</id>

                <name>Java.net Repository for Maven</name>

                <url>http://download.java.net/maven/2/</url>

                <layout>default</layout>

 
<releases><enabled>true</enabled><updatePolicy>always</updatePolicy></releas
es>

 
<snapshots><enabled>true</enabled><updatePolicy>always</updatePolicy></snaps
hots>

        </repository>

        <repository>

            <id>eclipselink.repository</id>

            <name>EclipseLink Repo</name>

            <releases>

                <enabled>true</enabled>

<updatePolicy>always</updatePolicy>

            </releases>

            <snapshots>

                <enabled>false</enabled>

            </snapshots>

 
<url>http://download.eclipse.org/rt/eclipselink/maven.repo/</url>

            <layout>default</layout>

        </repository>

        <repository>

            <id>netbeans.repository</id>

            <name>Maven Repo containing NetBeans artifacts</name>

            <releases>

                <enabled>true</enabled>

<updatePolicy>always</updatePolicy>

            </releases>

            <snapshots>

                <enabled>false</enabled>

            </snapshots>

            <url>http://dev.nightlabs.org/maven-repository/repo/</url>

            <layout>default</layout>

        </repository>

    </repositories>

</profile>

  </profiles>

  <activeProfiles>

<activeProfile>gf-repo</activeProfile>

</activeProfiles>

 

 

 

 

From: Jane Young [mailto:jane.young_at_oracle.com]
Sent: Sunday, March 18, 2012 7:38 PM
To: dev_at_glassfish.java.net
Cc: peter belbin; 'Romain Grecourt'
Subject: Re: building Glassfish 3.1.2 from source using maven

 

Looks like it's not finding the netbeans artifacts.
Did you add the following repo in the profile:





 <repository>

            <id>netbeans.repository</id>

            <name>Maven Repo containing NetBeans artifacts</name>

            <releases>

                <enabled>true</enabled>

            </releases>

            <snapshots>

                <enabled>false</enabled>

            </snapshots>

            <url>http://dev.nightlabs.org/maven-repository/repo/
<http://dev.nightlabs.org/maven-repository/repo/%3c/url> </url>

            <layout>default</layout>

        </repository>


Please see:
https://wikis.oracle.com/display/GlassFish/FullBuildInstructions#FullBuildIn
structions-Unabletobuildbecausemaven.glassfish.orgisoffline

Thanks,
Jane


On 3/17/12 4:24 PM, peter belbin wrote:

Ok, so I'm still not there yet, building glassfish 3.1.2.

 

I am using JDK 6u30 with Maven 2.2.1.

 

Please help!

 

Here is what Maven is saying:

 

 

[ERROR] BUILD ERROR

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

[INFO] Failed to resolve artifact.

 

Missing:

----------

1) org.netbeans.api:org-netbeans-modules-schema2beans:jar:RELEASE55

 

  Try downloading the file manually from the project website.

 

  Then, install it using the command:

      mvn install:install-file -DgroupId=org.netbeans.api
-DartifactId=org-netbeans-modules-schema2beans -Dversion=RELEASE55
-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.netbeans.api
-DartifactId=org-netbeans-modules-schema2beans -Dversion=RELEASE55
-Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]

 

  Path to dependency:

                1)
org.glassfish.main.external:schema2beans-repackaged:jar:3.1.2

                2)
org.netbeans.api:org-netbeans-modules-schema2beans:jar:RELEASE55

 

----------

1 required artifact is missing.

 

for artifact:

  org.glassfish.main.external:schema2beans-repackaged:jar:3.1.2

 

from the specified remote repositories:

  maven-central (http://repo1.maven.org/maven2/),

  eclipselink.repository
(http://download.eclipse.org/rt/eclipselink/maven.repo/)