Package com.buschmais.jqassistant.core.store.api

Examples of com.buschmais.jqassistant.core.store.api.Store.beginTransaction()


    }

    @Override
    public Iterable<FileDescriptor> scan(MavenProject project, String path, Scope scope, Scanner scanner) throws IOException {
        Store store = getStore();
        store.beginTransaction();
        MavenProjectDirectoryDescriptor projectDescriptor;
        try {
            projectDescriptor = resolveProject(project, MavenProjectDirectoryDescriptor.class);
            projectDescriptor.setFileName(project.getBasedir().getAbsolutePath());
            projectDescriptor.setPackaging(project.getPackaging());
View Full Code Here


     *            The artifact descriptor representing the test artifact.
     */
    private void addProjectDetails(MavenProject project, MavenProjectDirectoryDescriptor projectDescriptor, ArtifactDescriptor mainArtifactDescriptor,
            ArtifactDescriptor testArtifactDescriptor) {
        Store store = getStore();
        store.beginTransaction();
        try {
            addParent(project, projectDescriptor);
            addModules(project, projectDescriptor);
            addDependencies(project, mainArtifactDescriptor, testArtifactDescriptor, store);
        } finally {
View Full Code Here

        final File directory = new File(directoryName);
        if (!directory.exists()) {
            LOGGER.info("Directory '" + directory.getAbsolutePath() + "' does not exist, skipping scan.");
        } else {
            Store store = getStore();
            store.beginTransaction();
            try {
                final ArtifactDirectoryDescriptor artifactDescriptor = resolveArtifact(artifact, testJar, ArtifactDirectoryDescriptor.class);
                consume(scanner.scan(new ClassesDirectory(directory, artifactDescriptor), directoryName, CLASSPATH));
                projectDescriptor.getCreatesArtifacts().add(artifactDescriptor);
                return artifactDescriptor;
View Full Code Here

     */
    private void scanTestReports(Scanner scanner, String directoryName) throws IOException {
        final File directory = new File(directoryName);
        Store store = getStore();
        if (directory.exists()) {
            store.beginTransaction();
            try {
                consume(scanner.scan(directory, TESTREPORTS), new Consumer<FileDescriptor>() {
                    @Override
                    public void next(FileDescriptor fileDescriptor) {
                    }
View Full Code Here

     */
    protected StoreProvider storeProvider;

    protected <T> T executeInTransaction(StoreOperation<T> operation) throws MojoExecutionException, MojoFailureException {
        final Store store = getStore();
        store.beginTransaction();
        try {
            return operation.run(store);
        } finally {
            store.commitTransaction();
        }
View Full Code Here

    }

    @Override
    public Iterable<FileDescriptor> scan(MavenProject project, String path, Scope scope, Scanner scanner) throws IOException {
        Store store = getStore();
        store.beginTransaction();
        try {
            final ArtifactDescriptor artifact = resolveArtifact(project.getArtifact(), false, ArtifactDescriptor.class);
            for (File file : getPdeFiles(project)) {
                consume(scanner.scan(file, file.getPath(), CLASSPATH), new IterableConsumer.Consumer<FileDescriptor>() {
                    @Override
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.