[HAP-61] "Deploy artifacts to Artifactory" - provide include/exclude patterns Created: 04/Aug/10  Updated: 22/Nov/10  Resolved: 22/Nov/10

Status: Resolved
Project: Jenkins Artifactory Plug-in
Component/s: Maven2
Affects Version/s: None
Fix Version/s: 1.3.6

Type: New Feature Priority: Normal
Reporter: Evgeny Goldin Assignee: Noam Y. Tenne (Inactive)
Resolution: Fixed Votes: 0
Labels: None

Attachments: PNG File 1.png    
Issue Links:
Trigger

 Description   

Today, after job finishes, Hudson plugin deploys all Maven artifacts to Artifactory. Sometimes, it deploys things we don't really need there but Maven marked them as "artifacts" anyway.

For example, our POM creates a large binary "*.tar.gz" file. It still has "<packaging>jar</packaging>" so a small *.jar file is also created, we usually have it set to

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-jar-plugin</artifactId>
    <configuration>
        <includes>
            <include>nothing</include>
        </includes>
    </configuration>
</plugin>

So this small *.jar file and the POM itself ares till deployed to Artifactory even though we really don't need it there.
Sometimes, our POM doesn't even create a new "*.tar.gz" archive for various reasons but we still have this "noise" deployed to Artifactory.

If Hudson plugin had an "include pattern" it could nicely solve this issue as it would only deploy the real data and not something Maven happens to see as an "artifact".

Thank you!



 Comments   
Comment by Evgeny Goldin [ 04/Aug/10 ]

Yossi, can you, please, tell me how do I get to a list of "deploy artifacts" through Maven API? The ones Hudson plugin will deploy after build finishes.

MavenProject.getAttachedArtifacts() returns an empty list. Right now my idea is to clean up this list from a Maven plugin, this will make sure no "garbage" artifacts, like "pom.xml", will be deployed by Hudson.

Comment by Evgeny Goldin [ 04/Aug/10 ]

In the image attached I've marked with read artifacts we do not want to deploy

Comment by Evgeny Goldin [ 04/Aug/10 ]

Ah .. it's kind of hardcoded right now:

So may be in addition to "include pattern" a boolean option to "Deploy default Maven artifacts" can be added?
This way I will be able to disable deployment of Maven's POM artifact and POM itself.

Comment by Tomer Cohen [ 11/Nov/10 ]

Go over UI blocks that are defining the fields.

Generated at Sat Jul 20 09:49:35 UTC 2019 using JIRA 7.6.3#76005-sha1:8a4e38d34af948780dbf52044e7aafb13a7cae58.