Package org.apache.maven.reporting

Examples of org.apache.maven.reporting.MavenReportException


                sourceDependencyCacheDir.mkdirs();
            }
        }
        catch ( IOException e )
        {
            throw new MavenReportException(
                "Failed to delete cache directory: " + sourceDependencyCacheDir + "\nReason: " + e.getMessage(), e );
        }

        final SourceResolverConfig config = getDependencySourceResolverConfig();

        final AndArtifactFilter andFilter = new AndArtifactFilter();

        final List<String> dependencyIncludes = dependencySourceIncludes;
        final List<String> dependencyExcludes = dependencySourceExcludes;

        if ( !includeTransitiveDependencySources || isNotEmpty( dependencyIncludes ) || isNotEmpty(
            dependencyExcludes ) )
        {
            if ( !includeTransitiveDependencySources )
            {
                andFilter.add( createDependencyArtifactFilter() );
            }

            if ( isNotEmpty( dependencyIncludes ) )
            {
                andFilter.add( new PatternIncludesArtifactFilter( dependencyIncludes, false ) );
            }

            if ( isNotEmpty( dependencyExcludes ) )
            {
                andFilter.add( new PatternExcludesArtifactFilter( dependencyExcludes, false ) );
            }

            config.withFilter( andFilter );
        }

        try
        {
            return ResourceResolver.resolveDependencySourcePaths( config );
        }
        catch ( final ArtifactResolutionException e )
        {
            throw new MavenReportException(
                "Failed to resolve one or more javadoc source/resource artifacts:\n\n" + e.getMessage(), e );
        }
        catch ( final ArtifactNotFoundException e )
        {
            throw new MavenReportException(
                "Failed to resolve one or more javadoc source/resource artifacts:\n\n" + e.getMessage(), e );
        }
    }
View Full Code Here


            {
                resolveDependencyBundles();
            }
            catch ( IOException e )
            {
                throw new MavenReportException(
                    "Failed to resolve javadoc bundles from dependencies: " + e.getMessage(), e );
            }

            if ( isNotEmpty( dependencyJavadocBundles ) )
            {
View Full Code Here

                                    getLog().warn( "IGNORED to add some artifacts in the classpath. See above." );
                                }
                                else
                                {
                                    // we can't find all the artifacts in the reactor so bubble the exception up.
                                    throw new MavenReportException( e.getMessage(), e );
                                }
                            }
                            catch ( ArtifactNotFoundException e )
                            {
                                throw new MavenReportException( e.getMessage(), e );
                            }
                            catch ( ArtifactResolutionException e )
                            {
                                throw new MavenReportException( e.getMessage(), e );
                            }

                            if ( result == null )
                            {
                                continue;
                            }

                            populateCompileArtifactMap( compileArtifactMap, getCompileArtifacts( result ) );

                            if ( getLog().isDebugEnabled() )
                            {
                                StringBuilder sb = new StringBuilder();

                                sb.append( "Compiled artifacts for " );
                                sb.append( subProject.getGroupId() ).append( ":" );
                                sb.append( subProject.getArtifactId() ).append( ":" );
                                sb.append( subProject.getVersion() ).append( '\n' );
                                for ( Artifact a : compileArtifactMap.values() )
                                {
                                    sb.append( a.getFile() ).append( '\n' );
                                }

                                getLog().debug( sb.toString() );
                            }
                        }
                    }
                }
            }
            catch ( InvalidDependencyVersionException e )
            {
                throw new MavenReportException( e.getMessage(), e );
            }
        }

        for ( Artifact a : compileArtifactMap.values() )
        {
View Full Code Here

        {
            resolver.resolve( artifact, remoteRepositories, localRepository );
        }
        catch ( ArtifactNotFoundException e )
        {
            throw new MavenReportException( "artifact not found - " + e.getMessage(), e );
        }
        catch ( ArtifactResolutionException e )
        {
            throw new MavenReportException( "artifact resolver problem - " + e.getMessage(), e );
        }
        return artifact;
    }
View Full Code Here

        {
            File file = newArtifact.getFile();

            if ( file == null )
            {
                throw new MavenReportException(
                    "Error in plugin descriptor - " + "dependency was not resolved for artifact: "
                        + newArtifact.getGroupId() + ":" + newArtifact.getArtifactId() + ":"
                        + newArtifact.getVersion() );
            }
View Full Code Here

            {
                resolveDependencyBundles();
            }
            catch ( IOException e )
            {
                throw new MavenReportException(
                    "Failed to resolve javadoc bundles from dependencies: " + e.getMessage(), e );
            }

            if ( isNotEmpty( dependencyJavadocBundles ) )
            {
View Full Code Here

            {
                resolveDependencyBundles();
            }
            catch ( IOException e )
            {
                throw new MavenReportException(
                    "Failed to resolve javadoc bundles from dependencies: " + e.getMessage(), e );
            }

            if ( isNotEmpty( dependencyJavadocBundles ) )
            {
View Full Code Here

            {
                resolveDependencyBundles();
            }
            catch ( IOException e )
            {
                throw new MavenReportException(
                    "Failed to resolve javadoc bundles from dependencies: " + e.getMessage(), e );
            }

            if ( isNotEmpty( dependencyJavadocBundles ) )
            {
View Full Code Here

            {
                resolveDependencyBundles();
            }
            catch ( IOException e )
            {
                throw new MavenReportException(
                    "Failed to resolve javadoc bundles from dependencies: " + e.getMessage(), e );
            }

            if ( isNotEmpty( dependencyJavadocBundles ) )
            {
View Full Code Here

            {
                resolveDependencyBundles();
            }
            catch ( IOException e )
            {
                throw new MavenReportException(
                    "Failed to resolve javadoc bundles from dependencies: " + e.getMessage(), e );
            }

            if ( isNotEmpty( dependencyJavadocBundles ) )
            {
View Full Code Here

TOP

Related Classes of org.apache.maven.reporting.MavenReportException

Copyright © 2018 www.massapicom. 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.