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

  • SEARCH
  • Home
  • 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 8600325
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T01:35:30+00:00 2026-06-12T01:35:30+00:00

I just installed the maven eclipse plugin and all is great. I have tried

  • 0

I just installed the maven eclipse plugin and all is great. I have tried creating my first mojo. After the setup, it has downloaded all the required dependencies.

Now what is troubling me is that Eclipse isn’t able to resolve the org.apache.maven.plugins classes.

My pom.xml :

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>

  <groupId>com.blah.dalm.mojo</groupId>
  <artifactId>assembly-mojo</artifactId>
  <packaging>maven-plugin</packaging>
  <name>Assembly Mojo</name>
  <version>0.0.1-SNAPSHOT</version>

  <build>       
    <sourceDirectory>${basedir}</sourceDirectory>
    <!-- Plugin Configurations -->
    <plugins>
        <!-- Compiler plugin to use 1.6 -->
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>2.0.2</version>
            <executions>
                <execution>
                </execution>
            </executions>
            <configuration>
              <source>1.6</source>
              <target>1.6</target>
            </configuration>

        </plugin>
    </plugins>
  </build>
  <!--  Dependencies  -->  
  <dependencies>
    <dependency>
        <groupId>org.apache.maven</groupId>
        <artifactId>maven-plugin-api</artifactId>
        <version>2.0</version>
    </dependency>
  </dependencies>
</project>

My mojo file AssemblyMojo.java:

package com.blah.dalm.mojo;

import java.util.List;
import org.apache.maven.plugin.MojoExecutionException; // <-- This is where it says it cannot resolve the class or package.

/**
 * "Assemble Goal"
 * @goal assemble-goal
 * @author Husain Khambaty
 *
 */
public class AssemblyMojo { 
    /**
     * @parameter expression="${assembly.sourcePath}"
     * @required
     */
    private String sourcePath;

    /**
     * @parameter expression="${assembly.outputPath}"
     * @required
     */
    private String outputFilePath;

    /**
     * @parameter
     */

    private List<String> excludeList;
    /**
     * @parameter
     */

    private String filterRule;

    public void execute() throws MojoExecutionException { // <-- And here

    }
}

It is unable to resolve the MojoExectionException class (therefore I believe it isn’t able to find the rerquired jars, which I guess it is supposed to automatically fetch after the Eclipse-Maven integration).

When I build it, it builds just fine.

  • 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-12T01:35:31+00:00Added an answer on June 12, 2026 at 1:35 am

    Solution :

    Thanks to @yorkw – his answer led me to the solution.

    After installing the Maven-Eclipse plugin, and adding the dependencies in the pom.xml, it is automatically supposed to find those jars from the maven repository and add them in a “Maven Dependencies” section. This didn’t happen when I did it (probably did something wrong).

    After @yorkw answer, I added the jar and it worked. Just then I figured that I had already enabled the Dependencies. So just for the heck of it, I disabled them and enabled them again and suddenly out of no where the “Maven Dependenices” appeared. Phew.

    (Note : I did try putting up screenshots – but I’m a newbie on StackOverflow and it wont allow me to post images yet.. I shall in time edit this post back and put the screen shots for others).

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

Sidebar

Related Questions

I just installed the plugin m2e for the first time on Eclipse. I wrote
Note: I'm just getting started with Jenkins plugin development and have never used maven
I just installed Maven for a project in Eclipse. Now Maven is complaining that
I've just installed Eclipse Juno with m2e installed. Then, I've created a new Maven
Problem I have just installed the Sonar Jenkins plugin. I went into my configured
Perhaps I am misreading, but per: http://maven.apache.org/plugins/maven-eclipse-plugin/install-plugins-mojo.html and http://docs.codehaus.org/display/MAVENUSER/Eclipse+Plugin Or is this meant only
I have just imported a maven project into eclipse indigo which seems bundled with
I've just installed Maven2 for the first time. By default it pulls down a
I have Eclipse Galileo (for Java EE Developers) installed, and I'm now trying to
I have just started to use Apache Maven. Now I would like to make

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.