Jetty

HomePage | RecentChanges | Preferences

JettyPasswordObfuscation

20080611 Adventures in building Jetty

 $ svn checkout http://svn.codehaus.org/jetty/jetty/branches/jetty-6.1/ jetty-6.1

Trouble with jsp-api-2.1 and jsp-2.1 modules that want to check code out of the glassfish cvs repo. Probably need to open a port on the firewall here. Excluding those two modules works. It probably grabs snapshots of them from somewhere.

$ mvn install
...
[INFO] Building Glassfish Jasper API
[INFO]    task-segment: [install]
[INFO] ------------------------------------------------------------------------
[INFO] [antrun:run {execution: export}]
[INFO] Executing tasks

uptodate:

test-export:

export:

      [cvs] Using cvs passfile: /Users/wsmoak/.cvspass
      [cvs] cvs [export aborted]: connect to cvs.dev.java.net(204.16.104.198):2401 failed: Connection refused
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error executing ant tasks

Embedded error: The following error occurred while executing this line:
/Users/wsmoak/svn/jetty-6.1/modules/jsp-api-2.1/checkout.xml:76: cvs exited with error code 1
Command line was [Executing 'cvs' with arguments:
'-d:pserver:guest@cvs.dev.java.net:/cvs'
'export'
'-r'
'SJSAS-9_1-B58G-FCS-08_Sept_2007'
'glassfish/servlet-api/src/jsr245/src/share/'

The ' characters around the executable and arguments are
not part of the command.
...

cvs is on the path, but I don't have credentials for the java.net repo?

20060301 Trying again with the Jetty Plugin.

See also : Cargo

pom.xml has:

   <build>
      <plugins>
         <plugin>
            <groupId>org.mortbay.jetty</groupId>
            <artifactId>maven-jetty6-plugin</artifactId>
            <configuration>
               <scanIntervalSeconds>60</scanIntervalSeconds>
               <contextPath>/myapp</contextPath>
               <connectors>
                  <connector implementation="org.mortbay.jetty.nio.SelectChannelConnector">
                     <port>80</port>
                     <maxIdleTime>60000</maxIdleTime>
                  </connector>
                  <connector implementation="org.mortbay.jetty.security.SslSocketConnector">
                     <port>443</port>
                     <maxIdleTime>30000</maxIdleTime>
                     <keystore>c:/java/keystore</keystore>
                     <password>xxxxxx</password>
                     <keyPassword>xxxxxx</keyPassword>
                  </connector>
               </connectors>
            </configuration>
         </plugin>
...

Generate a key. With Tomcat I don't need -keystore, but here I needed to have something to put in the config. (I have no idea where the default one lives... Tomcat seems to be able to find it.)

 $ keytool -keystore c:/java/jettykeystore -genkey -alias jetty -keyalg RSA


   <pluginGroups>
      <pluginGroup>org.mortbay.jetty</pluginGroup>
   </pluginGroups>

$ mvn jetty6:run
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'jetty6'.
[INFO] -------------------------------------------------------------------------
---
[INFO] Building Account Maintenance Webapp
[INFO]    task-segment: [jetty6:run]
[INFO] -------------------------------------------------------------------------
---
Downloading: http://cvs.apache.org/repository/struts/poms/shale-core-1.0.1-SNAPSHOT.pom
[WARNING] Unable to get resource from repository apache-internal (http://cvs.apache.org/repository)
[INFO] [jetty6:run]
[INFO] Configuring Jetty for project: Account Maintenance Webapp
[INFO] Webapp source directory is: E:\java\acctmtce\webapp\src\main\webapp
[INFO] web.xml file located at: E:\java\acctmtce\webapp\src\main\webapp\WEB-INF\web.xml
[INFO] Classes located at: E:\java\acctmtce\webapp\target\classes
[INFO] tmp dir for webapp will be e:\java\acctmtce\webapp\target\jetty-tmp
[INFO] Starting Jetty Server ...
[INFO] No connectors configured, using defaults: org.mortbay.jetty.nio.SelectChannelConnector listening on 8080 with maxIdleTime 30000
0 [main] INFO org.mortbay.log - Logging to slf4j
0 [main] INFO org.mortbay.log - Logging to org.slf4j.impl.SimpleLogger@1343ed0 via org.mortbay.log.Slf4jLog
[INFO] Context path = /acctmtce
[INFO] Webapp directory = E:\java\acctmtce\webapp\src\main\webapp
[INFO] Setting up classpath ...
[INFO] Finished setting up classpath
[INFO] Started configuring web.xml, resource base=E:\java\acctmtce\webapp\src\main\webapp
[INFO] Finished configuring web.xml
328 [main] WARN org.mortbay.log - failed shale
328 [main] WARN org.mortbay.log - failed ContextHandler@1552b76{/acctmtce,file:/
E:/java/acctmtce/webapp/src/main/webapp/}
375 [main] WARN org.mortbay.log - failed SelectChannelConnector @ 0.0.0.0:8080
375 [main] WARN org.mortbay.log - failed Server@221e9e
[INFO] Jetty server exiting.
[INFO] -------------------------------------------------------------------------
---
[ERROR] BUILD ERROR
[INFO] -------------------------------------------------------------------------
---
[INFO] Failure

Embedded error: Multiple exceptions
[INFO] -------------------------------------------------------------------------
---
[INFO] For more information, run Maven with the -e switch
[INFO] -------------------------------------------------------------------------
---
[INFO] Total time: 2 seconds
[INFO] Finished at: Sun Jan 15 22:17:54 MST 2006
[INFO] Final Memory: 2M/6M
[INFO] -------------------------------------------------------------------------
---
437 [Shutdown] INFO org.mortbay.log - Shutdown hook executing
437 [Shutdown] INFO org.mortbay.log - Shutdown hook complete

      <pluginManagement>
         <plugins>
            ...
            <plugin>
               <groupId>org.mortbay.jetty</groupId>
               <artifactId>maven-jetty6-plugin</artifactId>
               <version>6.0.0beta7</version>
               <!--configuration>
                  <scanIntervalSeconds>10</scanIntervalSeconds>
                  <contextPath>/acctmtce</contextPath>
                  <systemProperties>
                     <systemProperty>
                        <name>org.apache.commons.logging.Log</name>
                        <value>org.apache.commons.logging.impl.SimpleLog</value>
                     </systemProperty>
                  </systemProperties>
               </configuration-->
            </plugin>
         </plugins>
      </pluginManagement>

References


HomePage | RecentChanges | Preferences
This page is read-only | View other revisions
Last edited June 11, 2008 9:26 pm by WendySmoak (diff)
Search: