Search in sources :

Example 6 with Workspace

use of aQute.bnd.build.Workspace in project bnd by bndtools.

the class WorkspaceTest method testPropertyDefaulting.

public void testPropertyDefaulting() throws Exception {
    try (Workspace ws = Workspace.getWorkspace(IO.getFile("testresources/ws-defaulting"))) {
        Project p = ws.getProject("p1");
        assertEquals("defaults", p.getProperty("myprop1"));
        assertEquals("workspace", p.getProperty("myprop2"));
        assertEquals("project", p.getProperty("myprop3"));
        assertEquals("src", p.mergeProperties("src"));
    }
}
Also used : Project(aQute.bnd.build.Project) Workspace(aQute.bnd.build.Workspace)

Example 7 with Workspace

use of aQute.bnd.build.Workspace in project bnd by bndtools.

the class WorkspaceTest method testNestedWorkspace.

public void testNestedWorkspace() throws Exception {
    try (Workspace ws = Workspace.getWorkspace(IO.getFile("testresources/redirectws/wss/ws"))) {
        assertEquals("true", ws.getProperty("testcnf"));
        assertEquals("true", ws.getProperty("ext"));
    }
}
Also used : Workspace(aQute.bnd.build.Workspace)

Example 8 with Workspace

use of aQute.bnd.build.Workspace in project bnd by bndtools.

the class WorkspaceBundleVersionedDependencyTest method testWorkspaceVersionedDependencyWithSubbundle.

public static void testWorkspaceVersionedDependencyWithSubbundle() throws Exception {
    IO.copy(IO.getFile("testresources/ws-versioneddependencies-withsubbundle"), IO.getFile("generated/ws-versioneddependencies-withsubbundle"));
    Workspace ws = Workspace.getWorkspace(IO.getFile("generated/ws-versioneddependencies-withsubbundle"));
    ws.getProject("mydependency").build();
    Project project = ws.getProject("myconsumer");
    project.clean();
    project.build();
    assertTrue(project.check());
}
Also used : Project(aQute.bnd.build.Project) Workspace(aQute.bnd.build.Workspace)

Example 9 with Workspace

use of aQute.bnd.build.Workspace in project bnd by bndtools.

the class WorkspaceBundleVersionedDependencyTest method testWorkspaceVersionedDependency.

public static void testWorkspaceVersionedDependency() throws Exception {
    IO.copy(IO.getFile("testresources/ws-versioneddependencies"), IO.getFile("generated/ws-versioneddependencies"));
    Workspace ws = Workspace.getWorkspace(IO.getFile("generated/ws-versioneddependencies"));
    Project project = ws.getProject("myconsumer");
    project.clean();
    project.build();
    assertTrue(project.check());
}
Also used : Project(aQute.bnd.build.Project) Workspace(aQute.bnd.build.Workspace)

Example 10 with Workspace

use of aQute.bnd.build.Workspace in project bnd by bndtools.

the class WorkspaceRepositoryTest method setUp.

public void setUp() throws Exception {
    workspace = new Workspace(IO.getFile("testresources/ws-repo-test"));
    repo = new WorkspaceRepository(workspace);
}
Also used : WorkspaceRepository(aQute.bnd.build.WorkspaceRepository) Workspace(aQute.bnd.build.Workspace)

Aggregations

Workspace (aQute.bnd.build.Workspace)171 Project (aQute.bnd.build.Project)71 File (java.io.File)66 Processor (aQute.bnd.osgi.Processor)27 HashMap (java.util.HashMap)22 IOException (java.io.IOException)20 ArrayList (java.util.ArrayList)19 Container (aQute.bnd.build.Container)17 RepositoryPlugin (aQute.bnd.service.RepositoryPlugin)13 Version (aQute.bnd.version.Version)13 Run (aQute.bnd.build.Run)11 IProject (org.eclipse.core.resources.IProject)11 CoreException (org.eclipse.core.runtime.CoreException)10 IResource (org.eclipse.core.resources.IResource)8 BndEditModel (aQute.bnd.build.model.BndEditModel)7 Description (aQute.lib.getopt.Description)7 Bndrun (biz.aQute.resolve.Bndrun)7 Attrs (aQute.bnd.header.Attrs)5 HttpClient (aQute.bnd.http.HttpClient)5 Jar (aQute.bnd.osgi.Jar)5