AW: Problems with MAVEN's-ANT on OpenVMS
Hi Wayne Thank you Wayne for this excellent Analysis. If a routine belonging to the file system returns something badly, there is a little chance to influence by a logical JAVA$FILENAME_CONTROL which can be set to so many values used to control filename encodings, particular how to deal with dot's in file names. Josef -Ursprüngliche Nachricht- Von: Wayne Fay [mailto:wayne...@gmail.com] Gesendet: Donnerstag, 20. Oktober 2011 23:51 An: Maven Users List Betreff: Re: Problems with MAVEN's-ANT on OpenVMS With knowing the details about our environment would you expect that Lucene written in clean Java is not operating on such a platform? Without a comprehensive analysis of the source code for Lucene (and potentially, some or all of its dependencies) it is impossible to say anything conclusive about how well it may operate on OpenVMS or any other operating system except for those explicitly supported (and tested) by the dev team. Java isn't truly write-once run-anywhere, despite such claims ~10-15 years back. I looked at your stacktrace and the problem seemed to be related to a NumberFormatException thrown by java.lang.Long.parseLong() that is not being caught and handled by Lucene: Caused by: java.lang.NumberFormatException: For input string: 1. at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48) at java.lang.Long.parseLong(Long.java:419) at org.apache.lucene.index.SegmentInfos.generationFromSegmentsFileName(SegmentInfos.java:199) I found a Lucene JIRA issue that is loosely related: https://issues.apache.org/jira/browse/LUCENE-3008 Looks like line 211 in trunk is the issue (was line 199 in the stacktrace): http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/src/java/org/apache/lucene/index/SegmentInfos.java?view=markup The source code is: return Long.parseLong(fileName.substring(1+IndexFileNames.SEGMENTS.length()), Character.MAX_RADIX); A quick look at the Java API shows: http://download.oracle.com/javase/1,5.0/docs/api/java/lang/Long.html#parseLong(java.lang.String,%20int) An exception of type NumberFormatException is thrown if any of the following situations occurs: * Any character of the string is not a digit of the specified radix, except that the first character may be a minus sign '-' ('\u002d') provided that the string is longer than length 1. The decimal character in the string 1. is not valid in the radix defined by Character.MAX_RADIX. So, you'll need to figure out where that filename of 1. is coming from -- either OpenVMS or Lucene -- and somehow get rid of the decimal in the filename. Or just rename that file from 1. to simply 1 in your filesystem. Without access to an OpenVMS system and having no real understanding of Lucene's internals, I can't really look into it any more at this point. You probably need to email the Lucene Users list and ask if anyone has successfully gotten it to run on OpenVMS (I'm guessing not) and get things patched up before you can make more progress with getting Nexus running on it. Or take the more reasonable approach and simply install Nexus on a Windows box in your office. ;-) Wayne - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
AW: Problems with MAVEN's-ANT on OpenVMS
Thank you Benson pointing me into the right direction. Was an oversight on my site, that yet another product got involved. Lucene So I have to download yet another hopefully open source project and build it on OpenVMS We attempted to run the Sonatype nexus war on our Apache Tomcat/5.5.26 AS on top of JVM Version 1.6.0-2.p1 from Hewlett-Packard Company on OpenVMS 8.4 patched to latest level in a ia64 OS Architecture environment to get your right With knowing the details about our environment would you expect that Lucene written in clean Java is not operating on such a platform? -Ursprüngliche Nachricht- Von: Benson Margulies [mailto:bimargul...@gmail.com] Gesendet: Donnerstag, 13. Oktober 2011 14:58 An: Maven Users List Betreff: Re: Problems with MAVEN's-ANT on OpenVMS Just to put the cork in this, the backtrace at the end proves that Apache Lucene doesn't work in your OpenVMS environment. Words cannot express my lack of surprise. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
AW: Problems with MAVEN's-ANT on OpenVMS
Hi Wayne my comment ++ below -Ursprüngliche Nachricht- Von: Wayne Fay [mailto:wayne...@gmail.com] Gesendet: Dienstag, 11. Oktober 2011 19:36 An: Maven Users List Betreff: Re: Problems with MAVEN's-ANT on OpenVMS Question: Given mavens settings.xml has the proxy info's does maven tell ant about this proxy information? If yes, where in code and how? I don't know. I would expect the answer is in the maven-antrun-plugin source code, and having just glanced at it now, I don't see any specific location where such proxy information is handed off to Ant (but it may be happening despite not seeing it obviously stated via system properties or something): http://svn.apache.org/viewvc/maven/plugins/tags/maven-antrun-plugin-1.6/src/main/java/org/apache/maven/plugin/antrun/AntRunMojo.java?view=markup If you determine that proxy information is not being passed to Ant, and you patch this code to pass proxy info to Ant, please contribute it back via JIRA for the benefit of other users. ++ will do so I should also mention the setproxy Ant task which may be an easier route to a solution for you: http://ant.apache.org/manual/Tasks/setproxy.html ++ this works but needs to be added to pom's with an ant section and build.xml's. And it works! So we just look for a more central not project dependent solution Question: how does maven get best informed about the preferred authentication schemas to be used by the proxy server i.e. -Dhttp.auth.preference=Basic as described by the ORACLE documentation for JAVA and at many other places. There appears to be an open JIRA related to this specifically: http://jira.codehaus.org/browse/MNG-3049 ++ OK - still unclear for me if this is a application, like ant or maven issue, or a JAVA/JDK/JVM problem; hence not clear, hence not fixed. Question: If ant is first and picks up proxy info and works would you expect for maven that ant tells maven about proxy info to be used? I don't understand this question. Can you please try again, and perhaps explain things more? ++ sometimes inside an ant target maven gets called by a mvn . . . task/macro ; in this context, ANT already knows about the proxy info. But how is this information passed to maven now? If maven retrieves proxy setting from MAVEN_OPTS environment variable under any circumstances, then fine, if not, how is this passed to maven from a ant section in a pom? So the question may be allowed: does maven pick-up MAVEN_OPTS proxy information when called from within a ANT task? BTW: I took the latest sources of nexus down to my Vista PC. Tried to build it as I do with maven and axis2 and it failed! Why do you insist on building everything from sources? ++ because on OpenVMS sometimes one can just not refer to documents which are written for windows and Linux users. ++ because debugging and walking through code even at maven or ant or axis2 has brought many insight into what is not documented. i.e. the axis2 time-out-constant for a servicegroupId was just not seconds as said in a axis2.xml and documented but milliseconds, and since we know this from debugging the rest was a sniff. The rest of us use the binaries directly with no complaints. As Stephen already stated, you should just pull down the Nexus binary and run it on Windows, then point your OpenVMS Maven at it. ++ that has been done meanwhile; ++ further to that, there was a maven team established at our company some two years ago, but long time, we could not use Sonatype Nexus as a proxy or repository as it was just not working well enough. Meanwhile it works and I have tried again and changed only the m2.url in a ANT library.properties files and had a great better experience. This has fix my proxy issues; but there are others out in the crowd depending on proxy setups working well. Also if Ant with the get needs to access any other files outside a nice nexus proxy server, it still needs a working proxy infrastructure. BTW: Then I took the latest binary version of a nexus-webapp.war down to my OpenVMS, I untared it on OpenVMS as we do with Axis2 or maven. It fails during startup on Tomcat and Java 6.0. Many things get up as one can see in tomcat logs attached as text file; but it fails. I am not surprised that Nexus fails to load on OpenVMS. I bet you are the first person (in the world, perhaps) to attempt such a thing. Feel free to communicate that log to Sonatype directly and they may be able to work with you to fix their code so it runs properly -- the Maven Users list is not the right place for such complaints/discussion. ++ Sorry and I agree 100% (was just an example) I did look at the log and it has a NFE for input string 1. which seems to be the root problem: Caused by: java.lang.NumberFormatException: For input string: 1. at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48) at java.lang.Long.parseLong(Long.java:419) at
AW: Problems with MAVEN's-ANT on OpenVMS
Thank you Barrie, thank you Wayne for your excellent articles. Now there is hope to get maven and ant build axis2 and maven and our own stuff on OpenVMS. The issues we are faced with are so many fold: And to complicate things even more. We sit behind firewalls and maven and ant with a get task to build i.e.Axis2, needs to be set with proper proxy info including http.auth.preference=Basic, not supported straight by Ant or maven but needs to go as a hint to our Microsoft proxy server to not start negotiating authentication schemas unable to be handled by the client calling. We have a working ant version of Ant, that is to say, by a bash shell script we launch our own AntClassLoader which creates an Authenticator to pass username and password and then calls the real AntLoader;;; BTW: Username and Password for the proxy server is never picked up by default from JAVA args as said in documents at various places. We have investigated Ant code for that. It is picked up by ant code only if you pass the --diagnostics switch to Ant and makes people think that all is fine, but in reality for a get task Ant does not pick proxy info under normal operation. This circumstance alone has made us work for some days. Also to be honest to Ant, it might be a Java JVM or java.net problem. Which org has to deal with such issues? Which org should fix it once for ever? Or who has to deal with such issues? The Ant-, or Maven-, or Java- or any of the mayn thousand jar-developers. We like to setup JAVA Arguments like -Dhttp.proxy.User=name -Dhttp.proxy.Password=xxx. So all is fine if we pass this as Ant arguments from inside a build.xml. BUT we do not like to change the ant build.xml files for each product like axis2 or maven. And we do not like to modify each maven pom for the same reason. We prefer a more central place. This is the case for maven with its settings.xml (except http.auth.preference=Basic is not foreseen by maven). It is always the same: what is used where and when and under which circumstances ?! Question: Given mavens settings.xml has the proxy info's does maven tell ant about this proxy information? If yes, where in code and how? Question: how does maven get best informed about the preferred authentication schemas to be used by the proxy server i.e. -Dhttp.auth.preference=Basic as described by the ORACLE documentation for JAVA and at many other places. Question: If ant is first and picks up and works would you expect for maven that ant tells maven about proxy info to be used? BTW: thanks for the pointers to the books. BTW: I took the latest sources of nexus down to my Vista PC. Tried to build it as I do with maven and axis2 and it failed! BTW: Then I took the latest binary version of a nexus-webapp.war down to my OpenVMS, I untared it on OpenVMS as we do with Axis2 or maven. It fails during startup on Tomcat and Java 6.0. Many things get up as one can see in tomcat logs attached as text file; but it fails. I did so because Wayne Fay said to work with nexus simplifies much of this repository and cache management. And I beleave you. And I like the idea very much and was reading a lot about nexus and repositories immediately. But in reality we have now one more product on OpenVMS which we need to make work first; where ever the problem is. Is it JAVA from HP? or any of the jar files issuing a shell script? or the use of exported environment variable of which bash under OpenVMS does not know anything by default? It is a tedious process to make such complex environments work; Josef -Ursprüngliche Nachricht- Von: Barrie Treloar [mailto:baerr...@gmail.com] Gesendet: Mittwoch, 5. Oktober 2011 00:45 An: Maven Users List Betreff: Re: Problems with MAVEN's-ANT on OpenVMS On Wed, Oct 5, 2011 at 3:43 AM, Wayne Fay wayne...@gmail.com wrote: May I ask you a favor and lead me to a document describing how we can make maven using our own ant 1.7.1, as we had changes in ANT 1.7.1 specifically for OpenVMS, those catching logical, and generating a temporary file where all the many hundred arguments being passed today to JAVA / JVM are stored in. I already told you what to do but here are the complete steps: Plus, did you try google? http://www.google.com/search?q=maven+ant+plugin+change+version+of+ant Some of the steps that Wayne has kindly outlined are not particular to your problem. They are the knowledge you need to run Maven effectively at your company. I highly recommend that you read the freely available books at http://maven.apache.org/articles.html We can't wave a magic wand for you to grasp some of the more important and complicated concepts. Your going to have to help us by helping yourself first. Additionally, if you think these steps are important and not well documented, I invite you to document them for the benefit of others. As a user you should have access to http://docs.codehaus.org/display/MAVENUSER/Home But I think the best
AW: Problems with MAVEN's-ANT on OpenVMS
Hello Wayne Thank you. Wayne, I understand by far not all in maven , who does? But thanks for the reply, it clears a bit of the clouds. May I ask you a favor and lead me to a document describing how we can make maven using our own ant 1.7.1, as we had changes in ANT 1.7.1 specifically for OpenVMS, those catching logical, and generating a temporary file where all the many hundred arguments being passed today to JAVA / JVM are stored in. can we make maven use our ant by changing pom.xml or better have a more global approach/setup such as in a settings.xml? We need maven to execute our own ant 1.7.1 for now as this is the only way we can pass 100+ arguments to JAVA/JVM on OpenVMS The current version of ANT, which maven-2.2.1 uses by default, is not doing this right for OpenVMS. And hence we run into the error shown in the trace below, which is from a AntSetup.xml calling the real build-wsdls.xml for test purpose. It is even not executing correct just when just asked to execute an ordinary bash shell ls command. And to be positive: We would not take this challenge and work and work just to get maven build maven and axis2 if we would not love maven! But with openvms it is sometimes a night mare. And it is a nightmare if maven developers use Unix scripts when they could use JAVA statements for the same. Today we have maven build 6/7 of apache-maven-2.2.1 from the bootstrap, and we have maven-2.2.1 build axis2-1.6.0 to about 70% And we see the day when we have a working environment on OpenVMS as many of you have on Linux and Solaris and Windows; And we are not from HP owning OpenVMS but are just ordinary customers counting on open source communities! And we do not yet have a nexus e all repository manager! This will end in a next port to OpenVMS !!! So we need to keep it simple and know how to deploy our own ANT into what you call mavens cache. Josef.Stadelmann@ Axa-winterthur.ch [INFO] Executing tasks [echo] Building WSDLs... Overriding previous definition of reference to maven.dependency.classpath [echo] Running on OpenVMS [echo] Inside /dka3/sw-projekte/asf/axis/axis2/java/core/tags/v1.6.0/modules/codegen/AntSetup.xml. ANT Version = ${antversion} not-CustomAnt: CustomAnt: [echo] Executing /bin/sh -c 'export ANT_OPTS=-Dhttp.auth.preference=Basic -Dhttp.proxyHost=bcproxyserver.ch.winterthur.com -Dh ttp.proxyPort=8080 -Dhttp.proxyUser=C770817 -Dhttp.proxyPassword=orbxorbx; ls -l' [exec] %DCL-W-NOCOMD, no command on line - reenter with alphabetic first character [exec] %DCL-W-NOCOMD, no command on line - reenter with alphabetic first character [exec] Result: 229552 all: [INFO] Executed tasks [INFO] [resources:copy-resources {execution: copy-templates}] [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Copying 7 resources [INFO] Copying 1 resource [INFO] Copying 1 resource [INFO] Copying 1 resource [INFO] [resources:testResources {execution: default-testResources}] [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Copying 0 resource [INFO] Copying 10 resources [INFO] Copying 2 resources [INFO] [compiler:testCompile {execution: default-testCompile}] [INFO] Compiling 4 source files to /dka3/sw-projekte/asf/axis/axis2/java/core/tags/v1.6.0/modules/codegen/target/test-classes [INFO] [surefire:test {execution: default-test}] [INFO] Surefire report directory: /dka3/sw-projekte/asf/axis/axis2/java/core/tags/v1.6.0/modules/codegen/target/surefire-reports [INFO] [ERROR] BUILD FAILURE [INFO] [INFO] There are test failures. Please refer to /dka3/sw-projekte/asf/axis/axis2/java/core/tags/v1.6.0/modules/codegen/target/surefire-reports for the individual te st results. [INFO] [INFO] For more information, run Maven with the -e switch [INFO] [INFO] Total time: 40 seconds [INFO] Finished at: Tue Oct 04 18:30:21 CEST 2011 [INFO] Final Memory: 25M/618M [INFO] bash$ -Ursprüngliche Nachricht- Von: Wayne Fay [mailto:wayne...@gmail.com] Gesendet: Montag, 3. Oktober 2011 16:31 An: Maven Users List Betreff: Re: Problems with MAVEN's-ANT on OpenVMS I was never expecting that maven is using it's own ANT ! Its not using its own Ant. It simply does not use the Ant that you previously installed but rather uses the Ant jars directly from its cache. Now with maven it just did not work and the reason why is: Maven uses it's own ANT lib files !!! I was not expecting that maven reinvents the wheel. It doesn't. This is a failure of