com.sun.enterprise.module.maven
Class MavenProjectRepository
java.lang.Object
com.sun.enterprise.module.common_impl.AbstractRepositoryImpl
com.sun.enterprise.module.maven.MavenProjectRepository
- All Implemented Interfaces:
- Repository
public class MavenProjectRepository
- extends AbstractRepositoryImpl
Repository implementation that loads modules
from the transitive dependencies set in a MavenProject.
- Author:
- Kohsuke Kawaguchi
|
Constructor Summary |
MavenProjectRepository(org.apache.maven.project.MavenProject project,
org.apache.maven.artifact.resolver.ArtifactResolver artifactResolver,
org.apache.maven.artifact.repository.ArtifactRepository localRepository,
org.apache.maven.artifact.factory.ArtifactFactory artifactFactory)
|
| Methods inherited from class com.sun.enterprise.module.common_impl.AbstractRepositoryImpl |
add, addLibrary, addListener, find, findAll, findAll, getJarLocations, getLocation, getName, initialize, newModuleDefinition, remove, removeLibrary, removeListener, shutdown, toString |
MavenProjectRepository
public MavenProjectRepository(org.apache.maven.project.MavenProject project,
org.apache.maven.artifact.resolver.ArtifactResolver artifactResolver,
org.apache.maven.artifact.repository.ArtifactRepository localRepository,
org.apache.maven.artifact.factory.ArtifactFactory artifactFactory)
prepareProject
public static void prepareProject(org.apache.maven.project.MavenProject project)
throws IOException
- When creating
MavenProjectRepository from the current project (which is used
to launch mvn), and if the compile phase has run yet, then the main artifact is
still null.
However, it's often convenient to pick up the files that were left in the file system
from the previous execution. This method checks this situation and updates MavenProject
accordingly, so that it can be then passed to the constructor of MavenProjectRepository.
Think of this as a pre-processing phase to compensate for the lack of the compile phase
invocation.
- Throws:
IOException
loadModuleDefs
protected void loadModuleDefs(Map<ModuleId,ModuleDefinition> moduleDefs,
List<URI> libraries)
throws IOException
- Specified by:
loadModuleDefs in class AbstractRepositoryImpl
- Throws:
IOException
loadJar
protected com.sun.enterprise.module.maven.MavenModuleDefinition loadJar(File jar)
throws IOException
- Overrides:
loadJar in class AbstractRepositoryImpl
- Throws:
IOException
Copyright © 2011 Oracle Corporation. All Rights Reserved.