Hi,
In my mojo I have written following code to start the container:
package sample.plugin;
import org.apache.maven.plugin.AbstractMojo;
import org.apache.maven.plugin.MojoExecutionException;
import org.codehaus.cargo.container.Container;
/**
 * Says "Hi" to the user.
 * @goal sayhi
 */
public class MyMojo extends AbstractMojo
{
    public void execute() throws MojoExecutionException
    {
                        System.out.println("hi");
 getLog().info("Hello, world.");
                        Container container = new Jboss4xContainer();
                        container.setHomeDir("E:/Softwares/jboss-4.0.5.GA");
                        container.setWorkingDir("target/jboss4x");
                        container.start();
    }
}

Now I get following error when I run the application by executing following 
command:
mvn  install or mvn package
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Compilation failure

F:\Documents and Settings\rvgupta\MavenProjects\maven-hello-plugin(for cargo 
java api)\src\main\java\sample\plugin\MyMojo.java:[5,36] package 
org.codehaus.cargo.container does not
exist

F:\Documents and Settings\rvgupta\MavenProjects\maven-hello-plugin(for cargo 
java api)\src\main\java\sample\plugin\MyMojo.java:[18,16] cannot find symbol
symbol  : class Container
location: class sample.plugin.MyMojo

F:\Documents and Settings\rvgupta\MavenProjects\maven-hello-plugin(for cargo 
java api)\src\main\java\sample\plugin\MyMojo.java:[18,42] cannot find symbol
symbol  : class Jboss4xContainer
location: class sample.plugin.MyMojo

And I have checked the repository it contains the Container class in the same 
package I have imported.
What can be the reason for this failure???????


Regards,
Renu Gupta

Reply via email to