com.github.maven_nar
Class NarLayout20

java.lang.Object
  extended by com.github.maven_nar.AbstractNarLayout
      extended by com.github.maven_nar.NarLayout20
All Implemented Interfaces:
NarConstants, NarLayout

public class NarLayout20
extends AbstractNarLayout

Initial layout which expands a nar file into:

 nar/includue
 nar/bin
 nar/lib
 
this layout was abandoned because there is no one-to-one relation between the nar file and its directory structure. Therefore SNAPSHOTS could not be fully deleted when replaced.

Author:
Mark Donszelmann (Mark.Donszelmann@gmail.com)

Field Summary
 
Fields inherited from interface com.github.maven_nar.NarConstants
LOG_LEVEL_DEBUG, LOG_LEVEL_ERROR, LOG_LEVEL_INFO, LOG_LEVEL_VERBOSE, LOG_LEVEL_WARNING, NAR, NAR_AOL, NAR_EXTENSION, NAR_NO_ARCH, NAR_ROLE_HINT, NAR_TYPE
 
Constructor Summary
NarLayout20(org.apache.maven.plugin.logging.Log log)
           
 
Method Summary
 void attachNars(File baseDir, org.codehaus.plexus.archiver.manager.ArchiverManager archiverManager, org.apache.maven.project.MavenProjectHelper projectHelper, org.apache.maven.project.MavenProject project)
          Called to attach nars to main nar/jar file.
 File getBinDirectory(File baseDir, String artifactId, String version, String aol)
          Specifies where binaries are stored
 File getIncludeDirectory(File baseDir, String artifactId, String version)
          Specifies where includes are stored
 File getLibDirectory(File baseDir, String artifactId, String version, String aol, String type)
          Specifies where libraries are stored
 File getNarUnpackDirectory(File baseUnpackDirectory, File narFile)
          Returns the unpack directory of a specific nar file.
 File getNoArchDirectory(File baseDir, String artifactId, String version)
          Specifies where all the "no architecture" specific files are stored
 void prepareNarInfo(File baseDir, org.apache.maven.project.MavenProject project, NarInfo narInfo, AbstractNarMojo mojo)
          Called to attach nars to main nar/jar file.
 void unpackNar(File unpackDir, org.codehaus.plexus.archiver.manager.ArchiverManager archiverManager, File file, String os, String linkerName, AOL defaultAOL)
          Called to unpack a nar file
 
Methods inherited from class com.github.maven_nar.AbstractNarLayout
attachNar, getLayout, getLog, unpackNarAndProcess
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NarLayout20

public NarLayout20(org.apache.maven.plugin.logging.Log log)
Method Detail

getNoArchDirectory

public File getNoArchDirectory(File baseDir,
                               String artifactId,
                               String version)
                        throws org.apache.maven.plugin.MojoExecutionException,
                               org.apache.maven.plugin.MojoFailureException
Description copied from interface: NarLayout
Specifies where all the "no architecture" specific files are stored

Throws:
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException

getIncludeDirectory

public final File getIncludeDirectory(File baseDir,
                                      String artifactId,
                                      String version)
Description copied from interface: NarLayout
Specifies where includes are stored

Returns:

getLibDirectory

public final File getLibDirectory(File baseDir,
                                  String artifactId,
                                  String version,
                                  String aol,
                                  String type)
                           throws org.apache.maven.plugin.MojoFailureException
Description copied from interface: NarLayout
Specifies where libraries are stored

Returns:
Throws:
org.apache.maven.plugin.MojoFailureException

getBinDirectory

public final File getBinDirectory(File baseDir,
                                  String artifactId,
                                  String version,
                                  String aol)
Description copied from interface: NarLayout
Specifies where binaries are stored

Returns:

prepareNarInfo

public final void prepareNarInfo(File baseDir,
                                 org.apache.maven.project.MavenProject project,
                                 NarInfo narInfo,
                                 AbstractNarMojo mojo)
                          throws org.apache.maven.plugin.MojoExecutionException
Description copied from interface: NarLayout
Called to attach nars to main nar/jar file. This method needs to set NarInfo accordingly so it can be included in the nar archive.

Throws:
org.apache.maven.plugin.MojoExecutionException

attachNars

public final void attachNars(File baseDir,
                             org.codehaus.plexus.archiver.manager.ArchiverManager archiverManager,
                             org.apache.maven.project.MavenProjectHelper projectHelper,
                             org.apache.maven.project.MavenProject project)
                      throws org.apache.maven.plugin.MojoExecutionException
Description copied from interface: NarLayout
Called to attach nars to main nar/jar file. This method needs to produce all the attached nar archive files.

Throws:
org.apache.maven.plugin.MojoExecutionException

unpackNar

public void unpackNar(File unpackDir,
                      org.codehaus.plexus.archiver.manager.ArchiverManager archiverManager,
                      File file,
                      String os,
                      String linkerName,
                      AOL defaultAOL)
               throws org.apache.maven.plugin.MojoExecutionException,
                      org.apache.maven.plugin.MojoFailureException
Description copied from interface: NarLayout
Called to unpack a nar file

Throws:
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException

getNarUnpackDirectory

public File getNarUnpackDirectory(File baseUnpackDirectory,
                                  File narFile)
Description copied from interface: NarLayout
Returns the unpack directory of a specific nar file.



Copyright © 2002-2013 The Apache Software Foundation. All Rights Reserved.