You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by jv...@apache.org on 2004/05/22 05:05:47 UTC
cvs commit: maven-components/maven-plugin/src/main/java/org/apache/maven/plugin/generator BeanPluginGenerator.java
jvanzyl 2004/05/21 20:05:47
Modified: maven-plugin/src/main/java/org/apache/maven/plugin/generator
BeanPluginGenerator.java
Log:
o fix naming of the generated constructor
Revision Changes Path
1.3 +8 -3 maven-components/maven-plugin/src/main/java/org/apache/maven/plugin/generator/BeanPluginGenerator.java
Index: BeanPluginGenerator.java
===================================================================
RCS file: /home/cvs/maven-components/maven-plugin/src/main/java/org/apache/maven/plugin/generator/BeanPluginGenerator.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- BeanPluginGenerator.java 22 May 2004 02:46:03 -0000 1.2
+++ BeanPluginGenerator.java 22 May 2004 03:05:47 -0000 1.3
@@ -34,9 +34,14 @@
// We will base the classname on the implementation we are wrapping
// ----------------------------------------------------------------------
+ return getClassName( pluginDescriptor ) + ".java";
+ }
+
+ protected String getClassName( PluginDescriptor pluginDescriptor )
+ {
String implementation = pluginDescriptor.getImplementation();
- return implementation.substring( implementation.lastIndexOf( "." ) + 1 ) + "Bean.java";
+ return implementation.substring( implementation.lastIndexOf( "." ) + 1 ) + "Bean";
}
protected void writePluginArtifact( PluginDescriptor pluginDescriptor, File destination )
@@ -44,7 +49,7 @@
{
String implementation = pluginDescriptor.getImplementation();
- JClass jClass = new JClass( pluginArtifactName( pluginDescriptor ) );
+ JClass jClass = new JClass( getClassName( pluginDescriptor ) );
// ----------------------------------------------------------------------
//
@@ -66,7 +71,7 @@
JConstructor constructor = new JConstructor( jClass );
- constructor.getSourceCode().add( "super( new " + pluginDescriptor.getImplementation() + "() );" );
+ constructor.getSourceCode().add( "super( new " + implementation + "() );" );
jClass.addConstructor( constructor );
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org