Author: hboutemy Date: Thu Nov 27 23:17:01 2014 New Revision: 1642247 URL: http://svn.apache.org/r1642247 Log: updated parent pom
Modified: maven/plugins/trunk/maven-doap-plugin/pom.xml maven/plugins/trunk/maven-doap-plugin/src/main/java/org/apache/maven/plugin/doap/DoapMojo.java maven/plugins/trunk/maven-doap-plugin/src/main/java/org/apache/maven/plugin/doap/DoapUtil.java maven/plugins/trunk/maven-doap-plugin/src/main/java/org/apache/maven/plugin/doap/options/ASFExtOptionsUtil.java Modified: maven/plugins/trunk/maven-doap-plugin/pom.xml URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-doap-plugin/pom.xml?rev=1642247&r1=1642246&r2=1642247&view=diff ============================================================================== --- maven/plugins/trunk/maven-doap-plugin/pom.xml (original) +++ maven/plugins/trunk/maven-doap-plugin/pom.xml Thu Nov 27 23:17:01 2014 @@ -25,7 +25,7 @@ under the License. <parent> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-plugins</artifactId> - <version>25</version> + <version>27</version> <relativePath>../maven-plugins/pom.xml</relativePath> </parent> @@ -59,7 +59,6 @@ under the License. <properties> <mavenVersion>2.2.1</mavenVersion> <scmVersion>1.9.1</scmVersion> - <mavenPluginVersion>3.2</mavenPluginVersion> </properties> <dependencies> @@ -160,31 +159,8 @@ under the License. </dependencies> <build> - <pluginManagement> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-plugin-plugin</artifactId> - <version>${mavenPluginVersion}</version> - <configuration> - <skipErrorNoDescriptorsFound>true</skipErrorNoDescriptorsFound> - </configuration> - </plugin> - </plugins> - </pluginManagement> <plugins> <plugin> - <artifactId>maven-plugin-plugin</artifactId> - <executions> - <execution> - <id>generate-descriptor</id> - <goals> - <goal>descriptor</goal> - </goals> - </execution> - </executions> - </plugin> - <plugin> <groupId>org.codehaus.modello</groupId> <artifactId>modello-maven-plugin</artifactId> <executions> @@ -206,16 +182,6 @@ under the License. </plugins> </build> - <reporting> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-plugin-plugin</artifactId> - <version>${mavenPluginVersion}</version> - </plugin> - </plugins> - </reporting> - <profiles> <profile> <id>reporting</id> @@ -264,15 +230,6 @@ under the License. <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-invoker-plugin</artifactId> <configuration> - <debug>true</debug> - <projectsDirectory>src/it</projectsDirectory> - <cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo> - <pomIncludes> - <pomInclude>*/pom.xml</pomInclude> - </pomIncludes> - <postBuildHookScript>verify</postBuildHookScript> - <localRepositoryPath>${project.build.directory}/local-repo</localRepositoryPath> - <settingsFile>src/it/settings.xml</settingsFile> <goals> <goal>clean</goal> <goal>${project.groupId}:${project.artifactId}:${project.version}:generate</goal> Modified: maven/plugins/trunk/maven-doap-plugin/src/main/java/org/apache/maven/plugin/doap/DoapMojo.java URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-doap-plugin/src/main/java/org/apache/maven/plugin/doap/DoapMojo.java?rev=1642247&r1=1642246&r2=1642247&view=diff ============================================================================== --- maven/plugins/trunk/maven-doap-plugin/src/main/java/org/apache/maven/plugin/doap/DoapMojo.java (original) +++ maven/plugins/trunk/maven-doap-plugin/src/main/java/org/apache/maven/plugin/doap/DoapMojo.java Thu Nov 27 23:17:01 2014 @@ -617,19 +617,20 @@ public class DoapMojo boolean added = false; if ( artifact != null ) { - String about_ = project.getUrl(); + String about = project.getUrl(); - if ( StringUtils.isNotEmpty( about_ ) ) + if ( StringUtils.isNotEmpty( about ) ) { try { - new URL( about_ ); + new URL( about ); - writer.addAttribute( "rdf:about", about_ ); + writer.addAttribute( "rdf:about", about ); added = true; } catch ( MalformedURLException e ) { + // ignore } } @@ -781,8 +782,8 @@ public class DoapMojo if ( ASFExtOptionsUtil.isASFProject( project ) ) { - getLog().error( - "For more information about the errors and possible solutions, please read the plugin documentation:" ); + getLog().error( "For more information about the errors and possible solutions, " + + "please read the plugin documentation:" ); getLog().error( "http://maven.apache.org/plugins/maven-doap-plugin/usage.html#DOAP_ASF_Configuration" ); throw new MojoExecutionException( "The generated DOAP doesn't respect ASF rules, see above." ); } @@ -1227,17 +1228,17 @@ public class DoapMojo */ private void writeOS( XMLWriter writer, MavenProject project ) { - String os = DoapUtil.interpolate( doapOptions.getOs(), project, settings ); - if ( StringUtils.isEmpty( os ) ) + String osList = DoapUtil.interpolate( doapOptions.getOs(), project, settings ); + if ( StringUtils.isEmpty( osList ) ) { return; } DoapUtil.writeComment( writer, "Operating system that a project is limited to." ); - String[] oses = StringUtils.split( os, "," ); - for ( String os_ : oses ) + String[] oses = StringUtils.split( osList, "," ); + for ( String os : oses ) { - DoapUtil.writeElement( writer, doapOptions.getXmlnsPrefix(), "os", os_.trim() ); + DoapUtil.writeElement( writer, doapOptions.getXmlnsPrefix(), "os", os.trim() ); } } @@ -2368,7 +2369,7 @@ public class DoapMojo boolean addComment = false; for ( Map.Entry<Object, String> entry : map.entrySet() ) { - String key = (String)entry.getKey(); + String key = (String) entry.getKey(); String value = entry.getValue(); if ( value == null ) @@ -2636,12 +2637,12 @@ public class DoapMojo errorMessages.add( "The POM " + toConfiguration( tags, value ) + " value is not a valid email." ); break; case INVALID_ISO_DATE: - errorMessages.add( - "The " + toConfiguration( tags, value ) + " parameter is not a valid ISO language." ); + errorMessages.add( "The " + toConfiguration( tags, value ) + + " parameter is not a valid ISO language." ); break; case SHORT_DESC_TOO_LONG: - errorMessages.add( - "The " + toConfiguration( tags, value ) + " first sentence is too long maximum words number is 10." ); + errorMessages.add( "The " + toConfiguration( tags, value ) + + " first sentence is too long maximum words number is 10." ); break; default: throw new IllegalArgumentException( "Unknown errorId=" + errorId ); Modified: maven/plugins/trunk/maven-doap-plugin/src/main/java/org/apache/maven/plugin/doap/DoapUtil.java URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-doap-plugin/src/main/java/org/apache/maven/plugin/doap/DoapUtil.java?rev=1642247&r1=1642246&r2=1642247&view=diff ============================================================================== --- maven/plugins/trunk/maven-doap-plugin/src/main/java/org/apache/maven/plugin/doap/DoapUtil.java (original) +++ maven/plugins/trunk/maven-doap-plugin/src/main/java/org/apache/maven/plugin/doap/DoapUtil.java Thu Nov 27 23:17:01 2014 @@ -305,7 +305,8 @@ public class DoapUtil * @param developersOrContributors list of <code>{@link Contributor}</code> * @return a none null list of <code>{@link Contributor}</code> which have an <code>helper</code> DOAP role. */ - public static List<Contributor> getContributorsWithHelperRole( I18N i18n, List<Contributor> developersOrContributors ) + public static List<Contributor> getContributorsWithHelperRole( I18N i18n, + List<Contributor> developersOrContributors ) { return filterContributorsByDoapRoles( i18n, developersOrContributors ).get( "helpers" ); } @@ -326,7 +327,8 @@ public class DoapUtil * @param developersOrContributors list of <code>{@link Contributor}</code> * @return a none null list of <code>{@link Contributor}</code> which have a <code>tester</code> DOAP role. */ - public static List<Contributor> getContributorsWithTesterRole( I18N i18n, List<Contributor> developersOrContributors ) + public static List<Contributor> getContributorsWithTesterRole( I18N i18n, + List<Contributor> developersOrContributors ) { return filterContributorsByDoapRoles( i18n, developersOrContributors ).get( "testers" ); } @@ -628,6 +630,7 @@ public class DoapUtil } catch ( IOException e ) { + // ignore } interpolator.addValueSource( new PropertiesBasedValueSource( System.getProperties() ) ); interpolator.addValueSource( new PropertiesBasedValueSource( project.getProperties() ) ); @@ -663,6 +666,7 @@ public class DoapUtil } catch ( InterpolationException e ) { + // ignore } if ( interpolatedValue.startsWith( "${" ) ) @@ -690,7 +694,7 @@ public class DoapUtil * list of <code>{@link Contributor}</code> as value. */ private static Map<String, List<Contributor>> filterContributorsByDoapRoles( I18N i18n, - List<Contributor> developersOrContributors ) + List<Contributor> developersOrContributors ) { Map<String, List<Contributor>> returnMap = new HashMap<String, List<Contributor>>( 7 ); returnMap.put( "maintainers", new ArrayList<Contributor>() ); @@ -802,7 +806,8 @@ public class DoapUtil try { is = - DoapUtil.class.getResourceAsStream( "/META-INF/maven/org.apache.maven.plugins/maven-doap-plugin/pom.properties" ); + DoapUtil.class.getResourceAsStream( "/META-INF/maven/org.apache.maven.plugins/" + + "maven-doap-plugin/pom.properties" ); if ( is == null ) { return "<unknown>"; @@ -837,7 +842,7 @@ public class DoapUtil * space overflows due to retention of discarded classloaders. */ @SuppressWarnings( "rawtypes" ) - private static final Map<Class,ClassMap> classMaps = new WeakHashMap<Class,ClassMap>(); + private static final Map<Class, ClassMap> CLASS_MAPS = new WeakHashMap<Class, ClassMap>(); private ReflectionValueExtractor() { @@ -887,6 +892,7 @@ public class DoapUtil } catch ( NumberFormatException e ) { + // ignore } } @@ -935,13 +941,13 @@ public class DoapUtil private static ClassMap getClassMap( Class<? extends Object> clazz ) { - ClassMap classMap = classMaps.get( clazz ); + ClassMap classMap = CLASS_MAPS.get( clazz ); if ( classMap == null ) { classMap = new ClassMap( clazz ); - classMaps.put( clazz, classMap ); + CLASS_MAPS.put( clazz, classMap ); } return classMap; Modified: maven/plugins/trunk/maven-doap-plugin/src/main/java/org/apache/maven/plugin/doap/options/ASFExtOptionsUtil.java URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-doap-plugin/src/main/java/org/apache/maven/plugin/doap/options/ASFExtOptionsUtil.java?rev=1642247&r1=1642246&r2=1642247&view=diff ============================================================================== --- maven/plugins/trunk/maven-doap-plugin/src/main/java/org/apache/maven/plugin/doap/options/ASFExtOptionsUtil.java (original) +++ maven/plugins/trunk/maven-doap-plugin/src/main/java/org/apache/maven/plugin/doap/options/ASFExtOptionsUtil.java Thu Nov 27 23:17:01 2014 @@ -115,11 +115,11 @@ public class ASFExtOptionsUtil */ public static String getCategorySupportedByASF( String category ) { - for ( String category_ : CATEGORIES ) + for ( String supportedCategory : CATEGORIES ) { - if ( category_.equalsIgnoreCase( category ) ) + if ( supportedCategory.equalsIgnoreCase( category ) ) { - return category_; + return supportedCategory; } } @@ -134,11 +134,11 @@ public class ASFExtOptionsUtil */ public static String getProgrammingLanguageSupportedByASF( String programmingLanguage ) { - for ( String programmingLanguage_ : PROGRAMMING_LANGUAGES ) + for ( String supportedProgrammingLanguage : PROGRAMMING_LANGUAGES ) { - if ( programmingLanguage_.equalsIgnoreCase( programmingLanguage ) ) + if ( supportedProgrammingLanguage.equalsIgnoreCase( programmingLanguage ) ) { - return programmingLanguage_; + return supportedProgrammingLanguage; } } @@ -222,9 +222,8 @@ public class ASFExtOptionsUtil // check organization name if ( project.getOrganization() != null && StringUtils.isNotEmpty( project.getOrganization().getName() ) - && project.getOrganization().getName().trim().equals( "The Apache Software Foundation" ) ) // see - // org.apache:apache - // artifact + && project.getOrganization().getName().trim().equals( "The Apache Software Foundation" ) ) + // see org.apache:apache artifact { return true; } @@ -313,6 +312,7 @@ public class ASFExtOptionsUtil } catch ( MalformedURLException e ) { + // ignore } return false;