jeudi 14 avril 2016

How to generate external Jetty from embedded Jetty Maven

I am working on refactoring a legacy program that runs on Jetty 6.1.7 embedded into Maven2

this is the part of the pom.xml that refers to Jetty

    <build>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <configuration>
                <excludes>
                    <exclude>**/*BLAHBLAHBLAH.java</exclude>
                </excludes>
            </configuration>
        </plugin>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-war-plugin</artifactId>
            <version>2.0</version>
        </plugin>
        <plugin>
            <groupId>org.mortbay.jetty</groupId>
            <artifactId>maven-jetty-plugin</artifactId>
            <version>6.1.7</version>
            <configuration>
                <useTestClasspath>true</useTestClasspath>
                <contextPath>/MYAPPLICATION</contextPath>
                <webXml>${basedir}/src/test/webapp/WEB-INF/web.xml</webXml>
                <connectors>
                    <connector implementation="org.mortbay.jetty.nio.SelectChannelConnector">
                        <port>9090</port>
                        <maxIdleTime>60000</maxIdleTime>
                    </connector>
                </connectors>
                <scanIntervalSeconds>2</scanIntervalSeconds>
                <requestLog implementation="org.mortbay.jetty.NCSARequestLog">
                    <filename>target/yyyy_mm_dd.request.log</filename>
                    <retainDays>90</retainDays>
                    <append>true</append>
                    <extended>false</extended>
                    <logTimeZone>GMT</logTimeZone>
                </requestLog>
            </configuration>
            <dependencies>
                <dependency>
                    <groupId>javax.jms</groupId>
                    <artifactId>jms</artifactId>
                    <version>1.1</version>
                </dependency>
                <dependency>
                    <groupId>com.sun.messaging.mq</groupId>
                    <artifactId>imq</artifactId>
                    <version>4.4</version>
                    <scope>provided</scope>
                </dependency>
                <dependency>
                    <groupId>org.apache.myfaces.core</groupId>
                    <artifactId>myfaces-api</artifactId>
                    <version>1.1.5</version>
                </dependency>
                <dependency>
                    <groupId>org.apache.myfaces.core</groupId>
                    <artifactId>myfaces-impl</artifactId>
                    <version>1.1.5</version>
                </dependency>
                <!--
                    <dependency> <groupId>jsf-extensions</groupId>
                    <artifactId>jsf-extensions-run-time</artifactId>
                    <version>0.1alpha4</version> </dependency>
                -->
                <dependency>
                    <groupId>log4j</groupId>
                    <artifactId>log4j</artifactId>
                    <version>${log4j.version}</version>
                </dependency>
                <dependency>
                    <groupId>org.directwebremoting</groupId>
                    <artifactId>dwr</artifactId>
                    <version>2.0.3</version>
                </dependency>
            </dependencies>
        </plugin>
    </plugins>
</build>

My end goal is to remove the Maven from the build process, without getting into philosophical discussions about why - I need to know how to produce an equivalent plain jetty setup up with the above configurations.

I'm guessing the dependencies would go into the jetty/lib directory, but what about the stuff nested in ?




Aucun commentaire:

Enregistrer un commentaire