Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8587703
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T22:37:59+00:00 2026-06-11T22:37:59+00:00

So, what I want to do is configure maven plugin jetty to run multiple

  • 0

So, what I want to do is configure maven plugin jetty to run multiple – in my case two – instances of jetty server on different ports and with different apps.

So, I want to have something like:

localhost:8080/webapp1
localhost:8081/webapp2

And I want to do this with one single command: mvn jetty:run
which of course means that I have to configure it in pom.xml

I already have two different jetty config files: jettyA.xml and jettyB.xml in which there are different connectors defined.
The problem is just i can’t figure it out how to do this with one pom.xml

I tried with two profiles but is somehow did not work.
Just jetty in the last profile mentioned was started.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T22:38:00+00:00Added an answer on June 11, 2026 at 10:38 pm

    Replace the port number in pom.xml by a property variable like this:

    <port>${jetty.port}</port>
    

    Then run maven using the following command:

    mvn jetty:run -Djetty.port=8081
    

    To define a default port numer, add this default property to your pom file:

    <properties>
        <jetty.port>8080</jetty.port>
    </properties>
    

    If you need any more advanced method for determining the port number, you will need to embed jetty in your main class.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I use tomcat-maven-plugin to deploy my war to a server. What I have to
I am using maven2. I have tomcat7 installed. I want to configure the plugin
I have a Maven 2 project and I want to configure my Checkstyle report
I want to configure exploded goal of the maven-war-plugin: <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-war-plugin</artifactId> <executions> <execution>
I have an xml file that I want to configure using a bash script.
I have developed a spring application, I want to configure it with apache log4j,
I've hired a new VPS and have root access. Now i want to configure
I want to ensure I have done all I can to configure a system's
I have some properties in two bash scripts I want substituted when running mvn
I have successfully installed & configured the M2E Maven plugin for Eclipse, along with

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.