dev@glassfish.java.net

Re: building error(missing javax.xml.registry:javax.xml.registry-api:jar:1.0.5)

From: Tang Yong <tangyong_at_cn.fujitsu.com>
Date: Wed, 22 May 2013 21:30:55 +0900

Romain,

Excellent reply about 1).

Romain Grecourt wrote:
> On 5/22/13 1:49 PM, Tang Yong wrote:
>> Romain,
>>
>> After I set MAVEN_OPTS with -Dhttps.proxyHost=... -Dhttps.proxyPort,
>> building still failed with the same error.
>>
>> I have done many search about the issue , however, having any answer.
>>
>> I will come back home then re-building to see whether really being
>> relate to proxy, because I have trapped into some puzzle as following:
>>
>> 1) why not happening on other dependencies collecting?
> What happens is maven first downloads all the dependencies (before the
> lifecycle actually starts), then purge-local-repository is executed.
> This plugin looks for some particular coordinates (see nucleus/pom.xml)
> in the dependency tree, if it finds some it will remove them from the
> local repository and then re-download them.
The magic coordinates should be the following:
 <includes>
      <include>javax.ejb</include>
      <include>javax.transaction</include>
      <include>javax.resource</include>
 <include>javax.enterprise.concurrent</include>
       <include>javax.ws.rs</include>
       <include>javax.xml.registry</include>
       <include>javax.websocket</include>
       <include>org.glassfish.jersey</include>
       </includes>

Then, acc module only has a javax.xml.registry dependency which is
specified in the above list. So, I know the reason.

>> 2) http://repo.maven.apache.org/maven2 only has
>> javax.xml.registry:javax.xml.registry-api:jar:1.0.4
> It's living in maven.java.net till it's pushed to maven central.
Always looking forward to publishing into repo and repo1.

>> 3) why first collecting dependencies from
>> http://repo.maven.apache.org/maven2 rather than
>> https://maven.java.net/content/repositories/promoted/ which has been
>> specified in nucleus pom?
> The first collect is done by the default behavior. Them the plugin is
> execute and it will re-download artifact if they are part of the given
> coordinates.
> As I explained above, the "re-download" is what fails.
OK, the issue happened on accessing http://repo.maven.apache.org/maven2,
so, should be related to proxy. I will validate it by building acc from
my home env without proxy.

>
> Try to double check your proxy configuration in both MAVEN_OPTS and your
> settings.xml
All are invalid, I have confirmed many times.

Thanks a lot.
Tang

>
> Thanks,
> Romain
>> Thanks
>> Tang
>>
>> Tang Yong wrote:
>>> Romain,
>>>
>>> You are right, I am behind a proxy.
>>>
>>> This evening, I will try -X, then telling you result.
>>>
>>> Thanks comment.
>>>
>>> Tang
>>>
>>> Romain Grecourt wrote:
>>>> Are you behind a proxy ?
>>>>
>>>> dependency:purge-local-repository seems to not be using the proxy
>>>> configuration from the settings.xml but rather from MAVEN_OPTS
>>>> (-Dhttps.proxyHost=... -Dhttps.proxyPort).
>>>> Also you can try to use -X to get more info.
>>>>
>>>> Thanks,
>>>> Romain
>>>>
>>>> On 5/22/13 10:25 AM, Tang Yong wrote:
>>>>> Noting after executing purge-local-dependencies defined in nucleus pom,
>>>>> dependencies are downloaded from http://repo.maven.apache.org/maven2/
>>>>> instead of https://maven.java.net/content/repositories/promoted/.
>>>>>
>>>>> Thanks
>>>>> Tang
>>>>>
>>>>> Tang Yong wrote:
>>>>>> Romain
>>>>>>
>>>>>> While I am building trunk, the following error happened.
>>>>>>
>>>>>> [ERROR] Failed to execute goal
>>>>>> org.apache.maven.plugins:maven-dependency-plugin:2.6:purge-local-repository
>>>>>> (purge-local-dependencies) on project gf-client-module: Failed to
>>>>>> refresh project dependencies for:
>>>>>> org.glassfish.main.appclient:gf-client-module:glassfish-jar:4.0.1-SNAPSHOT:
>>>>>> required artifacts missing:
>>>>>> [ERROR] javax.xml.registry:javax.xml.registry-api:jar:1.0.5
>>>>>> [ERROR]
>>>>>> [ERROR] for the artifact:
>>>>>> [ERROR]
>>>>>> org.glassfish.main.appclient:gf-client-module:glassfish-jar:4.0.1-SNAPSHOT
>>>>>> [ERROR]
>>>>>> [ERROR] from the specified remote repositories:
>>>>>> [ERROR] jvnet-nexus-promoted
>>>>>> (https://maven.java.net/content/repositories/promoted/, releases=true,
>>>>>> snapshots=false),
>>>>>> [ERROR] central (http://repo.maven.apache.org/maven2, releases=true,
>>>>>> snapshots=false)
>>>>>>
>>>>>> In fact, javax.xml.registry-api:1.0.5 has existed in
>>>>>> https://maven.java.net/content/repositories/promoted/.
>>>>>>
>>>>>> Then, I have done a building for appclient again,
>>>>>>
>>>>>> ...
>>>>>> [INFO] Adding existing MANIFEST to archive. Found under:
>>>>>> D:\20130125\main\appserver\appclient\client\acc-config\target\classes\META-INF\MANIFEST.MF
>>>>>> [INFO] Building jar:
>>>>>> D:\20130125\main\appserver\appclient\client\acc-config\target\acc-config.jar
>>>>>> [INFO]
>>>>>> [INFO] --- maven-install-plugin:2.4:install (default-install) @
>>>>>> acc-config ---
>>>>>> [INFO] Installing
>>>>>> D:\20130125\main\appserver\appclient\client\acc-config\target\acc-config.jar
>>>>>> to
>>>>>> D:\gf\gflocalrepo\org\glassfish\main\appclient\acc-config\4.0.1-SNAPSHOT\acc-config-4.0.1-SNAPSHOT.jar
>>>>>> [INFO] Installing
>>>>>> D:\20130125\main\appserver\appclient\client\acc-config\pom.xml to
>>>>>> D:\gf\gflocalrepo\org\glassfish\main\appclient\acc-config\4.0.1-SNAPSHOT\acc-config-4.0.1-SNAPSHOT.pom
>>>>>> [INFO]
>>>>>> [INFO]
>>>>>> ------------------------------------------------------------------------
>>>>>> [INFO] Building Client OSGi module (including ACC) 4.0.1-SNAPSHOT
>>>>>> [INFO]
>>>>>> ------------------------------------------------------------------------
>>>>>> Downloading:
>>>>>> https://maven.java.net/content/repositories/promoted/javax/xml/registry/javax.xml.registry-api/1.0.5/javax.xml.registry-api-1.0.5.pom
>>>>>> Downloaded:
>>>>>> https://maven.java.net/content/repositories/promoted/javax/xml/registry/javax.xml.registry-api/1.0.5/javax.xml.registry-api-1.0.5.pom
>>>>>> (13 KB at 10.7 KB/sec)
>>>>>> Downloading:
>>>>>> https://maven.java.net/content/repositories/promoted/javax/xml/registry/javax.xml.registry-api/1.0.5/javax.xml.registry-api-1.0.5.jar
>>>>>> Downloaded:
>>>>>> https://maven.java.net/content/repositories/promoted/javax/xml/registry/javax.xml.registry-api/1.0.5/javax.xml.registry-api-1.0.5.jar
>>>>>> (47 KB at 31.5 KB/sec)
>>>>>> [INFO]
>>>>>> [INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @
>>>>>> gf-client-module ---
>>>>>> [INFO]
>>>>>> [INFO] --- maven-enforcer-plugin:1.0-beta-1:enforce (enforce-versions) @
>>>>>> gf-client-module ---
>>>>>> [INFO]
>>>>>> [INFO] --- maven-dependency-plugin:2.6:purge-local-repository
>>>>>> (purge-local-dependencies) @ gf-client-module ---
>>>>>> [INFO] Unable to resolve all dependencies for :
>>>>>> org.glassfish:javax.el:null. Falling back to non-transitive mode for
>>>>>> initial artifact resolution.
>>>>>> Downloading:
>>>>>> http://repo.maven.apache.org/maven2/javax/xml/registry/javax.xml.registry-api/1.0.5/javax.xml.registry-api-1.0.5.pom
>>>>>> Downloading:
>>>>>> http://repo.maven.apache.org/maven2/javax/xml/registry/javax.xml.registry-api/1.0.5/javax.xml.registry-api-1.0.5.jar
>>>>>> [INFO]
>>>>>> ------------------------------------------------------------------------
>>>>>> [INFO] Reactor Summary:
>>>>>> [INFO]
>>>>>> [INFO] App Client Modules ................................ SUCCESS [1.625s]
>>>>>> [INFO] GlassFish App Client Server-side Modules .......... SUCCESS [0.047s]
>>>>>> [INFO] GlassFish AppClient Server-Side Connector ......... SUCCESS [4.594s]
>>>>>> [INFO] GlassFish AppClient Server-Side Core .............. SUCCESS [11.531s]
>>>>>> [INFO] GlassFish AppClient Server-Side Core l10n ......... SUCCESS [1.094s]
>>>>>> [INFO] App Client - client-side modules .................. SUCCESS [0.047s]
>>>>>> [INFO] GlassFish appclient scripts ....................... SUCCESS [0.547s]
>>>>>> [INFO] ACC Config Classes (JAXB) ......................... SUCCESS [1.328s]
>>>>>> [INFO] Client OSGi module (including ACC) ................ FAILURE [8.000s]
>>>>>> [INFO] Client OSGi module (including ACC) Localization ... SKIPPED
>>>>>> [INFO] Client library (including ACC) .................... SKIPPED
>>>>>> [INFO] Client library (including ACC) Localization ....... SKIPPED
>>>>>> [INFO]
>>>>>> ------------------------------------------------------------------------
>>>>>> [INFO] BUILD FAILURE
>>>>>> [INFO]
>>>>>> ------------------------------------------------------------------------
>>>>>> [INFO] Total time: 34.204s
>>>>>> [INFO] Finished at: Wed May 22 16:57:56 JST 2013
>>>>>> [INFO] Final Memory: 50M/124M
>>>>>> [INFO]
>>>>>> ------------------------------------------------------------------------
>>>>>> [ERROR] Failed to execute goal
>>>>>> org.apache.maven.plugins:maven-dependency-plugin:2.6:purge-local-repository
>>>>>> (purge-local-dependencies) on project gf-client-module: Failed to
>>>>>> refresh project dependencies for:
>>>>>> org.glassfish.main.appclient:gf-client-module:glassfish-jar:4.0.1-SNAPSHOT:
>>>>>> [ERROR] javax.xml.registry:javax.xml.registry-api:jar:1.0.5
>>>>>> [ERROR]
>>>>>> [ERROR] for the artifact:
>>>>>> [ERROR]
>>>>>> org.glassfish.main.appclient:gf-client-module:glassfish-jar:4.0.1-SNAPSHOT
>>>>>> [ERROR]
>>>>>> [ERROR] from the specified remote repositories:
>>>>>> [ERROR] jvnet-nexus-promoted
>>>>>> (https://maven.java.net/content/repositories/promoted/, releases=true,
>>>>>> snapshots=false),
>>>>>> [ERROR] central (http://repo.maven.apache.org/maven2, releases=true,
>>>>>> snapshots=false)
>>>>>> ...
>>>>>>
>>>>>> I am curious why maven-dependency-plugin downloads
>>>>>> javax.xml.registry-api:1.0.5 again from
>>>>>> http://repo.maven.apache.org/maven2/.
>>>>>>
>>>>>> Whether having anyone met the same issue?
>>>>>>
>>>>>> Thanks
>>>>>> Tang
>>>>>>
>
>
>

-- 
−−−−−−−−−−−−−−−−−−−−−−
Tang Yong
Senior Engineer
GlassFish Committer (OSGi & OSGi-JavaEE)
OSGi Alliance Supporter
Blog: http://osgizone.typepad.com/tangyong/
Nanjing Fujitsu NanDa Software Tec CO.,LTD
http://www.fujitsu.com/cn/fnst
Tel: +86-25-86630566-8310
Fax: +86-25-83317685              
−−−−−−−−−−−−−−−−−−−−−−