/** * @return a <code>DefaultArtifact</code> instance for <code>testGroupId:release:jar:1.0</code> * @throws IOException if any */ public Artifact getReleaseArtifact() throws IOException { return createArtifact( "testGroupId", "release", "1.0" ); }
/** * @return a default <code>DefaultArtifact</code> instance for <code>testGroupId:snapshot:jar:2.0-SNAPSHOT</code> * @throws IOException if any */ public Artifact getSnapshotArtifact() throws IOException { return createArtifact( "testGroupId", "snapshot", "2.0-SNAPSHOT" ); }
/** * @param groupId * @param artifactId * @param version * @param scope * @return a <code>DefaultArtifact</code> instance for the given parameters * @throws IOException if any * @see #createArtifact(String, String, String, String, String, String) */ public Artifact createArtifact( String groupId, String artifactId, String version, String scope ) throws IOException { return createArtifact( groupId, artifactId, version, scope, "jar", "" ); }
/** * @param groupId * @param artifactId * @param version * @return a <code>DefaultArtifact</code> instance for the given parameters * @throws IOException if any * @see #createArtifact(String, String, String, String, String, String) */ public Artifact createArtifact( String groupId, String artifactId, String version ) throws IOException { return createArtifact( groupId, artifactId, version, Artifact.SCOPE_COMPILE, "jar", "" ); }
/** * @return a set of <code>DefaultArtifact</code>, i.e.: * <code>g:d:zip:1.0, g:a:war:1.0, g:b:jar:1.0, g:c:sources:1.0, g:e:rar:1.0</code> * @throws IOException if any */ public Set<Artifact> getTypedArtifacts() throws IOException { Set<Artifact> set = new HashSet<Artifact>(); set.add( createArtifact( "g", "a", "1.0", Artifact.SCOPE_COMPILE, "war", null ) ); set.add( createArtifact( "g", "b", "1.0", Artifact.SCOPE_COMPILE, "jar", null ) ); set.add( createArtifact( "g", "c", "1.0", Artifact.SCOPE_COMPILE, "sources", null ) ); set.add( createArtifact( "g", "d", "1.0", Artifact.SCOPE_COMPILE, "zip", null ) ); set.add( createArtifact( "g", "e", "1.0", Artifact.SCOPE_COMPILE, "rar", null ) ); return set; }
/** * @return a set of <code>DefaultArtifact</code>, i.e.: * <code>one:group-one:jar:a:1.0, three:group-three:jar:a:1.0, four:group-four:jar:a:1.0, * two:group-two:jar:a:1.0</code> * @throws IOException if any */ public Set<Artifact> getGroupIdArtifacts() throws IOException { Set<Artifact> set = new HashSet<Artifact>(); set.add( createArtifact( "one", "group-one", "1.0", Artifact.SCOPE_COMPILE, "jar", "a" ) ); set.add( createArtifact( "two", "group-two", "1.0", Artifact.SCOPE_COMPILE, "jar", "a" ) ); set.add( createArtifact( "three", "group-three", "1.0", Artifact.SCOPE_COMPILE, "jar", "a" ) ); set.add( createArtifact( "four", "group-four", "1.0", Artifact.SCOPE_COMPILE, "jar", "a" ) ); return set; }
/** * @return a set of <code>DefaultArtifact</code>, i.e.: * <code>g:c:jar:three:1.0, g:b:jar:two:1.0, g:d:jar:four:1.0, g:a:jar:one:1.0</code> * @throws IOException if any */ public Set<Artifact> getClassifiedArtifacts() throws IOException { Set<Artifact> set = new HashSet<Artifact>(); set.add( createArtifact( "g", "a", "1.0", Artifact.SCOPE_COMPILE, "jar", "one" ) ); set.add( createArtifact( "g", "b", "1.0", Artifact.SCOPE_COMPILE, "jar", "two" ) ); set.add( createArtifact( "g", "c", "1.0", Artifact.SCOPE_COMPILE, "jar", "three" ) ); set.add( createArtifact( "g", "d", "1.0", Artifact.SCOPE_COMPILE, "jar", "four" ) ); return set; }
/** * @return a set of <code>DefaultArtifact</code>, i.e.: * <code>g:d:zip:1.0, g:a:war:1.0, g:b:jar:1.0, g:e:rar:1.0</code> * @throws IOException if any */ public Set<Artifact> getTypedArchiveArtifacts() throws IOException { Set<Artifact> set = new HashSet<Artifact>(); set.add( createArtifact( "g", "a", "1.0", Artifact.SCOPE_COMPILE, "war", null ) ); set.add( createArtifact( "g", "b", "1.0", Artifact.SCOPE_COMPILE, "jar", null ) ); set.add( createArtifact( "g", "d", "1.0", Artifact.SCOPE_COMPILE, "zip", null ) ); set.add( createArtifact( "g", "e", "1.0", Artifact.SCOPE_COMPILE, "rar", null ) ); return set; }
/** * @return a set of <code>DefaultArtifact</code>, i.e.: * <code>g:one:jar:a:1.0, g:two:jar:a:1.0, g:four:jar:a:1.0, g:three:jar:a:1.0</code> * @throws IOException if any */ public Set<Artifact> getArtifactArtifacts() throws IOException { Set<Artifact> set = new HashSet<Artifact>(); set.add( createArtifact( "g", "one", "1.0", Artifact.SCOPE_COMPILE, "jar", "a" ) ); set.add( createArtifact( "g", "two", "1.0", Artifact.SCOPE_COMPILE, "jar", "a" ) ); set.add( createArtifact( "g", "three", "1.0", Artifact.SCOPE_COMPILE, "jar", "a" ) ); set.add( createArtifact( "g", "four", "1.0", Artifact.SCOPE_COMPILE, "jar", "a" ) ); return set; }
/** * @return a default set of <code>DefaultArtifact</code>, i.e.: * <code>g:provided:jar:1.0, g:compile:jar:1.0, g:system:jar:1.0, g:test:jar:1.0, g:runtime:jar:1.0</code> * @throws IOException if any */ public Set<Artifact> getScopedArtifacts() throws IOException { Set<Artifact> set = new HashSet<Artifact>(); set.add( createArtifact( "g", "compile", "1.0", Artifact.SCOPE_COMPILE ) ); set.add( createArtifact( "g", "provided", "1.0", Artifact.SCOPE_PROVIDED ) ); set.add( createArtifact( "g", "test", "1.0", Artifact.SCOPE_TEST ) ); set.add( createArtifact( "g", "runtime", "1.0", Artifact.SCOPE_RUNTIME ) ); set.add( createArtifact( "g", "system", "1.0", Artifact.SCOPE_SYSTEM ) ); return set; }
/** * @param groupId * @param artifactId * @param version * @param scope * @param type * @param classifier * @return a <code>DefaultArtifact</code> instance for the given parameters * @throws IOException if any * @see #createArtifact(String, String, VersionRange, String, String, String, boolean) */ public Artifact createArtifact( String groupId, String artifactId, String version, String scope, String type, String classifier ) throws IOException { VersionRange vr = VersionRange.createFromVersion( version ); return createArtifact( groupId, artifactId, vr, scope, type, classifier, false ); }
/** * @return a <code>DefaultArtifact</code> instance for <code>testGroupId:release:jar:1.0</code> * @throws IOException if any */ public Artifact getReleaseArtifact() throws IOException { return createArtifact( "testGroupId", "release", "1.0" ); }
/** * @return a default <code>DefaultArtifact</code> instance for <code>testGroupId:snapshot:jar:2.0-SNAPSHOT</code> * @throws IOException if any */ public Artifact getSnapshotArtifact() throws IOException { return createArtifact( "testGroupId", "snapshot", "2.0-SNAPSHOT" ); }
/** * @param groupId * @param artifactId * @param version * @param scope * @return a <code>DefaultArtifact</code> instance for the given parameters * @throws IOException if any * @see #createArtifact(String, String, String, String, String, String) */ public Artifact createArtifact( String groupId, String artifactId, String version, String scope ) throws IOException { return createArtifact( groupId, artifactId, version, scope, "jar", "" ); }
/** * @param groupId * @param artifactId * @param version * @return a <code>DefaultArtifact</code> instance for the given parameters * @throws IOException if any * @see #createArtifact(String, String, String, String, String, String) */ public Artifact createArtifact( String groupId, String artifactId, String version ) throws IOException { return createArtifact( groupId, artifactId, version, Artifact.SCOPE_COMPILE, "jar", "" ); }
/** * @return a set of <code>DefaultArtifact</code>, i.e.: * <code>g:c:jar:three:1.0, g:b:jar:two:1.0, g:d:jar:four:1.0, g:a:jar:one:1.0</code> * @throws IOException if any */ public Set<Artifact> getClassifiedArtifacts() throws IOException { Set<Artifact> set = new HashSet<Artifact>(); set.add( createArtifact( "g", "a", "1.0", Artifact.SCOPE_COMPILE, "jar", "one" ) ); set.add( createArtifact( "g", "b", "1.0", Artifact.SCOPE_COMPILE, "jar", "two" ) ); set.add( createArtifact( "g", "c", "1.0", Artifact.SCOPE_COMPILE, "jar", "three" ) ); set.add( createArtifact( "g", "d", "1.0", Artifact.SCOPE_COMPILE, "jar", "four" ) ); return set; }
/** * @return a set of <code>DefaultArtifact</code>, i.e.: * <code>g:one:jar:a:1.0, g:two:jar:a:1.0, g:four:jar:a:1.0, g:three:jar:a:1.0</code> * @throws IOException if any */ public Set<Artifact> getArtifactArtifacts() throws IOException { Set<Artifact> set = new HashSet<Artifact>(); set.add( createArtifact( "g", "one", "1.0", Artifact.SCOPE_COMPILE, "jar", "a" ) ); set.add( createArtifact( "g", "two", "1.0", Artifact.SCOPE_COMPILE, "jar", "a" ) ); set.add( createArtifact( "g", "three", "1.0", Artifact.SCOPE_COMPILE, "jar", "a" ) ); set.add( createArtifact( "g", "four", "1.0", Artifact.SCOPE_COMPILE, "jar", "a" ) ); return set; }
/** * @return a set of <code>DefaultArtifact</code>, i.e.: * <code>one:group-one:jar:a:1.0, three:group-three:jar:a:1.0, four:group-four:jar:a:1.0, * two:group-two:jar:a:1.0</code> * @throws IOException if any */ public Set<Artifact> getGroupIdArtifacts() throws IOException { Set<Artifact> set = new HashSet<Artifact>(); set.add( createArtifact( "one", "group-one", "1.0", Artifact.SCOPE_COMPILE, "jar", "a" ) ); set.add( createArtifact( "two", "group-two", "1.0", Artifact.SCOPE_COMPILE, "jar", "a" ) ); set.add( createArtifact( "three", "group-three", "1.0", Artifact.SCOPE_COMPILE, "jar", "a" ) ); set.add( createArtifact( "four", "group-four", "1.0", Artifact.SCOPE_COMPILE, "jar", "a" ) ); return set; }
/** * @return a default set of <code>DefaultArtifact</code>, i.e.: * <code>g:provided:jar:1.0, g:compile:jar:1.0, g:system:jar:1.0, g:test:jar:1.0, g:runtime:jar:1.0</code> * @throws IOException if any */ public Set<Artifact> getScopedArtifacts() throws IOException { Set<Artifact> set = new HashSet<Artifact>(); set.add( createArtifact( "g", "compile", "1.0", Artifact.SCOPE_COMPILE ) ); set.add( createArtifact( "g", "provided", "1.0", Artifact.SCOPE_PROVIDED ) ); set.add( createArtifact( "g", "test", "1.0", Artifact.SCOPE_TEST ) ); set.add( createArtifact( "g", "runtime", "1.0", Artifact.SCOPE_RUNTIME ) ); set.add( createArtifact( "g", "system", "1.0", Artifact.SCOPE_SYSTEM ) ); return set; }
/** * @return a set of <code>DefaultArtifact</code>, i.e.: * <code>g:d:zip:1.0, g:a:war:1.0, g:b:jar:1.0, g:e:rar:1.0</code> * @throws IOException if any */ public Set<Artifact> getTypedArchiveArtifacts() throws IOException { Set<Artifact> set = new HashSet<Artifact>(); set.add( createArtifact( "g", "a", "1.0", Artifact.SCOPE_COMPILE, "war", null ) ); set.add( createArtifact( "g", "b", "1.0", Artifact.SCOPE_COMPILE, "jar", null ) ); set.add( createArtifact( "g", "d", "1.0", Artifact.SCOPE_COMPILE, "zip", null ) ); set.add( createArtifact( "g", "e", "1.0", Artifact.SCOPE_COMPILE, "rar", null ) ); return set; }