Missing Maven Plugin Jetty

前端 未结 7 2151
小鲜肉
小鲜肉 2021-02-19 04:15

I am having trouble folowing this http://hrycan.com/2012/03/28/primefaces-lazy-loading-datatable-for-jsf2/

It says I should just run

mvn jetty:run


        
相关标签:
7条回答
  • 2021-02-19 04:46

    Make sure you are executing command 'mvn jetty:run', from inside your project directory. If you will listed the current directory you should see the pom.xml.

    If you are in not in your project and running 'mvn jetty:run', will get Error "Missing Maven Plugin Jetty"

            <plugin>
                <groupId>org.mortbay.jetty</groupId>
                <artifactId>jetty-maven-plugin</artifactId>
                <version>8.1.12.v20130726</version>
                <configuration>
                    <stopKey>todostop</stopKey>
                    <stopPort>9999</stopPort>
                </configuration>
            </plugin>
    

    Hope it will help

    0 讨论(0)
  • 2021-02-19 04:46

    I had this problem too. I started jetty:run from within Eclipse using a "Maven Build" run configuration.

    The problem was, within my Maven Build run configuration, the "base directory" (i.e. the working directory used by the mvn executable) was set incorrectly. Setting the base directory to the directory containing the pom.xml fixed the problem.

    0 讨论(0)
  • 2021-02-19 04:46

    Most probably your version is wrong. Try

        <plugins>
            <plugin>
              <groupId>org.eclipse.jetty</groupId>
              <artifactId>jetty-maven-plugin</artifactId>
              <version>9.2.6.v20141205</version>
            </plugin>
        </plugins>
    
    0 讨论(0)
  • 2021-02-19 04:52

    Check if it works after adding the following in settings.xml as documented.

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

    Also note that there are two different versions of the plugin - the older maven-jetty-plugin and the newer jetty-maven-plugin.
    source

    0 讨论(0)
  • 2021-02-19 04:53

    Beside the plugin part you should be in the pom.xml directory to make starting the jetty command.

    0 讨论(0)
  • 2021-02-19 04:54

    Did you add the plugin to the pom.xml? A quick google search found this:

    <project>
      ...
      <build>
        ...
        <plugins>
          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>jetty-maven-plugin</artifactId>
          </plugin>
        </plugins>
      </build>
    </project>
    

    Found here: http://mojo.codehaus.org/jetty-maven-plugin/usage.html

    0 讨论(0)
提交回复
热议问题