/** * @return a set of <code>DefaultArtifact</code> * @throws IOException if any * @see #getTypedArtifacts() * @see #getScopedArtifacts() * @see #getReleaseAndSnapshotArtifacts() */ public Set<Artifact> getMixedArtifacts() throws IOException { Set<Artifact> set = new HashSet<Artifact>(); set.addAll( getTypedArtifacts() ); set.addAll( getScopedArtifacts() ); set.addAll( getReleaseAndSnapshotArtifacts() ); return set; }
/** * @return a set of <code>DefaultArtifact</code> * @throws IOException if any * @see #getTypedArtifacts() * @see #getScopedArtifacts() * @see #getReleaseAndSnapshotArtifacts() */ public Set<Artifact> getMixedArtifacts() throws IOException { Set<Artifact> set = new HashSet<Artifact>(); set.addAll( getTypedArtifacts() ); set.addAll( getScopedArtifacts() ); set.addAll( getReleaseAndSnapshotArtifacts() ); return set; }
public BannedDependenciesTestSetup() throws IOException { this.excludes = new ArrayList<String>(); this.includes = new ArrayList<String>(); ArtifactStubFactory factory = new ArtifactStubFactory(); MockProject project = new MockProject(); project.setArtifacts( factory.getMixedArtifacts() ); project.setDependencyArtifacts( factory.getScopedArtifacts() ); this.helper = EnforcerTestUtils.getHelper( project ); this.rule = newBannedDependenciesRule(); this.rule.setMessage( null ); this.rule.setExcludes( this.excludes ); this.rule.setIncludes( this.includes ); }
EnforcerRuleHelper helper = EnforcerTestUtils.getHelper( project ); project.setArtifacts( factory.getMixedArtifacts() ); project.setDependencyArtifacts( factory.getScopedArtifacts() ); RequireReleaseDeps rule = newRequireReleaseDeps(); rule.setSearchTransitive( false );