2

following on from this thread

maven in 5 min not working

I have a problem that only sensibly gets the same title, and is very related (I think)

And as I can't put my question into that thread I have to create a new one.

Aslo this is a very long post (how do you include reports for file so as they have scroll bars

C:\mvn --version
Apache Maven 3.0.4 (r1232337; 2012-01-17 09:44:56+0100)
Maven home: C:\Program Files\Maven3\apache-maven-3.0.4
Java version: 1.6.0_23, vendor: Sun Microsystems Inc.
Java home: C:\Program Files\Java\jdk6\jre
Default locale: fr_FR, platform encoding: Cp1252
OS name: "windows xp", version: "5.1", arch: "x86", family: "windows"

And my proxy values are different...

<proxy>   
    <id>APHP</id>   
    <active>true</active>  
    <protocol>http</protocol>   
    <!-- username and password may not be required, my app has a username and password 
    for the local network  
    <username>scibearspace</username>   
    <password>scibearspace</password>
    but not used in this instance -->  
    <host>Local.Server.IP.Address</host> <!-- not the server name a dotted quad value --> 
    <port>8080</port>    <!-- next line not used  -->   
    <nonProxyHosts>localhost|*.google.com</nonProxyHosts>   
</proxy>

I performed the steps as suggested by AKB. but no change. The result of

mvn -X archetype:generate -DgroupId=com.mycompany.app -DartifactId=my-app -DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false > z:\mvnError.txt

are rather long, so'll i'll post the first failure here, and the full output after my signature.

[INFO] Error stacktraces are turned on. [DEBUG] Reading global settings from C:\Program Files\Maven3\apache-maven-3.0.4\conf\settings.xml [DEBUG] Reading user settings from C:\Documents and Settings\dmyers.m2\settings.xml [DEBUG] Using local repository at C:\Documents and Settings\dmyers.m2\repository [DEBUG] Using manager EnhancedLocalRepositoryManager with priority 10 for C:\Documents and Settings\dmyers.m2\repository [INFO] Scanning for projects... [DEBUG] Extension realms for project org.apache.maven:standalone-pom:pom:1: (none) [DEBUG] Looking up lifecyle mappings for packaging pom from ClassRealm[plexus.core, parent: null] [DEBUG] Resolving plugin prefix archetype from [org.apache.maven.plugins, org.codehaus.mojo] [WARNING] The POM for org.apache.maven.plugins:maven-clean-plugin:jar:2.4.1 is invalid, transitive dependencies (if any) will not be available: 1 problem was encountered while building the effective model for org.apache.maven.plugins:maven-clean-plugin:2.4.1 [FATAL] Non-parseable POM C:\Documents and Settings\dmyers.m2\repository\org\apache\maven\maven-parent\16\maven-parent-16.pom: end tag name must be the same as start tag from line 26 (position: TEXT seen ...t" src="/templates/standard-5.1/js/superfish.js">\n... @36:8) @ C:\Documents and Settings\dmyers.m2\repository\org\apache\maven\maven-parent\16\maven-parent-16.pom, line 36, column 8

    [WARNING] The POM for org.apache.maven.plugins:maven-install-plugin:jar:2.3.1 is invalid,

transitive dependencies (if any) will not be available: 1 problem was encountered while building the effective model for org.apache.maven.plugins:maven-install-plugin:2.3.1 [FATAL] Non-parseable POM C:\Documents and Settings\dmyers.m2\repository\org\apache\maven\maven-parent\16\maven-parent-16.pom: end tag name must be the same as start tag from line 26 (position: TEXT seen ...t" src="/templates/standard-5.1/js/superfish.js">\n... @36:8) @ C:\Documents and Settings\dmyers.m2\repository\org\apache\maven\maven-parent\16\maven-parent-16.pom, line 36, column 8

So I then navigated to the file maven-parent-16.POM and it is a self generated HTML file. It contains info about my works server, and a load of link references in the head of the file.

Obviously this being an HTML file it doesn't meet the strick XML standard for closing tags etc. Do I need to edit these so as they meet the XML strictness. If that is the case then that is fine, but sure if maven creates these files then it should be happy with the structure! I think I may have just understood... the server is blocking the site related to this POM, this is the page I get returned when I hit a 'banned' site from work (all MS sites are blocked as a 'security' measure, yes thats right our network sys admin is a true linux daemon!)...

So that changes my problem a little bit...

I've searched for the POM file that matches the maven-clean-plugin , and the file is there, so I guess it is one of the dependencies, how can I determine which it is that is causing the initial error (I'm sure it is in output, but I don't know what I'm looking for). Then I can just hunt down the requied jar and POM and yipee. Maven should work!

Very quickly, looking at the pom file there are a bunch of 'module' that I guess this file is attempting to dowload. I only have a small selection of them in my local reposiories folder. Is it caused by the server timing out? or am I really being blocked from the site?

Thanks in advance for any help or suggestions I have been trying to solve this now for 2 days!

David

I can't seem to add the full output of the failure, I'll try again if anyone requires it.

D

Community
  • 1
  • 1
DaveM
  • 734
  • 4
  • 11
  • 35
  • Just as a side note, this is preventing my use of Mave, as I can't even run to the end of the tutorials for getting started ! I'm about to try a repo manager in case it is a mirror issue? – DaveM Apr 06 '12 at 12:53
  • OK installed the Nexus repo manager, and that seems to have solved the problem. I need to test and complete a tutorial from http://www.andrejkoelewijn.com/wp/2010/03/09/getting-started-with-nexus-maven-repository-manager/ and if all goes OK I'll post full instructions on what I did in the morning... (or rather after the easter weekend !) – DaveM Apr 06 '12 at 14:29
  • The first things which seemed to be wrong is that you are using a JRE and NOT a JDK which is a must for Maven. – khmarbaise Apr 06 '12 at 19:56
  • @khmarbaise. He is using JDK. `mvn -version` does report `Java home:` with the `jre` folder - for instance, in my case `Java home: C:\Program Files\Java\jdk1.6.0_31\jre`. – Raghuram Apr 07 '12 at 02:29
  • Does you settings.xml file contains a definition for your proxy like this: http://maven.apache.org/guides/mini/guide-proxies.html – khmarbaise Apr 07 '12 at 11:12
  • @khmarbaise I thought that was just a sample? and I adjusted it accordingly. see the detail in my originam post. How can I confirm the IP address of the proxy via firefox? – DaveM Apr 10 '12 at 08:26

1 Answers1

2

From the logs it is evident that dependant maven artifacts are not getting downloaded - most likely due to <proxy> misconfiguration. It could be due to same reason as the related post referred in the question.

The local repository manager itself would not have solved the problem without appropriate changes to settings.xml since this also would have gone through the proxy.

Community
  • 1
  • 1
Raghuram
  • 51,854
  • 11
  • 110
  • 122
  • how do I confirm my proxy settings? After I had added Nexus, all seemed to be OK, but I then continued the tutorial and now I get errors when I'm doing the command? If my proxy is incorrect, how come I am able to download some of the repos, but not others? As a side note I perfomed the same thing at 'home' (no proxy) and everything went fine. Is it possible to copy the directories from one pc to another? – DaveM Apr 10 '12 at 08:22
  • I've had another look at solution 1 and the proxy setting is the same. If I follow solution 2 I get auto redirected to our internal bulletin board, so no PAC file is downloaded? – DaveM Apr 10 '12 at 08:58
  • I've had another look at the download that is causing me problems, and the file is actually the html page presented by the ClearOS proxy server. it states that there the demanded download page contains words that have been 'blocked' for viewing. Don't worry too much about this it is not unusual. I use a translation / dictionairy and it regularly gets over the 'weighted word limit'; What I am amused by is that the POM file even contains 'undesired words'. – DaveM Apr 12 '12 at 10:25
  • I'm accepting your response that it is a 'proxy misconfiguration' even though the error lies on the server blocking sites with certain 'bad' words, see my above comment. So not a config issue in the settings.xml but on the server itself ! – DaveM Apr 12 '12 at 10:27