Class ProjectInfoReportUtils
java.lang.Object
org.apache.maven.report.projectinfo.ProjectInfoReportUtils
Utilities methods.
- Since:
- 2.1
- Version:
- $Id$
- Author:
- Vincent Siveton
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringgetArchiveServer(String uri) Convenience method to return the name of a web-based mailing list archive server.static StringgetArtifactIdCell(String artifactId, String link) static StringgetContent(URL url, org.apache.maven.project.MavenProject project, org.apache.maven.settings.Settings settings, String encoding) Get the input stream from a URL.static StringgetContent(URL url, org.apache.maven.settings.Settings settings) Get the input stream using UTF-8 as character encoding from a URL.static StringgetContent(URL url, org.apache.maven.settings.Settings settings, String encoding) Get the input stream from a URL.static StringgetProjectUrl(org.apache.maven.project.MavenProject project) static booleanisArtifactUrlValid(String url)
-
Constructor Details
-
ProjectInfoReportUtils
public ProjectInfoReportUtils()
-
-
Method Details
-
getContent
public static String getContent(URL url, org.apache.maven.settings.Settings settings) throws IOException Get the input stream using UTF-8 as character encoding from a URL.- Parameters:
url- not nullsettings- not null to handle proxy settings- Returns:
- the UTF-8 decoded input stream as string
- Throws:
IOException- if any- See Also:
-
getContent
public static String getContent(URL url, org.apache.maven.settings.Settings settings, String encoding) throws IOException Get the input stream from a URL.- Parameters:
url- not nullsettings- not null to handle proxy settingsencoding- the wanted encoding for the URL input stream. If null, UTF-8 will be used.- Returns:
- the input stream decoded with the wanted encoding as string
- Throws:
IOException- if any
-
getContent
public static String getContent(URL url, org.apache.maven.project.MavenProject project, org.apache.maven.settings.Settings settings, String encoding) throws IOException Get the input stream from a URL.- Parameters:
url- not nullproject- could be nullsettings- not null to handle proxy settingsencoding- the wanted encoding for the URL input stream. If null, UTF-8 will be used.- Returns:
- the input stream decoded with the wanted encoding as string
- Throws:
IOException- if any- Since:
- 2.3
-
getProjectUrl
- Parameters:
project- Maven project- Returns:
- the artifact url or null if an error occurred.
-
getArtifactIdCell
- Parameters:
artifactId- not nulllink- could be null- Returns:
- the artifactId cell with or without a link pattern
- See Also:
-
isArtifactUrlValid
- Parameters:
url- not null- Returns:
trueif the url is valid,falseotherwise.
-
getArchiveServer
Convenience method to return the name of a web-based mailing list archive server. For instance, if the archive URI ishttp://www.mail-archive.com/dev@maven.apache.org, this method returnswww.mail-archive.com- Parameters:
uri- the URI parse- Returns:
- the server host of a web-based mailing list archive server
-