summaryrefslogtreecommitdiff
path: root/src/main/java/org
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/org')
-rw-r--r--src/main/java/org/apache/maven/plugin/nar/NarDownloadMojo.java4
-rw-r--r--src/main/java/org/apache/maven/plugin/nar/NarIntegrationTestMojo.java6
-rw-r--r--src/main/java/org/apache/maven/plugin/nar/NarLayout.java2
-rw-r--r--src/main/java/org/apache/maven/plugin/nar/NarManager.java12
-rw-r--r--src/main/java/org/apache/maven/plugin/nar/NarPackageMojo.java10
5 files changed, 19 insertions, 15 deletions
diff --git a/src/main/java/org/apache/maven/plugin/nar/NarDownloadMojo.java b/src/main/java/org/apache/maven/plugin/nar/NarDownloadMojo.java
index d7f6343..fa83de7 100644
--- a/src/main/java/org/apache/maven/plugin/nar/NarDownloadMojo.java
+++ b/src/main/java/org/apache/maven/plugin/nar/NarDownloadMojo.java
@@ -40,7 +40,7 @@ public class NarDownloadMojo
{
/**
- * Artifact resolver, needed to download source jars for inclusion in classpath.
+ * Artifact resolver, needed to download the attached nar files.
*
* @component role="org.apache.maven.artifact.resolver.ArtifactResolver"
* @required
@@ -49,7 +49,7 @@ public class NarDownloadMojo
private ArtifactResolver artifactResolver;
/**
- * Remote repositories which will be searched for source attachments.
+ * Remote repositories which will be searched for nar attachments.
*
* @parameter expression="${project.remoteArtifactRepositories}"
* @required
diff --git a/src/main/java/org/apache/maven/plugin/nar/NarIntegrationTestMojo.java b/src/main/java/org/apache/maven/plugin/nar/NarIntegrationTestMojo.java
index ac4fcf7..7f929bf 100644
--- a/src/main/java/org/apache/maven/plugin/nar/NarIntegrationTestMojo.java
+++ b/src/main/java/org/apache/maven/plugin/nar/NarIntegrationTestMojo.java
@@ -999,9 +999,9 @@ public class NarIntegrationTestMojo
// add jar file to classpath, as one may want to read a
// properties file for artifactId and version
- String jarFile = "target/" + project.getArtifactId() + "-" + project.getVersion() + ".jar";
- getLog().debug( "Adding to surefire test classpath: " + jarFile );
- surefireBooter.addClassPathUrl( jarFile );
+ String narFile = "target/" + project.getArtifactId() + "-" + project.getVersion() + ".jar";
+ getLog().debug( "Adding to surefire test classpath: " + narFile );
+ surefireBooter.addClassPathUrl( narFile );
}
List dependencies = getNarManager().getNarDependencies( "test" );
diff --git a/src/main/java/org/apache/maven/plugin/nar/NarLayout.java b/src/main/java/org/apache/maven/plugin/nar/NarLayout.java
index 9529473..6e12eaa 100644
--- a/src/main/java/org/apache/maven/plugin/nar/NarLayout.java
+++ b/src/main/java/org/apache/maven/plugin/nar/NarLayout.java
@@ -68,7 +68,7 @@ public interface NarLayout
throws MojoExecutionException, MojoFailureException;
/**
- * Called to attach nars to main jar file. This method needs to produce all the attached nar files and set NarInfo
+ * Called to attach nars to main nar/jar file. This method needs to produce all the attached nar files and set NarInfo
* accordingly.
*/
void attachNars( File baseDir, ArchiverManager archiverManager, MavenProjectHelper projectHelper,
diff --git a/src/main/java/org/apache/maven/plugin/nar/NarManager.java b/src/main/java/org/apache/maven/plugin/nar/NarManager.java
index 7181a35..4e75cd4 100644
--- a/src/main/java/org/apache/maven/plugin/nar/NarManager.java
+++ b/src/main/java/org/apache/maven/plugin/nar/NarManager.java
@@ -264,17 +264,17 @@ public class NarManager
return null;
}
- JarFile jar = null;
+ JarFile nar = null;
try
{
- jar = new JarFile( file );
+ nar = new JarFile( file );
NarInfo info =
new NarInfo( dependency.getGroupId(), dependency.getArtifactId(), dependency.getVersion(), log );
- if ( !info.exists( jar ) )
+ if ( !info.exists( nar ) )
{
return null;
}
- info.read( jar );
+ info.read( nar );
return info;
}
catch ( IOException e )
@@ -283,11 +283,11 @@ public class NarManager
}
finally
{
- if ( jar != null )
+ if ( nar != null )
{
try
{
- jar.close();
+ nar.close();
}
catch ( IOException e )
{
diff --git a/src/main/java/org/apache/maven/plugin/nar/NarPackageMojo.java b/src/main/java/org/apache/maven/plugin/nar/NarPackageMojo.java
index f2a01ec..8c55f5c 100644
--- a/src/main/java/org/apache/maven/plugin/nar/NarPackageMojo.java
+++ b/src/main/java/org/apache/maven/plugin/nar/NarPackageMojo.java
@@ -40,7 +40,9 @@ public class NarPackageMojo
extends AbstractCompileMojo
{
/**
- * @component role="org.apache.maven.artifact.handler.ArtifactHandler" roleHint="nar-package"
+ * NAR-121 was nar-package
+ *
+ * @component role="org.apache.maven.artifact.handler.ArtifactHandler" roleHint="nar"
* @required
*/
private ArtifactHandler narArtifactHandler;
@@ -64,8 +66,10 @@ public class NarPackageMojo
throws MojoExecutionException, MojoFailureException
{
// Avoid that -DupdateReleaseInfo copies to a .nar file
- getMavenProject().getArtifact().setArtifactHandler( narArtifactHandler );
-
+ // NAR-121
+// getMavenProject().getArtifact().setArtifactHandler( narArtifactHandler );
+ System.err.println("***"+getMavenProject().getArtifact().getArtifactHandler().getExtension());
+ System.err.println("***"+getFinalName());
// let the layout decide which nars to attach
getLayout().attachNars( getTargetDirectory(), archiverManager, projectHelper, getMavenProject(), getNarInfo() );