You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Urooj Khan <ur...@gmail.com> on 2008/04/01 21:21:34 UTC

war plugin error with cargo

hi everyone

i get the following error when i try to
mvn cargo:deploy -P

[ERROR] BUILD ERROR
[INFO]
------------------------------------------------------------------------
[INFO] Artifact [emailer:emailer:war] is not a dependency of the project.
[INFO]
------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Artifact
[emailer:emailer:war] is not a dependency of the project.
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(
DefaultLifecycleExecutor.java:564)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(
DefaultLifecycleExecutor.java:493)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(
DefaultLifecycleExecutor.java:463)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures
(DefaultLifecycleExecutor.java:311)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(
DefaultLifecycleExecutor.java:278)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(
DefaultLifecycleExecutor.java:143)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:333)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:126)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:282)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(
NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(
DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java
:315)
        at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
        at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java
:430)
        at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.plugin.MojoExecutionException: Artifact
[emailer:emailer:war] is not a dependency of the project.
        at
org.codehaus.cargo.maven2.configuration.AbstractDependency.findArtifactLocation
(AbstractDependency.java:110)
        at
org.codehaus.cargo.maven2.configuration.Deployable.computeLocation(
Deployable.java:208)
        at
org.codehaus.cargo.maven2.configuration.Deployable.createDeployable(
Deployable.java:110)
        at
org.codehaus.cargo.maven2.AbstractDeployerMojo.performDeployerActionOnAllDeployables
(AbstractDeployerMojo.java:99)
        at org.codehaus.cargo.maven2.AbstractDeployerMojo.doExecute(
AbstractDeployerMojo.java:47)
        at org.codehaus.cargo.maven2.AbstractCargoMojo.execute(
AbstractCargoMojo.java:243)
        at org.apache.maven.plugin.DefaultPluginManager.executeMojo(
DefaultPluginManager.java:447)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(
DefaultLifecycleExecutor.java:539)
        ... 16 more


Here is my pom.xml:
  <build>
<plugins>
    <plugin>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-war-plugin</artifactId>
      <version>2.0</version>
      <configuration>
        <warSourceDirectory>web</warSourceDirectory>
      </configuration>
    </plugin>
  <plugin>
        <groupId>org.codehaus.cargo</groupId>
        <artifactId>cargo-maven2-plugin</artifactId>
        <executions>
            <execution>
                <phase>install</phase>
            </execution>
        </executions>
        <configuration>
          <container>
            <containerId>tomcat5x</containerId>
            <type>remote</type>
          </container>
          <configuration>
            <type>runtime</type>
            <properties>
              <cargo.remote.username>${tomcat.username
}</cargo.remote.username>
              <cargo.remote.password>${tomcat.password
}</cargo.remote.password>
              <cargo.hostname>${host.name}</cargo.hostname>
              <cargo.servlet.port>${host.port}</cargo.servlet.port>
            </properties>
          </configuration>
          <deployer>
            <type>remote</type>
            <deployables>
              <deployable>
                <groupId>money</groupId>
                <artifactId>money</artifactId>
                <type>war</type>
                <properties>
                  <context>${tomcat.context}</context>
                </properties>
              </deployable>
            </deployables>
          </deployer>
        </configuration>
      </plugin>
  </plugins>
    <sourceDirectory>${basedir}/src/java</sourceDirectory>
    <testSourceDirectory>${basedir}/src/test</testSourceDirectory>
    <resources>
      <resource>
        <directory>${basedir}/conf</directory>
        <includes>
          <include>*.properties</include>
        </includes>
        </resource>
    </resources>
  </build>


-- 
Urooj Khan

Re: war plugin error with cargo

Posted by Urooj Khan <ur...@gmail.com>.
thanks wayne!!
actually i figured out the problem..
for others who may experience the same issue...

the groupId and artifact in the deployable tag must match the groupId and
artifactId just below the project tag defined
at the begining of your pom.xml


<deployable>
                <groupId>money</groupId>
                <artifactId>money</artifactId>

On Tue, Apr 1, 2008 at 4:04 PM, Wayne Fay <wa...@gmail.com> wrote:

> That's not your whole pom. Send the whole thing, or even better, post
> it on pastebin.org and send us a link.
>
> Wayne
>
> On 4/1/08, Urooj Khan <ur...@gmail.com> wrote:
> > hi everyone
> >
> > i get the following error when i try to
> > mvn cargo:deploy -P
> >
> > [ERROR] BUILD ERROR
> > [INFO]
> > ------------------------------------------------------------------------
> > [INFO] Artifact [emailer:emailer:war] is not a dependency of the
> project.
> > [INFO]
> > ------------------------------------------------------------------------
> > [INFO] Trace
> > org.apache.maven.lifecycle.LifecycleExecutionException: Artifact
> > [emailer:emailer:war] is not a dependency of the project.
> >        at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(
> > DefaultLifecycleExecutor.java:564)
> >        at
> >
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(
> > DefaultLifecycleExecutor.java:493)
> >        at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(
> > DefaultLifecycleExecutor.java:463)
> >        at
> >
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures
> > (DefaultLifecycleExecutor.java:311)
> >        at
> > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(
> > DefaultLifecycleExecutor.java:278)
> >        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(
> > DefaultLifecycleExecutor.java:143)
> >        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:333)
> >        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:126)
> >        at org.apache.maven.cli.MavenCli.main(MavenCli.java:282)
> >        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >        at sun.reflect.NativeMethodAccessorImpl.invoke(
> > NativeMethodAccessorImpl.java:39)
> >        at sun.reflect.DelegatingMethodAccessorImpl.invoke(
> > DelegatingMethodAccessorImpl.java:25)
> >        at java.lang.reflect.Method.invoke(Method.java:585)
> >        at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java
> > :315)
> >        at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
> >        at
> org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java
> > :430)
> >        at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
> > Caused by: org.apache.maven.plugin.MojoExecutionException: Artifact
> > [emailer:emailer:war] is not a dependency of the project.
> >        at
> >
> org.codehaus.cargo.maven2.configuration.AbstractDependency.findArtifactLocation
> > (AbstractDependency.java:110)
> >        at
> > org.codehaus.cargo.maven2.configuration.Deployable.computeLocation(
> > Deployable.java:208)
> >        at
> > org.codehaus.cargo.maven2.configuration.Deployable.createDeployable(
> > Deployable.java:110)
> >        at
> >
> org.codehaus.cargo.maven2.AbstractDeployerMojo.performDeployerActionOnAllDeployables
> > (AbstractDeployerMojo.java:99)
> >        at org.codehaus.cargo.maven2.AbstractDeployerMojo.doExecute(
> > AbstractDeployerMojo.java:47)
> >        at org.codehaus.cargo.maven2.AbstractCargoMojo.execute(
> > AbstractCargoMojo.java:243)
> >        at org.apache.maven.plugin.DefaultPluginManager.executeMojo(
> > DefaultPluginManager.java:447)
> >        at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(
> > DefaultLifecycleExecutor.java:539)
> >        ... 16 more
> >
> >
> > Here is my pom.xml:
> >  <build>
> > <plugins>
> >    <plugin>
> >      <groupId>org.apache.maven.plugins</groupId>
> >      <artifactId>maven-war-plugin</artifactId>
> >      <version>2.0</version>
> >      <configuration>
> >        <warSourceDirectory>web</warSourceDirectory>
> >      </configuration>
> >    </plugin>
> >  <plugin>
> >        <groupId>org.codehaus.cargo</groupId>
> >        <artifactId>cargo-maven2-plugin</artifactId>
> >        <executions>
> >            <execution>
> >                <phase>install</phase>
> >            </execution>
> >        </executions>
> >        <configuration>
> >          <container>
> >            <containerId>tomcat5x</containerId>
> >            <type>remote</type>
> >          </container>
> >          <configuration>
> >            <type>runtime</type>
> >            <properties>
> >              <cargo.remote.username>${tomcat.username
> > }</cargo.remote.username>
> >              <cargo.remote.password>${tomcat.password
> > }</cargo.remote.password>
> >              <cargo.hostname>${host.name}</cargo.hostname>
> >              <cargo.servlet.port>${host.port}</cargo.servlet.port>
> >            </properties>
> >          </configuration>
> >          <deployer>
> >            <type>remote</type>
> >            <deployables>
> >              <deployable>
> >                <groupId>money</groupId>
> >                <artifactId>money</artifactId>
> >                <type>war</type>
> >                <properties>
> >                  <context>${tomcat.context}</context>
> >                </properties>
> >              </deployable>
> >            </deployables>
> >          </deployer>
> >        </configuration>
> >      </plugin>
> >  </plugins>
> >    <sourceDirectory>${basedir}/src/java</sourceDirectory>
> >    <testSourceDirectory>${basedir}/src/test</testSourceDirectory>
> >    <resources>
> >      <resource>
> >        <directory>${basedir}/conf</directory>
> >        <includes>
> >          <include>*.properties</include>
> >        </includes>
> >        </resource>
> >    </resources>
> >  </build>
> >
> >
> > --
> > Urooj Khan
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>


-- 
Urooj Khan

Re: war plugin error with cargo

Posted by Wayne Fay <wa...@gmail.com>.
That's not your whole pom. Send the whole thing, or even better, post
it on pastebin.org and send us a link.

Wayne

On 4/1/08, Urooj Khan <ur...@gmail.com> wrote:
> hi everyone
>
> i get the following error when i try to
> mvn cargo:deploy -P
>
> [ERROR] BUILD ERROR
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Artifact [emailer:emailer:war] is not a dependency of the project.
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Trace
> org.apache.maven.lifecycle.LifecycleExecutionException: Artifact
> [emailer:emailer:war] is not a dependency of the project.
>        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(
> DefaultLifecycleExecutor.java:564)
>        at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(
> DefaultLifecycleExecutor.java:493)
>        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(
> DefaultLifecycleExecutor.java:463)
>        at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures
> (DefaultLifecycleExecutor.java:311)
>        at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(
> DefaultLifecycleExecutor.java:278)
>        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(
> DefaultLifecycleExecutor.java:143)
>        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:333)
>        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:126)
>        at org.apache.maven.cli.MavenCli.main(MavenCli.java:282)
>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>        at sun.reflect.NativeMethodAccessorImpl.invoke(
> NativeMethodAccessorImpl.java:39)
>        at sun.reflect.DelegatingMethodAccessorImpl.invoke(
> DelegatingMethodAccessorImpl.java:25)
>        at java.lang.reflect.Method.invoke(Method.java:585)
>        at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java
> :315)
>        at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
>        at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java
> :430)
>        at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
> Caused by: org.apache.maven.plugin.MojoExecutionException: Artifact
> [emailer:emailer:war] is not a dependency of the project.
>        at
> org.codehaus.cargo.maven2.configuration.AbstractDependency.findArtifactLocation
> (AbstractDependency.java:110)
>        at
> org.codehaus.cargo.maven2.configuration.Deployable.computeLocation(
> Deployable.java:208)
>        at
> org.codehaus.cargo.maven2.configuration.Deployable.createDeployable(
> Deployable.java:110)
>        at
> org.codehaus.cargo.maven2.AbstractDeployerMojo.performDeployerActionOnAllDeployables
> (AbstractDeployerMojo.java:99)
>        at org.codehaus.cargo.maven2.AbstractDeployerMojo.doExecute(
> AbstractDeployerMojo.java:47)
>        at org.codehaus.cargo.maven2.AbstractCargoMojo.execute(
> AbstractCargoMojo.java:243)
>        at org.apache.maven.plugin.DefaultPluginManager.executeMojo(
> DefaultPluginManager.java:447)
>        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(
> DefaultLifecycleExecutor.java:539)
>        ... 16 more
>
>
> Here is my pom.xml:
>  <build>
> <plugins>
>    <plugin>
>      <groupId>org.apache.maven.plugins</groupId>
>      <artifactId>maven-war-plugin</artifactId>
>      <version>2.0</version>
>      <configuration>
>        <warSourceDirectory>web</warSourceDirectory>
>      </configuration>
>    </plugin>
>  <plugin>
>        <groupId>org.codehaus.cargo</groupId>
>        <artifactId>cargo-maven2-plugin</artifactId>
>        <executions>
>            <execution>
>                <phase>install</phase>
>            </execution>
>        </executions>
>        <configuration>
>          <container>
>            <containerId>tomcat5x</containerId>
>            <type>remote</type>
>          </container>
>          <configuration>
>            <type>runtime</type>
>            <properties>
>              <cargo.remote.username>${tomcat.username
> }</cargo.remote.username>
>              <cargo.remote.password>${tomcat.password
> }</cargo.remote.password>
>              <cargo.hostname>${host.name}</cargo.hostname>
>              <cargo.servlet.port>${host.port}</cargo.servlet.port>
>            </properties>
>          </configuration>
>          <deployer>
>            <type>remote</type>
>            <deployables>
>              <deployable>
>                <groupId>money</groupId>
>                <artifactId>money</artifactId>
>                <type>war</type>
>                <properties>
>                  <context>${tomcat.context}</context>
>                </properties>
>              </deployable>
>            </deployables>
>          </deployer>
>        </configuration>
>      </plugin>
>  </plugins>
>    <sourceDirectory>${basedir}/src/java</sourceDirectory>
>    <testSourceDirectory>${basedir}/src/test</testSourceDirectory>
>    <resources>
>      <resource>
>        <directory>${basedir}/conf</directory>
>        <includes>
>          <include>*.properties</include>
>        </includes>
>        </resource>
>    </resources>
>  </build>
>
>
> --
> Urooj Khan
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org