dev@glassfish.java.net

Re: build issue

From: Romain Grecourt <romain.grecourt_at_oracle.com>
Date: Tue, 13 Mar 2012 19:14:57 +0100

Hi Hong,

Actually I saw the exact same issue on my Mac recently.
I have not looked closely at this yet.

 From what I see, no version is defined for maven-jaxb2-plugin in
"appserver/appclient/client/acc-config/pom.xml".

The message from maven output says "or no valid version could be found"
so maybe this is related to maven-metadata.
Try to remove the maven-medata.xml in your local repository, it could
help.
(~/.m2/repository/org/jvnet/jaxb2/maven2/maven-jaxb2-plugin/maven-metadata.xml)

Thanks,
Romain

On 03/13/2012 06:49 PM, hong.hz.zhang_at_oracle.com wrote:
> Yes, I am using this internal mirror now. But I am still seeing issue
> (a different one) when building trunk:
>
> INFO] Building in
> /home/hzhang/files/workspaces/glassfish/all/main/appserver/appclient/client
> [INFO]
> ------------------------------------------------------------------------
> [INFO] [bundle:manifest {execution: bundle-manifest}]
> [WARNING] Ignoring project type pom - supportedProjectTypes =
> [hk2-jar, bundle]
> [INFO] [site:attach-descriptor {execution: default-attach-descriptor}]
> [INFO] [source:jar-no-fork {execution: attach-sources}]
> [INFO] [install:install {execution: default-install}]
> [INFO] Installing
> /home/hzhang/files/workspaces/glassfish/all/main/appserver/appclient/client/pom.xml
> to
> /home/hzhang/.m2/repository/org/glassfish/appclient/client/4.0-SNAPSHOT/client-4.0-SNAPSHOT.pom
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Building ACC Config Classes (JAXB)
> [INFO] task-segment: [clean, install]
> [INFO]
> ------------------------------------------------------------------------
> [INFO]
> ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO]
> ------------------------------------------------------------------------
> [INFO] The plugin 'org.jvnet.jaxb2.maven2:maven-jaxb2-plugin' does not
> exist or no valid version could be found
>
>
> On 3/12/2012 11:32 PM, Sahoo wrote:
>> If you are outside Oracle intranet, then AFAIK you don't need any
>> mirror settings. If you are inside Oracle intranet, then use this
>> mirror setting which will redirect all maven traffic to internal
>> nexus server:
>>
>> <mirror>
>> <id>internal-glassfish-nexus</id>
>> <url>http://gf-maven.us.oracle.com/nexus/content/groups/internal-gf-nexus/</url>
>> <mirrorOf>*</mirrorOf>
>> </mirror>
>>
>> This was how I was able to build when I faced issues as you did. I
>> should also mention that I had to run with -U option once to refresh
>> some local maven metadata about central repository.
>>
>> Sahoo
>>
>> On Tuesday 13 March 2012 07:34 AM, hong.hz.zhang_at_oracle.com wrote:
>>> I tried to use the maven-central according to the workaround
>>> section, did not seem to work for me either.
>>> |
>>> <mirror>|
>>> |||<id>maven-central</id>|
>>> |||<url>http:||//repo1.maven.org/maven2/</url>|
>>> |||<mirrorOf>*,!eclipselink.repository,!netbeans.repository</mirrorOf>|
>>> |</mirror>
>>>
>>> |
>>> I invoked the maven with and without the -Pgf-repo, did not seem to
>>> make a difference.
>>>
>>>
>>> On 3/12/2012 9:50 PM, Sahoo wrote:
>>>> Hong,
>>>>
>>>> Since http://maven.glassfish.org/content/groups/glassfish has been
>>>> decommissioned, you can't use it as a mirror anymore. Just remove
>>>> the entire <mirror/> element.
>>>>
>>>> Sahoo
>>>> On Tuesday 13 March 2012 06:49 AM, hong.hz.zhang_at_oracle.com wrote:
>>>>> What I should change the reference of maven.glassfish.org to? This
>>>>> is what I have in my settings.xml now:
>>>>>
>>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>> <settings>
>>>>> <!-- divert the traffic to the external glassfish nexus to
>>>>> internal nexus -->
>>>>> <mirrors>
>>>>> <mirror>
>>>>> <id>internal-glassfish-nexus</id>
>>>>> <url>http://maven.glassfish.org/content/groups/glassfish</url>
>>>>> <mirrorOf>*</mirrorOf>
>>>>> </mirror>
>>>>> </mirrors>
>>>>> </settings>
>>>>>
>>>>> I had no problem building the trunk until recently, is there
>>>>> something just changed recently?
>>>>>
>>>>> I tried to do offline build mvn -o clean build, but it seems this
>>>>> is not in my local repository either:
>>>>>
>>>>> Project ID: org.glassfish.hk2:hk2-maven-plugin
>>>>>
>>>>> Reason: POM 'org.glassfish.hk2:hk2-maven-plugin' not found in
>>>>> repository: System is offline.
>>>>>
>>>>> org.glassfish.hk2:hk2-maven-plugin:pom:1.6.35
>>>>>
>>>>> for project org.glassfish.hk2:hk2-maven-plugin
>>>>>
>>>>>
>>>>> How could I work around it?
>>>>>
>>>>> Thanks,
>>>>>
>>>>> - Hong
>>>>>
>>>>>
>>>>> On 3/12/2012 7:34 PM, Sahoo wrote:
>>>>>> It basically means there is some reference to non-existent nexus
>>>>>> server in maven settings.xml, right? Instead of removing such
>>>>>> stale reference, why should one add a mirror it instead?
>>>>>>
>>>>>> Sahoo
>>>>>>
>>>>>> On Tuesday 13 March 2012 03:20 AM, Jane Young wrote:
>>>>>>> Hi Hong,
>>>>>>>
>>>>>>> Looks like your workspace is still referencing maven.glassfish.org.
>>>>>>> See workaround here:
>>>>>>> https://wikis.oracle.com/display/GlassFish/FullBuildInstructions#FullBuildInstructions-Unabletobuildbecausemaven.glassfish.orgisoffline
>>>>>>>
>>>>>>> HTH,
>>>>>>> Jane
>>>>>>>
>>>>>>> On 3/12/12 2:00 PM, hong.hz.zhang_at_oracle.com wrote:
>>>>>>>> Any one seeing this? I have the latest workspace:
>>>>>>>>
>>>>>>>> Downloading:
>>>>>>>> http://maven.glassfish.org/content/groups/glassfish/org/glassfish/hk2/hk2-maven-plugin/1.6.35/hk2-maven-plugin-1.6.35.pom
>>>>>>>> [WARNING] Unable to get resource
>>>>>>>> 'org.glassfish.hk2:hk2-maven-plugin:pom:1.6.35' from repository
>>>>>>>> central (http://repo1.maven.org/maven2): Error transferring
>>>>>>>> file: Connection timed out
>>>>>>>> Downloading:
>>>>>>>> http://maven.glassfish.org/content/groups/glassfish/org/glassfish/hk2/hk2-maven-plugin/1.6.35/hk2-maven-plugin-1.6.35.pom
>>>>>>>> [WARNING] Unable to get resource
>>>>>>>> 'org.glassfish.hk2:hk2-maven-plugin:pom:1.6.35' from repository
>>>>>>>> central (http://repo1.maven.org/maven2): Error transferring
>>>>>>>> file: Connection timed out
>>>>>>>> [INFO]
>>>>>>>> ------------------------------------------------------------------------
>>>>>>>>
>>>>>>>> [ERROR] BUILD ERROR
>>>>>>>> [INFO]
>>>>>>>> ------------------------------------------------------------------------
>>>>>>>>
>>>>>>>> [INFO] Error building POM (may not be this project's POM).
>>>>>>>>
>>>>>>>>
>>>>>>>> Project ID: org.glassfish.hk2:hk2-maven-plugin
>>>>>>>>
>>>>>>>> Reason: POM 'org.glassfish.hk2:hk2-maven-plugin' not found in
>>>>>>>> repository: Unable to download the artifact from any repository
>>>>>>>>
>>>>>>>> org.glassfish.hk2:hk2-maven-plugin:pom:1.6.35
>>>>>>>>
>>>>>>>> from the specified remote repositories:
>>>>>>>> internal-glassfish-nexus
>>>>>>>> (http://maven.glassfish.org/content/groups/glassfish)
>>>>>>>>
>>>>>>>> for project org.glassfish.hk2:hk2-maven-plugin
>>>>>>>
>>>>>>
>>>>
>>