Java Code Examples for org.apache.maven.artifact.Artifact#isSnapshot()

The following examples show how to use org.apache.maven.artifact.Artifact#isSnapshot() . These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: appassembler   File:    License: MIT License 5 votes vote down vote up
 * Used by AssembleMojo and JavaServiceWrapperDaemonGenerator.
 * @param artifact {@link Artifact}
 * @param layout {@link ArtifactRepositoryLayout}
 * @param useTimestampInSnapshotFileName timestamp or not.
 * @param outputFileNameMapping The name mapping.
 * @return the dependency.
public static Dependency create(Artifact artifact, ArtifactRepositoryLayout layout,
                                boolean useTimestampInSnapshotFileName, String outputFileNameMapping)
    Dependency dependency = create( artifact, layout, outputFileNameMapping );

    if ( artifact.isSnapshot() && !useTimestampInSnapshotFileName )
        dependency.setRelativePath( ArtifactUtils.pathBaseVersionOf( layout, artifact ) );

    return dependency;
Example 2
private Set<String> getSnapshotPluginDeps() {
    Set<String> snapshotPluginDeps = new HashSet<>();
    for (Artifact plugin : project.getPluginArtifacts()) {
        if (plugin.isSnapshot()) {
            if (allowGitflowPluginSnapshot && plugin.getGroupId().equals("com.e-gineering") && plugin.getArtifactId().equals("gitflow-helper-maven-plugin")) {
                getLog().warn("SNAPSHOT com.e-gineering:gitflow-helper-maven-plugin detected. Allowing for this build.");
            getLog().debug("SNAPSHOT plugin dependency found: " + plugin.toString());

    return snapshotPluginDeps;
Example 3
public boolean shouldSkipArtifact(Artifact artifact) {
    return artifact.isSnapshot();