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.
Your build may fail everytime at this point because this is the first
time in the build that purge-local-repository actually re-downloads an
artifact from maven.java.net
>
> 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.
>
> 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.
Try to double check your proxy configuration in both MAVEN_OPTS and your
settings.xml
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
>>>>>
>>>