diff options
author | Vikas Rangarajan <vikas@vikas-linux.tva.tvworks.com> | 2010-03-22 15:48:57 -0700 |
---|---|---|
committer | Vikas Rangarajan <vikas@vikas-linux.tva.tvworks.com> | 2010-03-22 15:48:57 -0700 |
commit | e8c35d105cf227a9a781ac4aac79dcd0c5024a6b (patch) | |
tree | ed979c6ccf8c0a9a5a6ec6ed67ff47242acfeeea /src/main/java/org/apache/maven/plugin/nar/NarUtil.java | |
parent | 2bb8e535ca23632a4df9ba291709cd1c536d39cd (diff) | |
download | maven-nar-plugin-e8c35d105cf227a9a781ac4aac79dcd0c5024a6b.tar.gz maven-nar-plugin-e8c35d105cf227a9a781ac4aac79dcd0c5024a6b.tar.bz2 maven-nar-plugin-e8c35d105cf227a9a781ac4aac79dcd0c5024a6b.tar.xz maven-nar-plugin-e8c35d105cf227a9a781ac4aac79dcd0c5024a6b.zip |
Initial merge of local changes with master, main changes :
- New mojo for vcproj generation
- Fixed aol to be url-friendly for maven deployments (g++->gpp)
- Fail build early if specified include paths do not exist
- Only add "include" subdirs of sourcedirs if they exist, to the include path
- Removed duplication of source dirs in source path
Diffstat (limited to 'src/main/java/org/apache/maven/plugin/nar/NarUtil.java')
-rw-r--r-- | src/main/java/org/apache/maven/plugin/nar/NarUtil.java | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/main/java/org/apache/maven/plugin/nar/NarUtil.java b/src/main/java/org/apache/maven/plugin/nar/NarUtil.java index 751cce0..cb77355 100644 --- a/src/main/java/org/apache/maven/plugin/nar/NarUtil.java +++ b/src/main/java/org/apache/maven/plugin/nar/NarUtil.java @@ -39,6 +39,7 @@ import org.apache.bcel.classfile.JavaClass; import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.plugin.MojoFailureException; import org.apache.maven.plugin.logging.Log; +import org.apache.maven.project.MavenProject; import org.codehaus.plexus.util.FileUtils; import org.codehaus.plexus.util.PropertyUtils; import org.codehaus.plexus.util.cli.Commandline; @@ -714,4 +715,23 @@ public final class NarUtil } } + + /** + * (Darren) this code lifted from mvn help:active-profiles plugin Recurses + * into the project's parent poms to find the active profiles of the + * specified project and all its parents. + * + * @param project + * The project to start with + * @return A list of active profiles + */ + static List collectActiveProfiles(MavenProject project) { + List profiles = project.getActiveProfiles(); + + if (project.hasParent()) { + profiles.addAll(collectActiveProfiles(project.getParent())); + } + + return profiles; + } } |