linkedin/cleo — Issue #3: Running from within a firewall
Author: jlpoolen
Created: 2012-03-06 23:11:22+00:00
State: open

This is really a maven issue; however, others may be in the same position I find myself and addressing this issue could prove helpful.

I was able to successfully run the cleo-primer from behind a less-restrictive firewall; the remote fetching worked and the server started. Now I am trying to run the sample from behind a restrictive firewall and the startup fails because remote files cannot be downloaded.

I checked Maven's site http://maven.apache.org/guides/mini/guide-proxies.html and duly created a file ~jlpoole/.m2/repository/settings.xml as follows:

jlpoole@themis /usr/local/src/cleo-primer $ cat ~/.m2/repository/settings.xml

true
http
[the proxy server]
[the proxy port]

jlpoole@themis /usr/local/src/cleo-primer $

Yet, when I try to run the launching command, it's showing the proxy is not working:

jlpoole@themis /usr/local/src/cleo-primer $ MAVEN_OPTS="-Xms1g -Xmx1g" mvn jetty:run -Dcleo.instance.name=Company -Dcleo.instance.type=cleo.primer.GenericTypeaheadInstance -Dcleo.instance.conf=src/main/resources/config/generic-typeahead
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building cleo-primer 1.0
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] >>> maven-jetty-plugin:6.1.25:run (default-cli) @ cleo-primer >>>
[WARNING] The POM for org.codehaus.jackson:jackson-lgpl:jar:0.9.4 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
[WARNING] Could not transfer metadata org.springframework:spring-core/maven-metadata.xml from/to m1.dev.java.net (http://download.java.net/maven/1): No connector available to access repository m1.dev.java.net (http://download.java.net/maven/1) of type legacy using the available factories WagonRepositoryConnectorFactory
[WARNING] Could not transfer metadata org.springframework:spring/maven-metadata.xml from/to m1.dev.java.net (http://download.java.net/maven/1): No connector available to access repository m1.dev.java.net (http://download.java.net/maven/1) of type legacy using the available factories WagonRepositoryConnectorFactory
[WARNING] Could not transfer metadata org.springframework:spring-beans/maven-metadata.xml from/to m1.dev.java.net (http://download.java.net/maven/1): No connector available to access repository m1.dev.java.net (http://download.java.net/maven/1) of type legacy using the available factories WagonRepositoryConnectorFactory
[WARNING] Could not transfer metadata org.springframework:spring-context/maven-metadata.xml from/to m1.dev.java.net (http://download.java.net/maven/1): No connector available to access repository m1.dev.java.net (http://download.java.net/maven/1) of type legacy using the available factories WagonRepositoryConnectorFactory
[WARNING] Could not transfer metadata org.springframework:spring-web/maven-metadata.xml from/to m1.dev.java.net (http://download.java.net/maven/1): No connector available to access repository m1.dev.java.net (http://download.java.net/maven/1) of type legacy using the available factories WagonRepositoryConnectorFactory
[INFO]
[INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ cleo-primer ---
[debug] execute contextualize
[WARNING] Using platform encoding (ANSI_X3.4-1968 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 4 resources
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ cleo-primer ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-resources-plugin:2.5:testResources (default-testResources) @ cleo-primer ---
[debug] execute contextualize
[WARNING] Using platform encoding (ANSI_X3.4-1968 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory /usr/local/src/cleo-primer/src/test/resources
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @ cleo-primer ---
[INFO] No sources to compile
[INFO]
[INFO] <<< maven-jetty-plugin:6.1.25:run (default-cli) @ cleo-primer <<<
[WARNING] Failure to transfer org.springframework:spring-core/maven-metadata.xml from http://download.java.net/maven/1 was cached in the local repository, resolution will not be reattempted until the update interval of m1.dev.java.net has elapsed or updates are forced. Original error: Could not transfer metadata org.springframework:spring-core/maven-metadata.xml from/to m1.dev.java.net (http://download.java.net/maven/1): No connector available to access repository m1.dev.java.net (http://download.java.net/maven/1) of type legacy using the available factories WagonRepositoryConnectorFactory
[WARNING] Failure to transfer org.springframework:spring/maven-metadata.xml from http://download.java.net/maven/1 was cached in the local repository, resolution will not be reattempted until the update interval of m1.dev.java.net has elapsed or updates are forced. Original error: Could not transfer metadata org.springframework:spring/maven-metadata.xml from/to m1.dev.java.net (http://download.java.net/maven/1): No connector available to access repository m1.dev.java.net (http://download.java.net/maven/1) of type legacy using the available factories WagonRepositoryConnectorFactory
[WARNING] Failure to transfer org.springframework:spring-beans/maven-metadata.xml from http://download.java.net/maven/1 was cached in the local repository, resolution will not be reattempted until the update interval of m1.dev.java.net has elapsed or updates are forced. Original error: Could not transfer metadata org.springframework:spring-beans/maven-metadata.xml from/to m1.dev.java.net (http://download.java.net/maven/1): No connector available to access repository m1.dev.java.net (http://download.java.net/maven/1) of type legacy using the available factories WagonRepositoryConnectorFactory
[WARNING] Failure to transfer org.springframework:spring-context/maven-metadata.xml from http://download.java.net/maven/1 was cached in the local repository, resolution will not be reattempted until the update interval of m1.dev.java.net has elapsed or updates are forced. Original error: Could not transfer metadata org.springframework:spring-context/maven-metadata.xml from/to m1.dev.java.net (http://download.java.net/maven/1): No connector available to access repository m1.dev.java.net (http://download.java.net/maven/1) of type legacy using the available factories WagonRepositoryConnectorFactory
[WARNING] Failure to transfer org.springframework:spring-web/maven-metadata.xml from http://download.java.net/maven/1 was cached in the local repository, resolution will not be reattempted until the update interval of m1.dev.java.net has elapsed or updates are forced. Original error: Could not transfer metadata org.springframework:spring-web/maven-metadata.xml from/to m1.dev.java.net (http://download.java.net/maven/1): No connector available to access repository m1.dev.java.net (http://download.java.net/maven/1) of type legacy using the available factories WagonRepositoryConnectorFactory
[INFO]
[INFO] --- maven-jetty-plugin:6.1.25:run (default-cli) @ cleo-primer ---
[INFO] Configuring Jetty for project: cleo-primer
[INFO] Webapp source directory = /usr/local/src/cleo-primer/src/main/webapp
[INFO] Reload Mechanic: manual
[INFO] Classes = /usr/local/src/cleo-primer/target/classes
2012-03-06 14:48:47.802:INFO::Logging to STDERR via org.mortbay.log.StdErrLog
[INFO] Jetty server exiting.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.554s
[INFO] Finished at: Tue Mar 06 14:48:47 PST 2012
[INFO] Final Memory: 10M/981M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.mortbay.jetty:maven-jetty-plugin:6.1.25:run (default-cli) on project cleo-primer: Failure: Bad temp directory: /usr/local/src/cleo-primer/target/work -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
2012-03-06 14:48:48.074:INFO::Shutdown hook executing
2012-03-06 14:48:48.074:INFO::Shutdown hook complete
jlpoole@themis /usr/local/src/cleo-primer $

Is there something that can be tweaked to bypass refreshing from remote sources so when the example is run from within a restrictive firewall it is ready to run and/or aborts trying to get the latest files? Or have I missed some basic Maven configuration making my attempt to create a proxy entry useless?