Jim,

Thanks for the help.  My assembly descriptor has some deprecated
elements (moduleSet/binaries) so I'm not sure I can expect Maven to
contribute the built zip to the project.

I have just given the build-helper-maven-plugin attach-artifact a go
and it fails with the following message:

[ERROR] Failed to execute goal org.codehaus.mojo:build-helper-maven-
plugin:1.7:attach-artifact (default-cli) on project
BELFrameworkMaster: The parameters 'artifacts' for goal
org.codehaus.mojo:build-helper-maven-plugin:1.7:attach-artifact are
missing or invalid -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to
execute goal org.codehaus.mojo:build-helper-maven-plugin:1.7:attach-
artifact (default-cli) on project BELFrameworkMaster: The parameters
'artifacts' for goal org.codehaus.mojo:build-helper-maven-plugin:
1.7:attach-artifact are missing or invalid
        at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:
221)
        at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:
153)
        at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:
145)
        at
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:
84)
        at
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:
59)
        at
org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:
183)
        at
org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:
161)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:
319)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:
156)
        at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
        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:597)
        at
org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:
290)
        at
org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:
230)
        at
org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:
409)
        at
org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:
352)
Caused by: org.apache.maven.plugin.PluginParameterException: The
parameters 'artifacts' for goal org.codehaus.mojo:build-helper-maven-
plugin:1.7:attach-artifact are missing or invalid
        at
org.apache.maven.plugin.internal.DefaultMavenPluginManager.populatePluginFields(DefaultMavenPluginManager.java:
576)
        at
org.apache.maven.plugin.internal.DefaultMavenPluginManager.getConfiguredMojo(DefaultMavenPluginManager.java:
529)
        at
org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:
92)
        at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:
209)
        ... 19 more

The plugin was defined and called after my "assembly:assembly" goal:

<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>1.7</version>
<executions>
    <execution>
        <id>attach-artifacts</id>
        <goals>
            <goal>attach-artifact</goal>
        </goals>
        <configuration>
            <artifacts>
                <artifact>
                    <file>target/project-${release.version}.zip</file>
                    <type>zip</type>
                </artifact>
            </artifacts>
            <runOnlyAtExecutionRoot>true</runOnlyAtExecutionRoot>
        </configuration>
    </execution>
</executions>
</plugin>

I don't see an issue with my artifact configuration given that the
relative
file patch should be accessible from the execution root.

Any ideas here?

Thanks!
Tony Bargnesi

On Mar 28, 2:00 pm, Jim McCaskey <jim.mccas...@pervasive.com> wrote:
> Tony,
>
> Jenkins should pick up things generated by the maven assembly plugin.  Having 
> said that, could you not use the build-helper-maven plugins attach-artifact 
> goal to attach the zip file to your Maven project:
>
> http://mojo.codehaus.org/build-helper-maven-plugin/attach-artifact-mo...
>
> After that Maven and Jenkins would do what comes naturally.
>
> -Jim
>
>
>
>
>
>
>
> -----Original Message-----
> From: jenkinsci-users@googlegroups.com 
> [mailto:jenkinsci-users@googlegroups.com] On Behalf Of abargnesi
> Sent: Wednesday, March 28, 2012 12:47 PM
> To: Jenkins Users
> Subject: Using relative paths when deploying ZIP artifact using Jenkins 
> Artifactory Plugin
>
> Hello,
>
> I have a ZIP file generated by a maven assembly that I want to install
> into an artifactory instance.  This ZIP file is not an artifact of the
> maven build so it is not picked up by the Maven3 artifactory
> deployment.  I instead enabled Generic-Artifactory Integration and
> mapped that zip file to a path on artifactory.
>
> The problem is it always appends the relative path of the ZIP file to
> the deployment path on artifactory.  My goal is to deploy into a
> standard maven layout GROUP_ID/ARTIFACT_ID/VERSION.  Is this possible
> from the jenkins artifactory plugin?
>
> Thanks!
> Tony Bargnesi

Reply via email to