Permalink
Browse files

Some code formatting.

  • Loading branch information...
1 parent 4582786 commit 3d0e1b63ff9809449e4df6aa02ca449955701d9c @nawroth nawroth committed Dec 9, 2011
Showing with 16 additions and 12 deletions.
  1. +16 −12 src/main/java/org/neo4j/build/plugins/docs/DocsAssembler.java
@@ -44,6 +44,10 @@
public final class DocsAssembler
{
+ private static final String TYPE = "jar";
+
+ private static final String CLASSIFIER = "docs";
+
private static final int BUFFER_SIZE = 1024;
private int currentBaseDirPathLength;
@@ -75,10 +79,10 @@ public DocsAssembler( final MavenProject project, final Log log,
this.session = session;
}
- static File assemble( final List<String> sourceDirectories, final boolean filter,
- final Log log,
- MavenSession session, final MavenProject project,
- final MavenProjectHelper projectHelper, MavenResourcesFiltering resourceFiltering )
+ static File assemble( final List<String> sourceDirectories,
+ final boolean filter, final Log log, MavenSession session,
+ final MavenProject project, final MavenProjectHelper projectHelper,
+ MavenResourcesFiltering resourceFiltering )
throws MojoExecutionException
{
DocsAssembler assembler = new DocsAssembler( project, log,
@@ -87,8 +91,7 @@ static File assemble( final List<String> sourceDirectories, final boolean filter
}
private File doAssembly( final List<String> sourceDirectories,
- final boolean filter )
- throws MojoExecutionException
+ final boolean filter ) throws MojoExecutionException
{
getLog().info( "Filtering is: " + ( filter ? "on" : "off" ) );
List<File> dirs = getDirectories( sourceDirectories );
@@ -107,7 +110,7 @@ private File doAssembly( final List<String> sourceDirectories,
destFile = createArchive( dirs );
}
- projectHelper.attachArtifact( project, "jar", "docs", destFile );
+ projectHelper.attachArtifact( project, TYPE, CLASSIFIER, destFile );
return destFile;
}
@@ -118,7 +121,8 @@ private File createArchive( final List<File> directories )
getLog().info( "Creating docs archive." );
final String filename = project.getArtifactId() + "-"
- + project.getVersion() + "-docs.jar";
+ + project.getVersion() + "-" + CLASSIFIER + "."
+ + TYPE;
final File destFile = new File( project.getBuild()
.getDirectory(), filename );
if ( destFile.exists() && !destFile.delete() )
@@ -182,8 +186,8 @@ private void filterResources( final List<File> directories, File targetDir )
MavenResourcesExecution resourcesExecution = new MavenResourcesExecution(
resources, targetDir, project, "UTF-8",
- Collections.<Object>emptyList(),
- Collections.emptyList(), session );
+ Collections.<Object>emptyList(), Collections.emptyList(),
+ session );
resourcesExecution.setResourcesBaseDirectory( project.getBasedir() );
resourcesExecution.addFilterWrapper( new FileUtils.FilterWrapper()
{
@@ -261,9 +265,9 @@ private void zipDirectory( final ZipOutputStream zipOut, final File dir )
// add default directories
// ./src/docs and ./target/docs
addDirectory( new File( new File( project.getBasedir(), "src" ),
- "docs" ), directories );
+ CLASSIFIER ), directories );
addDirectory( new File( project.getBuild()
- .getDirectory(), "docs" ), directories );
+ .getDirectory(), CLASSIFIER ), directories );
}
else
{

0 comments on commit 3d0e1b6

Please sign in to comment.