Reputation: 211
I have a strange situation: I'm using the WIFI network provided by the hotel I'm staying at, and I have to authenticate with a user and a password in a web page (if I go to google.com without authentication it redirects me to the login page).
I can browse the web with no problems, as you can see. But Maven is giving me this messages :
[WARNING] The POM for javax.inject:javax.inject:jar:1 is invalid, transitive dependencies
(if any) will not be available: 1 problem was encountered while building the effective model
[FATAL] Non-parseable POM /home/user/.m2/repository/javax/inject/javax.inject/1/javax.inject-1.pom: entity reference name can not contain character =' (position: TEXT seen ...pitality.swisscom.com/index.php/login/pdalogin?pda=1&incompatible=... @4:134) @ line 4, column 134
Looking at the fragment of
pitality.swisscom.com/index.php/login/pdalogin?pda=1&incompatible=
it seems that Maven is not using the same authenticated connection.
Do you know of any solution to this ?
Many thanks!
EDIT: the contents of a pom file that's not found by maven are these
<html>
<head>
<noscript>
<META HTTP-EQUIV="refresh" content="5;URL=https://index06.hospitality.swisscom.com/index.php/login/pdalogin?pda=1&incompatible=1&NASID=mi-76-134&LgnURL=https%3A%2F%2Fclblgn.sceur.ch%3A8090%2Fgoform%2FHtmlLoginRequest&NASIP=clblgn.sceur.ch&CallerID=00-22-FB-4F-D9-F6&CustIP=192.168.48.170&VLAN=&Location=Hotspot&Port=8090">
</noscript>
<script type="text/javascript">
function setCookieAndReload()
{
document.cookie = "human=1" + ";path=/;domain=swisscom.com";
window.location = "https://index06.hospitality.swisscom.com/login?NASID=mi-76-134&LgnURL=https%3A%2F%2Fclblgn.sceur.ch%3A8090%2Fgoform%2FHtmlLoginRequest&NASIP=clblgn.sceur.ch&CallerID=00-22-FB-4F-D9-F6&CustIP=192.168.48.170&VLAN=&Location=Hotspot&Port=8090&tested=1";
return;
}
</script>
<script type="text/javascript" src="https://index06.hospitality.swisscom.com/login?NASID=mi-76-134&LgnURL=https%3A%2F%2Fclblgn.sceur.ch%3A8090%2Fgoform%2FHtmlLoginRequest&NASIP=clblgn.sceur.ch&CallerID=00-22-FB-4F-D9-F6&CustIP=192.168.48.170&VLAN=&Location=Hotspot&Port=8090&getjs=1"></script>
</head>
<body>
<p>
Checking browser compatibility.<br>
You will be redirected shortly or click <a href="https://index06.hospitality.swisscom.com/index.php/login/pdalogin?pda=1&incompatible=1&NASID=mi-76-134&LgnURL=https%3A%2F%2Fclblgn.sceur.ch%3A8090%2Fgoform%2FHtmlLoginRequest&NASIP=clblgn.sceur.ch&CallerID=00-22-FB-4F-D9-F6&CustIP=192.168.48.170&VLAN=&Location=Hotspot&Port=8090">here</a>.
</p>
</body>
<!--
<?xml version='1.0' encoding='UTF-8'?>
<WISPAccessGatewayParam xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:noNamespaceSchemaLocation='WISPAccessGatewayParam.xsd'>
<Redirect>
<MessageType>100</MessageType>
<ResponseCode>0</ResponseCode>
<AccessProcedure>1.0</AccessProcedure>
<LocationName>Hotspot</LocationName>
<AccessLocation>BackEnd Remote Login</AccessLocation>
<LoginURL>https://clblgn.sceur.ch:8090/goform/HtmliPassLoginRequest</LoginURL>
<AbortLoginURL>http://clblgn.sceur.ch:80/goform/HtmliPassLogout</AbortLoginURL>
</Redirect>
</WISPAccessGatewayParam>
-->
</html>
Upvotes: 1
Views: 4166
Reputation: 52665
Looks like your hotel's internet access is restrictive, allowing access only through authenticated sessions. While you work with the ISP to fix it (or try out the workarounds suggested), you could try to build it elsewhere (perhaps your office), where this is not a problem and set up maven to build offline (mvn dependency:go-offline
). Once this is done, you would not require maven to connect to internet, unless you update dependency versions.
Upvotes: 0
Reputation: 1527
1: did you try to use Maven before you manually authenticated? If yes, then you probably have corrupted files in your local repository and Maven isn't smart enough to replace them. I'd suggest a first step of deleting the local repository (or moving it someplace else), and trying to rebuild after you've manually authenticated.
2: do you have a VPN and a machine on your corporate network where you can install software? If yes, then it might be worthwhile to set up a repository server (Nexus is easy to set up and comes in an open-source version) on that machine. Hotspots generally pass VPN traffic unencumbered.
3: are you comfortable setting up an SSH tunnel? If yes, then you could use machine like Amazon EC2 to host a Nexus repository, and use SSH to runnel localhost:8080 to that host. This will also require changes to your settings.xml.
4: do you know exactly what the hotel's hotspot is doing to your HTTP requests? It's really unlikely that they're using a proxy that modifies the request/response, but if they are and you know what they're doing, Maven allows you to specify HTTP headers in settings.xml. See http://maven.apache.org/guides/mini/guide-http-settings.html for more information.
Personally, I think that #1 will solve your problem. Just make sure that you manually authenticate before doing builds (and make sure that you re-authenticate on a regular basis).
Upvotes: 2