I'd like to preface my answer below with the small fact that we don't
actually deploy our eclipse plugins in-house, and hence we had not
encountered this issue at the time of writing the article. We have build
machines that run Continuum and locally we all simply do "mvn clean install"
on all our projects. We don't use deployment as we need to create all sorts
of assemblies with our plugins so we orchestrate the process slightly
differently. 

That being said, this is truly an issue with maven's deploy plugin. There is
a hard-coded line in their Mojo, that checks to see if the packaging type of
the project is "pom". If it is, the Mojo will deploy the artifact one way,
and for anything else it expects a file (jar, war, etc.) associated with
what it is deploying. 

A binary-plugin is really a kind-of "pom" packaging, in that it really has
no code and thus no artifact file associated with it. This is also how it is
defined in the components.xml file by giving it an extension of "pom". There
are few ways to work around this if you really need to deploy and not
install. You could modify the deploy mojo so that it understands a
binary-plugin and then include your modified Mojo in the lifecycle defined
for a binary-plugin in components.xml. We will also be revisiting our code
now that we have given it to codehaus.org (under the m2eclipse project) and
we will be sure to fix this issue in the near term. 


Michael Maven wrote:
> 
> I'm trying to use the psteclipse plugin to generate my plugins.  I've read
> the Eclipse Corner Article and generated an example archetype project,
> my-binary-plugin.  I'm getting a LifecycleExecutionException: The
> packaging for this project did not assign a file to the build artifact
> exception out of the build.  Here's the POM and build output below.  Where
> am I supposed to specify the missing name?  When I specify the packaging
> as 'jar' the deploy works.  Also, the jar file with the correct plugin
> Manafest is built in the target\pde-test directory.  Is that all I can
> expect/WAD?
> 
> Best Regards,
>          Michael
> 
> C:\Development\my-binary-plugin>mvn -e deploy
> + Error stacktraces are turned on.
> [INFO] Scanning for projects...
> [INFO]
> -------------------------------------------------------------------------
> ---
> [INFO] Building my-binary-plugin
> [INFO]    task-segment: [deploy]
> [INFO]
> -------------------------------------------------------------------------
> ---
> [INFO] [psteclipse:update {execution: update}]
> [INFO] Defaulting prefixes to the single prefix 'my-binary-plugin'.
> [INFO] [psteclipse:testPackage {execution: test-package}]
> [INFO] [site:attach-descriptor]
> [INFO] [psteclipse:install]
> [INFO] Installing C:\Development\my-binary-plugin\pom.xml to C:\Documents
> and Se
> ttings\user\.m2\repository\com\mycompany\app\my-binary-plugin\1.0-SNAPSHOT\my-
> binary-plugin-1.0-SNAPSHOT.pom
> [INFO] [deploy:deploy]
> [INFO]
> ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO]
> ------------------------------------------------------------------------
> [INFO] The packaging for this project did not assign a file to the build
> artifac
> t
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Trace
> org.apache.maven.lifecycle.LifecycleExecutionException: The packaging for
> this p
> roject did not assign a file to the build artifact
>         at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
> ultLifecycleExecutor.java:564)
>         at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLi
> fecycle(DefaultLifecycleExecutor.java:480)
>         at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau
> ltLifecycleExecutor.java:459)
>         at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan
> dleFailures(DefaultLifecycleExecutor.java:311)
>         at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen
> ts(DefaultLifecycleExecutor.java:278)
>         at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi
> fecycleExecutor.java:143)
>         at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:334)
>         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125)
>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:272)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
> java:39)
>         at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
> sorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:597)
>         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: The packaging
> for thi
> s project did not assign a file to the build artifact
>         at
> org.apache.maven.plugin.deploy.DeployMojo.execute(DeployMojo.java:130
> )
>         at
> org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi
> nManager.java:443)
>         at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
> ultLifecycleExecutor.java:539)
>         ... 16 more
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Total time: 3 seconds
> [INFO] Finished at: Wed Apr 18 08:53:44 MDT 2007
> [INFO] Final Memory: 9M/17M
> [INFO]
> ------------------------------------------------------------------------
> 
> 

-- 
View this message in context: 
http://www.nabble.com/LifecycleExecutionException%3A-The-packaging-for-this-project-did-not-assign-a-file-to-the-build-artifact-tf3601245s177.html#a10149566
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to