You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by jgant <jo...@gmail.com> on 2007/02/24 18:33:40 UTC

basic use of assembly plugin failing

Hello,
I'm trying to do something simple, create a jar that contains all dependency
jars. I am attempting to use the assembly plugin with the predefined
"jar-with-dependencies" descriptor, and using the assembly:assembly goal.
Below are my pom.xml and the error thrown. Thanks for the help!

<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>org.blah.blah</groupId>
  <artifactId>generic-scrapers</artifactId>
  <packaging>jar</packaging>
  <version>1.0</version>
  <name>generic-scrapers</name>
  <url>http://maven.apache.org</url>
  <dependencies>
    <dependency>
      <groupId>log4j</groupId>
      <artifactId>log4j</artifactId>
      <version>1.2.14</version>
    </dependency>
  </dependencies>
  <build>
  <plugins>
    <plugin>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-surefire-plugin</artifactId>
    </plugin>
    <plugin>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-compiler-plugin</artifactId>
      <configuration>
        <source>1.5</source>
        <target>1.5</target>
      </configuration>
    </plugin>
    <plugin>
      <artifactId>maven-assembly-plugin</artifactId>
      <configuration>
        <descriptorRefs>
          <descriptorRef>jar-with-dependencies</descriptorRef>
        </descriptorRefs>
      </configuration>
      </plugin>
  </plugins>
  </build>
</project>
</POM.XML>


<SYSOUT>
+ Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'assembly'.
[INFO]
----------------------------------------------------------------------------
[INFO] Building generic-scrapers
[INFO]    task-segment: [assembly:assembly] (aggregator-style)
[INFO]
----------------------------------------------------------------------------
[INFO] Preparing assembly:assembly
[INFO]
----------------------------------------------------------------------------
[INFO] Building generic-scrapers
[INFO]
----------------------------------------------------------------------------
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO]
------------------------------------------------------------------------
[INFO] The plugin 'org.apache.maven.plugins:maven-surefire-plugin' does not
exist or no valid version could be found
[INFO]
------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: The plugin
'org.apache.maven.plugins:maven-surefire-plugin' does not exist or no valid
version could be found
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.verifyPlugin(DefaultLifecycleExecutor.java:1281)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.getMojoDescriptor(DefaultLifecycleExecutor.java:1517)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.bindLifecycleForPackaging(DefaultLifecycleExecutor.java:1011)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.constructLifecycleMappings(DefaultLifecycleExecutor.java:975)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.forkProjectLifecycle(DefaultLifecycleExecutor.java:754)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.forkLifecycle(DefaultLifecycleExecutor.java:729)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:505)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:488)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:458)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:306)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:219)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:140)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:256)
        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.version.PluginVersionNotFoundException:
The plugin 'org.apache.maven.plugins:maven-surefire-plugin' does not exist
or no valid version could be found
        at
org.apache.maven.plugin.version.DefaultPluginVersionManager.resolvePluginVersion(DefaultPluginVersionManager.java:225)
        at
org.apache.maven.plugin.version.DefaultPluginVersionManager.resolvePluginVersion(DefaultPluginVersionManager.java:87)
        at
org.apache.maven.plugin.DefaultPluginManager.verifyPlugin(DefaultPluginManager.java:158)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.verifyPlugin(DefaultLifecycleExecutor.java:1252)
        ... 22 more
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 2 seconds
[INFO] Finished at: Sat Feb 24 12:32:47 EST 2007
[INFO] Final Memory: 2M/5M
[INFO]
------------------------------------------------------------------------

</SYSOUT>
-- 
View this message in context: http://www.nabble.com/basic-use-of-assembly-plugin-failing-tf3284413s177.html#a9135974
Sent from the Maven - Users mailing list archive at Nabble.com.


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


Re: [m2] basic use of assembly plugin failing

Posted by jgant <jo...@gmail.com>.
Thanks Wendy! Your solution solved my problem. I've noticed the surfire
plugin causing alot of headaches with other projects, is this plugin buggy?
Maven devs, why do I need to delete the plugin for this to "fix" itself?


Wendy Smoak-3 wrote:
> 
> On 2/24/07, jgant <jo...@gmail.com> wrote:
>>
>> Hello,
>> I'm trying to do something simple, create a jar that contains all
>> dependency
>> jars. I am attempting to use the assembly plugin with the predefined
>> "jar-with-dependencies" descriptor, and using the assembly:assembly goal.
>> Below are my pom.xml and the error thrown. Thanks for the help!
> ...
>> [ERROR] BUILD ERROR
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] The plugin 'org.apache.maven.plugins:maven-surefire-plugin' does
>> not
>> exist or no valid version could be found
> 
> You're not getting as far as the assembly, Maven can't find the
> Surefire plugin, (which runs unit tests).
> 
> If you're using the central repository, check your internet
> connection, especially if you're behind a proxy.  Otherwise, check the
> connection to whatever repository you're using.
> 
> If that all seems fine, try deleting
> ~/.m2/repository/org/apache/maven/plugins/maven-surefire-plugin and
> try the build again.  I have no idea why this happens, but often
> deleting the plugin from your local repository and forcing Maven to
> download it again will fix the problem.
> 
> -- 
> Wendy
> 
> -- 
> Wendy
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/basic-use-of-assembly-plugin-failing-tf3284413s177.html#a9137567
Sent from the Maven - Users mailing list archive at Nabble.com.


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


Re: basic use of assembly plugin failing

Posted by Wendy Smoak <ws...@gmail.com>.
On 2/24/07, jgant <jo...@gmail.com> wrote:
>
> Hello,
> I'm trying to do something simple, create a jar that contains all dependency
> jars. I am attempting to use the assembly plugin with the predefined
> "jar-with-dependencies" descriptor, and using the assembly:assembly goal.
> Below are my pom.xml and the error thrown. Thanks for the help!
...
> [ERROR] BUILD ERROR
> [INFO]
> ------------------------------------------------------------------------
> [INFO] The plugin 'org.apache.maven.plugins:maven-surefire-plugin' does not
> exist or no valid version could be found

You're not getting as far as the assembly, Maven can't find the
Surefire plugin, (which runs unit tests).

If you're using the central repository, check your internet
connection, especially if you're behind a proxy.  Otherwise, check the
connection to whatever repository you're using.

If that all seems fine, try deleting
~/.m2/repository/org/apache/maven/plugins/maven-surefire-plugin and
try the build again.  I have no idea why this happens, but often
deleting the plugin from your local repository and forcing Maven to
download it again will fix the problem.

-- 
Wendy

-- 
Wendy

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