@Override public void setUp() throws Exception { super.setUp(); URL pomPath = SpecificationDownloaderMojoTest.class.getResource("pom-downloader.xml"); mojo = (SpecificationDownloaderMojo) lookupMojo("freeze", URIUtil.decoded(pomPath.getPath())); mojo.pluginDependencies = new ArrayList<Artifact>(); mojo.pluginDependencies.add( new DependencyArtifact("commons-codec", dependency("commons-codec-1.3.jar"))); mojo.pluginDependencies.add(new DependencyArtifact("xmlrpc", dependency("xmlrpc-2.0.1.jar"))); }
private String getPath(String fileName) { return URIUtil.decoded( new File(AgentTest.class.getResource("/runners/java/" + fileName).getPath()) .getAbsolutePath()); }
private File spec(String name) { return new File(URIUtil.decoded(SpecificationRunnerMojoTest.class.getResource(name).getPath())); }
private File output(String repo, String name) { return new File(new File(mojo.specsDirectory, repo), URIUtil.flatten(name)); }