You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by de...@apache.org on 2009/02/26 00:32:52 UTC
svn commit: r747966 - in /maven/plugins/trunk/maven-ejb-plugin/src:
main/java/org/apache/maven/plugin/ejb/EjbMojo.java
test/java/org/apache/maven/plugin/ejb/EjbMojoTest.java
Author: dennisl
Date: Wed Feb 25 23:32:52 2009
New Revision: 747966
URL: http://svn.apache.org/viewvc?rev=747966&view=rev
Log:
[MEJB-32] Add set classifier to client classifier
Submitted by: David Siefert
Reviewed by: Dennis Lundberg
o Patch applied with modifications (code style)
Modified:
maven/plugins/trunk/maven-ejb-plugin/src/main/java/org/apache/maven/plugin/ejb/EjbMojo.java
maven/plugins/trunk/maven-ejb-plugin/src/test/java/org/apache/maven/plugin/ejb/EjbMojoTest.java
Modified: maven/plugins/trunk/maven-ejb-plugin/src/main/java/org/apache/maven/plugin/ejb/EjbMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ejb-plugin/src/main/java/org/apache/maven/plugin/ejb/EjbMojo.java?rev=747966&r1=747965&r2=747966&view=diff
==============================================================================
--- maven/plugins/trunk/maven-ejb-plugin/src/main/java/org/apache/maven/plugin/ejb/EjbMojo.java (original)
+++ maven/plugins/trunk/maven-ejb-plugin/src/main/java/org/apache/maven/plugin/ejb/EjbMojo.java Wed Feb 25 23:32:52 2009
@@ -260,7 +260,13 @@
if ( generateClient )
{
- getLog().info( "Building EJB client " + jarName + "-client" );
+ String clientJarName = jarName;
+ if ( classifier != null )
+ {
+ clientJarName += "-" + classifier;
+ }
+
+ getLog().info( "Building EJB client " + clientJarName + "-client" );
String[] excludes = DEFAULT_EXCLUDES;
String[] includes = DEFAULT_INCLUDES;
@@ -275,7 +281,7 @@
excludes = (String[]) clientExcludes.toArray( EMPTY_STRING_ARRAY );
}
- File clientJarFile = new File( basedir, jarName + "-client.jar" );
+ File clientJarFile = new File( basedir, clientJarName + "-client.jar" );
MavenArchiver clientArchiver = new MavenArchiver();
Modified: maven/plugins/trunk/maven-ejb-plugin/src/test/java/org/apache/maven/plugin/ejb/EjbMojoTest.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ejb-plugin/src/test/java/org/apache/maven/plugin/ejb/EjbMojoTest.java?rev=747966&r1=747965&r2=747966&view=diff
==============================================================================
--- maven/plugins/trunk/maven-ejb-plugin/src/test/java/org/apache/maven/plugin/ejb/EjbMojoTest.java (original)
+++ maven/plugins/trunk/maven-ejb-plugin/src/test/java/org/apache/maven/plugin/ejb/EjbMojoTest.java Wed Feb 25 23:32:52 2009
@@ -530,20 +530,22 @@
protected void assertJarCreation( final MavenProject project, boolean ejbJarCreated, boolean ejbClientJarCreated,
- String classifer )
+ String classifier )
{
String checkedJarFile;
- if ( classifer == null )
+ String checkedClientJarFile;
+
+ if ( classifier == null )
{
checkedJarFile = project.getBuild().getDirectory() + "/" + DEFAULT_JAR_NAME + ".jar";
+ checkedClientJarFile = project.getBuild().getDirectory() + "/" + DEFAULT_JAR_NAME + "-client.jar";
}
else
{
- checkedJarFile = project.getBuild().getDirectory() + "/" + DEFAULT_JAR_NAME + "-" + classifer + ".jar";
+ checkedJarFile = project.getBuild().getDirectory() + "/" + DEFAULT_JAR_NAME + "-" + classifier + ".jar";
+ checkedClientJarFile = project.getBuild().getDirectory() + "/" + DEFAULT_JAR_NAME + "-" + classifier + "-client.jar";
}
- final String checkedClientJarFile = project.getBuild().getDirectory() + "/" + DEFAULT_JAR_NAME + "-client.jar";
-
assertEquals( "Invalid value for ejb-jar creation", ejbJarCreated, FileUtils.fileExists( checkedJarFile ) );
assertEquals( "Invalid value for ejb-jar client creation", ejbClientJarCreated,
FileUtils.fileExists( checkedClientJarFile ) );
Re: svn commit: r747966 - in /maven/plugins/trunk/maven-ejb-plugin/src:
main/java/org/apache/maven/plugin/ejb/EjbMojo.java test/java/org/apache/maven/plugin/ejb/EjbMojoTest.java
Posted by Dennis Lundberg <de...@apache.org>.
Benjamin Bentmann wrote:
> Dennis Lundberg wrote:
>
>> Something like this instead then?
>>
>>
>> - projectHelper.attachArtifact( project, "ejb-client",
>> "client", clientJarFile );
>> + if ( classifier != null )
>> + {
>> + projectHelper.attachArtifact( project, "ejb-client",
>> classifier + "-client", clientJarFile );
>> + }
>> + else
>> + {
>> + projectHelper.attachArtifact( project, "ejb-client",
>> "client", clientJarFile );
>> + }
>
> Yup, that's what I thought.
>
>
> Benjamin
Fixed
--
Dennis Lundberg
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
Re: svn commit: r747966 - in /maven/plugins/trunk/maven-ejb-plugin/src:
main/java/org/apache/maven/plugin/ejb/EjbMojo.java test/java/org/apache/maven/plugin/ejb/EjbMojoTest.java
Posted by Benjamin Bentmann <be...@udo.edu>.
Dennis Lundberg wrote:
> Something like this instead then?
>
>
> - projectHelper.attachArtifact( project, "ejb-client",
> "client", clientJarFile );
> + if ( classifier != null )
> + {
> + projectHelper.attachArtifact( project, "ejb-client",
> classifier + "-client", clientJarFile );
> + }
> + else
> + {
> + projectHelper.attachArtifact( project, "ejb-client",
> "client", clientJarFile );
> + }
Yup, that's what I thought.
Benjamin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
Re: svn commit: r747966 - in /maven/plugins/trunk/maven-ejb-plugin/src:
main/java/org/apache/maven/plugin/ejb/EjbMojo.java test/java/org/apache/maven/plugin/ejb/EjbMojoTest.java
Posted by Dennis Lundberg <de...@apache.org>.
Benjamin Bentmann wrote:
> Hi Dennis,
Hi
>> Author: dennisl
>> Date: Wed Feb 25 23:32:52 2009
>> New Revision: 747966
>>
>> URL: http://svn.apache.org/viewvc?rev=747966&view=rev
>> Log:
>> [MEJB-32] Add set classifier to client classifier
>> Submitted by: David Siefert
>> Reviewed by: Dennis Lundberg
>>
>> o Patch applied with modifications (code style)
>>
>> Modified:
>>
>> maven/plugins/trunk/maven-ejb-plugin/src/main/java/org/apache/maven/plugin/ejb/EjbMojo.java
>>
>>
>> maven/plugins/trunk/maven-ejb-plugin/src/test/java/org/apache/maven/plugin/ejb/EjbMojoTest.java
>>
>>
>> Modified:
>> maven/plugins/trunk/maven-ejb-plugin/src/main/java/org/apache/maven/plugin/ejb/EjbMojo.java
>>
>> URL:
>> http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ejb-plugin/src/main/java/org/apache/maven/plugin/ejb/EjbMojo.java?rev=747966&r1=747965&r2=747966&view=diff
>>
>> ==============================================================================
>>
>> ---
>> maven/plugins/trunk/maven-ejb-plugin/src/main/java/org/apache/maven/plugin/ejb/EjbMojo.java
>> (original)
>> +++
>> maven/plugins/trunk/maven-ejb-plugin/src/main/java/org/apache/maven/plugin/ejb/EjbMojo.java
>> Wed Feb 25 23:32:52 2009
>> @@ -260,7 +260,13 @@
>>
>> if ( generateClient )
>> {
>> - getLog().info( "Building EJB client " + jarName +
>> "-client" );
>> + String clientJarName = jarName;
>> + if ( classifier != null )
>> + {
>> + clientJarName += "-" + classifier;
>> + }
>> +
>> + getLog().info( "Building EJB client " + clientJarName +
>> "-client" );
>>
>> String[] excludes = DEFAULT_EXCLUDES;
>> String[] includes = DEFAULT_INCLUDES;
>
> A few lines below this code there's still
>
>> projectHelper.attachArtifact( project, "ejb-client", "client",
>> clientJarFile );
>
> i.e. the attached client artifact has the hard-coded classifier
> "client". I think the classifier parameter would need be prepended here,
> too, to prevent the client JARs from clashing in the repo or do I miss
> something?
No, I think that sounds reasonable.
Something like this instead then?
- projectHelper.attachArtifact( project, "ejb-client",
"client", clientJarFile );
+ if ( classifier != null )
+ {
+ projectHelper.attachArtifact( project, "ejb-client",
classifier + "-client", clientJarFile );
+ }
+ else
+ {
+ projectHelper.attachArtifact( project, "ejb-client",
"client", clientJarFile );
+ }
>
>
> Benjamin
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
>
--
Dennis Lundberg
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
Re: svn commit: r747966 - in /maven/plugins/trunk/maven-ejb-plugin/src:
main/java/org/apache/maven/plugin/ejb/EjbMojo.java test/java/org/apache/maven/plugin/ejb/EjbMojoTest.java
Posted by Benjamin Bentmann <be...@udo.edu>.
Hi Dennis,
> Author: dennisl
> Date: Wed Feb 25 23:32:52 2009
> New Revision: 747966
>
> URL: http://svn.apache.org/viewvc?rev=747966&view=rev
> Log:
> [MEJB-32] Add set classifier to client classifier
> Submitted by: David Siefert
> Reviewed by: Dennis Lundberg
>
> o Patch applied with modifications (code style)
>
> Modified:
> maven/plugins/trunk/maven-ejb-plugin/src/main/java/org/apache/maven/plugin/ejb/EjbMojo.java
> maven/plugins/trunk/maven-ejb-plugin/src/test/java/org/apache/maven/plugin/ejb/EjbMojoTest.java
>
> Modified: maven/plugins/trunk/maven-ejb-plugin/src/main/java/org/apache/maven/plugin/ejb/EjbMojo.java
> URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ejb-plugin/src/main/java/org/apache/maven/plugin/ejb/EjbMojo.java?rev=747966&r1=747965&r2=747966&view=diff
> ==============================================================================
> --- maven/plugins/trunk/maven-ejb-plugin/src/main/java/org/apache/maven/plugin/ejb/EjbMojo.java (original)
> +++ maven/plugins/trunk/maven-ejb-plugin/src/main/java/org/apache/maven/plugin/ejb/EjbMojo.java Wed Feb 25 23:32:52 2009
> @@ -260,7 +260,13 @@
>
> if ( generateClient )
> {
> - getLog().info( "Building EJB client " + jarName + "-client" );
> + String clientJarName = jarName;
> + if ( classifier != null )
> + {
> + clientJarName += "-" + classifier;
> + }
> +
> + getLog().info( "Building EJB client " + clientJarName + "-client" );
>
> String[] excludes = DEFAULT_EXCLUDES;
> String[] includes = DEFAULT_INCLUDES;
A few lines below this code there's still
> projectHelper.attachArtifact( project, "ejb-client", "client", clientJarFile );
i.e. the attached client artifact has the hard-coded classifier
"client". I think the classifier parameter would need be prepended here,
too, to prevent the client JARs from clashing in the repo or do I miss
something?
Benjamin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org