evenisse 2004/03/28 13:27:27 Modified: src/java/org/apache/maven Tag: MAVEN-1_0-BRANCH DependencyClasspathBuilder.java MavenUtils.java src/java/org/apache/maven/cli Tag: MAVEN-1_0-BRANCH App.java src/java/org/apache/maven/jelly Tag: MAVEN-1_0-BRANCH JellyBuildListener.java JellyPropsHandler.java JellyUtils.java src/java/org/apache/maven/jelly/tags/werkz Tag: MAVEN-1_0-BRANCH MavenAttainGoalTag.java MavenGoalTag.java src/java/org/apache/maven/plugin Tag: MAVEN-1_0-BRANCH GoalToJellyScriptHousingMapper.java PluginCacheManager.java PluginDefinitionHandler.java PluginManager.java PluginScriptParser.java src/java/org/apache/maven/project Tag: MAVEN-1_0-BRANCH Build.java Contributor.java PackageGroup.java Log: Fix some checkstyle errors Revision Changes Path No revision No revision 1.13.4.5 +1 -3 maven/src/java/org/apache/maven/DependencyClasspathBuilder.java Index: DependencyClasspathBuilder.java =================================================================== RCS file: /home/cvs/maven/src/java/org/apache/maven/DependencyClasspathBuilder.java,v retrieving revision 1.13.4.4 retrieving revision 1.13.4.5 diff -u -r1.13.4.4 -r1.13.4.5 --- DependencyClasspathBuilder.java 26 Mar 2004 00:18:06 -0000 1.13.4.4 +++ DependencyClasspathBuilder.java 28 Mar 2004 21:27:26 -0000 1.13.4.5 @@ -47,8 +47,6 @@ /** * @return the dependency classpath for the given project. * @param project the project to create the classpath for. - * - * @throws Exception If an error occurs while creating the classpath. */ public static String build( Project project ) { 1.107.4.15 +14 -16 maven/src/java/org/apache/maven/MavenUtils.java Index: MavenUtils.java =================================================================== RCS file: /home/cvs/maven/src/java/org/apache/maven/MavenUtils.java,v retrieving revision 1.107.4.14 retrieving revision 1.107.4.15 diff -u -r1.107.4.14 -r1.107.4.15 --- MavenUtils.java 27 Mar 2004 23:54:39 -0000 1.107.4.14 +++ MavenUtils.java 28 Mar 2004 21:27:26 -0000 1.107.4.15 @@ -145,7 +145,7 @@ throws MavenException { Project project = null; - try + try { project = getNonJellyProject( projectDescriptor, parentContext, useParentPom ); project = getJellyProject( project ); @@ -200,18 +200,18 @@ */ private static Project getNonJellyProject( File projectDescriptor, MavenJellyContext parentContext, - boolean useParentPom ) + boolean useParentPom ) throws MavenException, IOException { // 1) Project project = null; try { - project = (Project) getProjectBeanReader().parse( projectDescriptor ); + project = (Project) getProjectBeanReader().parse( projectDescriptor ); } catch (Exception e) { - throw new MavenException("Error parsing project.xml '" + projectDescriptor.getAbsolutePath() + "'"); + throw new MavenException("Error parsing project.xml '" + projectDescriptor.getAbsolutePath() + "'"); } // 2) @@ -311,7 +311,8 @@ * @throws SAXException when an error occurs parsing the XML * @throws ParserConfigurationException when a JAXP parser can't be created */ - private static BeanReader getProjectBeanReader() throws IntrospectionException, SAXException, ParserConfigurationException + private static BeanReader getProjectBeanReader() + throws IntrospectionException, SAXException, ParserConfigurationException { if ( projectBeanReader == null ) { @@ -332,8 +333,8 @@ * @throws IOException when there are errors reading * @throws ParserConfigurationException when a JAXP parser can't be created */ - private static Project getJellyProject( Project project ) - throws IOException, SAXException, IntrospectionException, ParserConfigurationException + private static Project getJellyProject( Project project ) + throws IOException, SAXException, IntrospectionException, ParserConfigurationException { // Keep a copy of the original context MavenJellyContext originalContext = project.getContext(); @@ -385,9 +386,7 @@ /** * @return an [EMAIL PROTECTED] InputStream} for the given project * @param project a [EMAIL PROTECTED] Project maven project} - * @throws IOException when reading the string fails - * @throws SAXException when parsing the interpolated POM fails - * @throws IntrospectionException when writing the POM to XML + * @throws MavenException when reading the project */ public static InputStream getProjectInputStream( Project project ) throws MavenException @@ -398,7 +397,7 @@ } catch (IOException e) { - throw new MavenException("Error writing the project",e); + throw new MavenException("Error writing the project", e); } catch (IntrospectionException e) { @@ -493,7 +492,7 @@ * @throws SAXException when there are errors getting an XML reader * @throws ParserConfigurationException when there are errors getting an XML reader */ - public static BeanReader createBeanReader( Class clazz ) + public static BeanReader createBeanReader( Class clazz ) throws IntrospectionException, SAXException, ParserConfigurationException { BeanReader beanReader = new BeanReader( getXMLReader() ); @@ -828,7 +827,7 @@ { String literalValue = (String) value; Expression expr = CompositeExpression.parse( literalValue, factory ); - + if ( expr != null ) { value = expr; @@ -1086,8 +1085,7 @@ /** * Debugging function. - * @param project - * @param classLoader + * @param classLoader the class loader */ public static void displayClassLoaderContents( ForeheadClassLoader classLoader ) { No revision No revision 1.37.4.14 +5 -5 maven/src/java/org/apache/maven/cli/App.java Index: App.java =================================================================== RCS file: /home/cvs/maven/src/java/org/apache/maven/cli/App.java,v retrieving revision 1.37.4.13 retrieving revision 1.37.4.14 diff -u -r1.37.4.13 -r1.37.4.14 --- App.java 24 Mar 2004 11:04:53 -0000 1.37.4.13 +++ App.java 28 Mar 2004 21:27:26 -0000 1.37.4.14 @@ -219,7 +219,7 @@ * * @param commandLine The command line parser. */ - protected void setCli( CommandLine commandLine ) + protected void setCli( CommandLine commandLine ) { this.commandLine = commandLine; } @@ -250,7 +250,7 @@ * the local or remote repositories is malformed. * @throws Exception If any other exceptions occur. */ - public void initialize( String[] args ) + public void initialize( String[] args ) throws ParseException, MalformedURLException, IOException, Exception { setCli( CLIManager.parse( args ) ); @@ -296,7 +296,7 @@ { descriptorFile = new File(descriptorName); } - + descriptorFile = descriptorFile.getAbsoluteFile(); if ( !getCli().hasOption( WORKING_DIR ) ) { @@ -329,7 +329,7 @@ { workingDir = dir.getAbsolutePath(); } - + System.setProperty("user.dir", workingDir); } No revision No revision 1.4.4.4 +3 -4 maven/src/java/org/apache/maven/jelly/JellyBuildListener.java Index: JellyBuildListener.java =================================================================== RCS file: /home/cvs/maven/src/java/org/apache/maven/jelly/JellyBuildListener.java,v retrieving revision 1.4.4.3 retrieving revision 1.4.4.4 diff -u -r1.4.4.3 -r1.4.4.4 --- JellyBuildListener.java 1 Mar 2004 22:36:36 -0000 1.4.4.3 +++ JellyBuildListener.java 28 Mar 2004 21:27:27 -0000 1.4.4.4 @@ -67,12 +67,11 @@ { setDebug( newDebug ); } - - public void setDebug( boolean debug ) + + public void setDebug( boolean debug ) { - this.debug = debug; + this.debug = debug; } - public void buildFinished( BuildEvent event ) { 1.7.4.3 +1 -1 maven/src/java/org/apache/maven/jelly/JellyPropsHandler.java Index: JellyPropsHandler.java =================================================================== RCS file: /home/cvs/maven/src/java/org/apache/maven/jelly/JellyPropsHandler.java,v retrieving revision 1.7.4.2 retrieving revision 1.7.4.3 diff -u -r1.7.4.2 -r1.7.4.3 --- JellyPropsHandler.java 1 Mar 2004 22:36:36 -0000 1.7.4.2 +++ JellyPropsHandler.java 28 Mar 2004 21:27:27 -0000 1.7.4.3 @@ -90,7 +90,7 @@ public Hashtable getProperties() { Hashtable h = new Hashtable(); - for ( Iterator i = this.context.getVariableNames(); i.hasNext(); ) + for ( Iterator i = this.context.getVariableNames(); i.hasNext();) { String name = (String) i.next(); Object value = this.context.getVariable( name ); 1.16.4.6 +5 -5 maven/src/java/org/apache/maven/jelly/JellyUtils.java Index: JellyUtils.java =================================================================== RCS file: /home/cvs/maven/src/java/org/apache/maven/jelly/JellyUtils.java,v retrieving revision 1.16.4.5 retrieving revision 1.16.4.6 diff -u -r1.16.4.5 -r1.16.4.6 --- JellyUtils.java 1 Mar 2004 22:36:36 -0000 1.16.4.5 +++ JellyUtils.java 28 Mar 2004 21:27:27 -0000 1.16.4.6 @@ -209,14 +209,14 @@ } /** - * Debugging function to show the differences between two Jelly contexts. . - * @param ctx1 - * @param ctx2 + * Debugging function to show the differences between two Jelly contexts. + * @param ctx1 first context + * @param ctx2 second context */ public static void compareContexts( MavenJellyContext ctx1, MavenJellyContext ctx2 ) { System.out.println( "======== compare contexts ========" ); - for ( Iterator i = ctx1.getVariableNames(); i.hasNext(); ) + for ( Iterator i = ctx1.getVariableNames(); i.hasNext();) { String name = ( String ) i.next(); if ( ctx2.getVariable( name ) == null ) No revision No revision 1.2.2.6 +10 -10 maven/src/java/org/apache/maven/jelly/tags/werkz/MavenAttainGoalTag.java Index: MavenAttainGoalTag.java =================================================================== RCS file: /home/cvs/maven/src/java/org/apache/maven/jelly/tags/werkz/MavenAttainGoalTag.java,v retrieving revision 1.2.2.5 retrieving revision 1.2.2.6 diff -u -r1.2.2.5 -r1.2.2.6 --- MavenAttainGoalTag.java 1 Mar 2004 22:36:37 -0000 1.2.2.5 +++ MavenAttainGoalTag.java 28 Mar 2004 21:27:27 -0000 1.2.2.6 @@ -36,7 +36,7 @@ /** * Replacement for werkz's <code>AttainGoalTag</code> which will lazy initialise goals. - * + * * @author <a href="mailto:[EMAIL PROTECTED]">Brett Porter</a> * @version $Id$ */ @@ -58,7 +58,7 @@ /** * Set the <code>Session</code> to use. - * + * * @param session The session. */ public void setSession( Session session ) @@ -68,19 +68,19 @@ /** * Retrieve the <code>Session</code> to use, if set. - * + * * @return The session or null. */ public Session getSession() { if ( this.session == null ) { - /* TODO: this is for compatibility - do we want the user to request a new session instead? + /* TODO: this is for compatibility - do we want the user to request a new session instead? eg force=true on the tag not great to tie variables to session if we are creating a new one */ Session session = ( Session ) getContext().getVariable( PluginManager.GLOBAL_SESSION_KEY ); this.session = new JellySession( ( ( MavenJellyContext ) getContext() ).getXMLOutput() ); - for ( Iterator i = session.getAttributes().keySet().iterator(); i.hasNext(); ) + for ( Iterator i = session.getAttributes().keySet().iterator(); i.hasNext();) { String key = ( String ) i.next(); this.session.setAttribute( key, session.getAttribute( key ) ); @@ -159,7 +159,7 @@ /** * Define a goal. - * + * * @param output The output sink. * @throws JellyTagException If an error occurs while executing the tag. */ @@ -180,8 +180,8 @@ return this.name; } - public WerkzProject getProject() - { - return (WerkzProject) getContext().getVariable(MavenConstants.WERKZ_PROJECT); + public WerkzProject getProject() + { + return (WerkzProject) getContext().getVariable(MavenConstants.WERKZ_PROJECT); } } 1.2.4.10 +6 -6 maven/src/java/org/apache/maven/jelly/tags/werkz/MavenGoalTag.java Index: MavenGoalTag.java =================================================================== RCS file: /home/cvs/maven/src/java/org/apache/maven/jelly/tags/werkz/MavenGoalTag.java,v retrieving revision 1.2.4.9 retrieving revision 1.2.4.10 diff -u -r1.2.4.9 -r1.2.4.10 --- MavenGoalTag.java 28 Mar 2004 14:16:02 -0000 1.2.4.9 +++ MavenGoalTag.java 28 Mar 2004 21:27:27 -0000 1.2.4.10 @@ -35,7 +35,7 @@ * to be redefined once defined. * For Jelly scripts that are run which contain this tag it is assumed that * they are being run in the order whereby the first definition wins. - * + * * @author <a href="mailto:[EMAIL PROTECTED]">Brett Porter</a> * @version $Id$ */ @@ -55,7 +55,7 @@ /** * Define a goal. - * + * * @param output The output sink. * @throws JellyTagException If an error occurs while executing the tag. */ @@ -106,8 +106,8 @@ } } - public WerkzProject getProject() - { - return (WerkzProject) getContext().getVariable(MavenConstants.WERKZ_PROJECT); + public WerkzProject getProject() + { + return (WerkzProject) getContext().getVariable(MavenConstants.WERKZ_PROJECT); } } No revision No revision 1.3.4.12 +16 -16 maven/src/java/org/apache/maven/plugin/GoalToJellyScriptHousingMapper.java Index: GoalToJellyScriptHousingMapper.java =================================================================== RCS file: /home/cvs/maven/src/java/org/apache/maven/plugin/GoalToJellyScriptHousingMapper.java,v retrieving revision 1.3.4.11 retrieving revision 1.3.4.12 diff -u -r1.3.4.11 -r1.3.4.12 --- GoalToJellyScriptHousingMapper.java 1 Mar 2004 22:36:37 -0000 1.3.4.11 +++ GoalToJellyScriptHousingMapper.java 28 Mar 2004 21:27:27 -0000 1.3.4.12 @@ -66,14 +66,14 @@ /** */ private final WerkzProject goalProject = new WerkzProject(); - + /** */ private String defaultGoalName; private final HashSet resolvedPlugins = new HashSet(); private static final Log log = LogFactory.getLog( GoalToJellyScriptHousingMapper.class ); - + /** * Default constructor. */ @@ -83,7 +83,7 @@ /** * Merge parent mapper. Used to setup a transient submapper. - * + * * @param mapper mapper to copy from * @todo figure out which are actually needed, change redundant initialisers by removing here, * or adding others to default constructor (eg goalProject init) @@ -95,7 +95,7 @@ mergeMap( pluginDynaTagDepsMap, mapper.pluginDynaTagDepsMap ); mergeMap( goalPluginMap, mapper.goalPluginMap ); - for ( Iterator i = mapper.preGoalDecoratorsMap.keySet().iterator(); i.hasNext(); ) + for ( Iterator i = mapper.preGoalDecoratorsMap.keySet().iterator(); i.hasNext();) { String goalName = ( String ) i.next(); Set s = ( Set ) mapper.preGoalDecoratorsMap.get( goalName ); @@ -109,7 +109,7 @@ sExist.addAll( s ); } } - for ( Iterator i = mapper.postGoalDecoratorsMap.keySet().iterator(); i.hasNext(); ) + for ( Iterator i = mapper.postGoalDecoratorsMap.keySet().iterator(); i.hasNext();) { String goalName = ( String ) i.next(); Set s = ( Set ) mapper.postGoalDecoratorsMap.get( goalName ); @@ -129,7 +129,7 @@ defaultGoalName = mapper.defaultGoalName; } - for ( Iterator i = mapper.goalProject.getGoals().iterator(); i.hasNext(); ) + for ( Iterator i = mapper.goalProject.getGoals().iterator(); i.hasNext();) { Goal goal = ( Goal ) i.next(); Goal existingGoal = goalProject.getGoal( goal.getName() ); @@ -139,11 +139,11 @@ } else { - for ( Iterator j = goal.getPrecursors().iterator(); j.hasNext(); ) + for ( Iterator j = goal.getPrecursors().iterator(); j.hasNext();) { existingGoal.addPrecursor( ( Goal ) j.next() ); } - for ( Iterator j = goal.getPostcursors().iterator(); j.hasNext(); ) + for ( Iterator j = goal.getPostcursors().iterator(); j.hasNext();) { existingGoal.addPostcursor( ( Goal ) j.next() ); } @@ -155,7 +155,7 @@ /** * merge source into target, but don't override anything. Kind of the * opposite of putAll to some extent. - * + * * @todo Surely can be more efficient. * @todo if there isn't already a util function for this there should be. */ @@ -233,7 +233,7 @@ /** * Find the appropriate plugins that provide the give goal and its precursors. * Goals such as ${report}:register will need to be resolved lazily. - * + * * @param goal the goal to find * @return the set of plugins * @throws NoSuchGoalException if the given goal is in no plugins @@ -299,7 +299,7 @@ List precursors = goal.getPrecursors(); - for ( Iterator i = precursors.iterator(); i.hasNext(); ) + for ( Iterator i = precursors.iterator(); i.hasNext();) { Goal eachPrecursor = ( Goal ) i.next(); @@ -315,7 +315,7 @@ /** * Resolve plugins that provide dynamic tags for the given set of plugins. - * + * * @param plugins the plugins containing tags * @return the plugins providing tags, in insertion order */ @@ -325,12 +325,12 @@ // depends on these remaining first InsertionOrderedSet resolvedDynaTagPlugins = new InsertionOrderedSet(); - for ( Iterator i = plugins.iterator(); i.hasNext(); ) + for ( Iterator i = plugins.iterator(); i.hasNext();) { JellyScriptHousing plugin = ( JellyScriptHousing ) i.next(); Set dynaTagDeps = getPluginDynaTagDeps( plugin ); - for ( Iterator j = dynaTagDeps.iterator(); j.hasNext(); ) + for ( Iterator j = dynaTagDeps.iterator(); j.hasNext();) { LinkedList dynaTagUris = new LinkedList(); Set seen = new HashSet(); @@ -385,7 +385,7 @@ { getPluginDynaTagDeps( housing ).remove( uri ); } - + public void addDynaTagLib( String tagLibUri, JellyScriptHousing jellyScriptHousing ) { dynaTagPluginMap.put( tagLibUri, jellyScriptHousing ); @@ -436,7 +436,7 @@ } /** - * @return + * @return goal names */ Set getGoalNames() { 1.16.4.12 +31 -24 maven/src/java/org/apache/maven/plugin/PluginCacheManager.java Index: PluginCacheManager.java =================================================================== RCS file: /home/cvs/maven/src/java/org/apache/maven/plugin/PluginCacheManager.java,v retrieving revision 1.16.4.11 retrieving revision 1.16.4.12 diff -u -r1.16.4.11 -r1.16.4.12 --- PluginCacheManager.java 28 Mar 2004 19:14:34 -0000 1.16.4.11 +++ PluginCacheManager.java 28 Mar 2004 21:27:27 -0000 1.16.4.12 @@ -34,7 +34,7 @@ /** * Plugin cache management. - * + * * @author <a href="mailto:[EMAIL PROTECTED]">Brett Porter</a> */ final class PluginCacheManager implements PluginDefinitionHandler @@ -115,7 +115,7 @@ * a JSL transformation. */ private Properties pluginDynaTagDepsCache = new Properties(); - + /** Default constructor. */ public PluginCacheManager() { @@ -165,7 +165,7 @@ { log.debug( "Saving caches to " + directory.getAbsolutePath() ); } - + File f = new File( directory, VALID_CACHE ); f.delete(); storeProperties( pluginCache, new File( directory, PLUGINS_CACHE ), "plugins cache" ); @@ -185,7 +185,6 @@ /** * Write the given properties to the given file in the unpacked dir * @param properties the properties object to store - * @param name the file name within the unpacked plugins directory to store the properties * @param header the header for the written properties * @throws FileNotFoundException when the unpacked plugin directory can't be found * @throws IOException if there is a problem storing properties @@ -197,10 +196,10 @@ properties.store(stream, header); stream.close(); } - + /** * @return a loaded properties file from disk or a new one if there are any problems - * @param name the name of the file within the unpacked plugins dir to load + * @param file the file within the unpacked plugins dir to load */ private Properties loadProperties( File file ) { @@ -281,7 +280,7 @@ { appendCsvProperty( pluginDynaTagDepsCache, housing.getName(), uri ); } - + public void removePluginDynaTagDep(JellyScriptHousing housing, String uri) { String prop = (String) pluginDynaTagDepsCache.get( housing.getName() ); @@ -356,7 +355,7 @@ for ( Iterator i = goalCache.keySet().iterator(); i.hasNext();) { String eachGoal = (String) i.next(); - + if ( pluginCache.getProperty( eachGoal ).equals( pluginName ) ) { i.remove(); @@ -374,14 +373,16 @@ void mapPlugins(GoalToJellyScriptHousingMapper mapper, PluginManager manager) throws Exception { Map pluginHousings = manager.getPluginHousings(); - - for ( Iterator i = pluginDynaTagDepsCache.keySet().iterator(); i.hasNext(); ) + + for ( Iterator i = pluginDynaTagDepsCache.keySet().iterator(); i.hasNext();) { String pluginName = (String) i.next(); JellyScriptHousing housing = (JellyScriptHousing) pluginHousings.get( pluginName ); - if ( housing == null ) { + if ( housing == null ) + { housing = manager.loadPlugin( pluginName ); - if ( housing == null ) { + if ( housing == null ) + { sessionLog.warn("plugin " + pluginName + " is cached as a dynatag dep, but no longer present."); continue; } @@ -395,14 +396,16 @@ } } - for ( Iterator i = pluginCache.keySet().iterator(); i.hasNext(); ) + for ( Iterator i = pluginCache.keySet().iterator(); i.hasNext();) { String goalName = ( String ) i.next(); String pluginName = pluginCache.getProperty( goalName ); JellyScriptHousing housing = (JellyScriptHousing) pluginHousings.get( pluginName ); - if ( housing == null ) { + if ( housing == null ) + { housing = manager.loadPlugin( pluginName ); - if ( housing == null ) { + if ( housing == null ) + { sessionLog.warn("plugin " + pluginName + " is cached, but no longer present."); continue; } @@ -416,10 +419,10 @@ } String prereqs = goal.substring( index + 1 ); - mapper.addGoal(goalName, prereqs, description, housing); + mapper.addGoal(goalName, prereqs, description, housing); } - - for ( Iterator i = callbackCache.keySet().iterator(); i.hasNext(); ) + + for ( Iterator i = callbackCache.keySet().iterator(); i.hasNext();) { String callbackName = ( String ) i.next(); boolean isPreGoal = callbackName.endsWith(".pre"); @@ -433,9 +436,11 @@ { String pluginName = tok.nextToken(); JellyScriptHousing housing = (JellyScriptHousing) pluginHousings.get( pluginName ); - if ( housing == null ) { + if ( housing == null ) + { housing = manager.loadPlugin( pluginName ); - if ( housing == null ) { + if ( housing == null ) + { sessionLog.warn("plugin " + pluginName + " is cached for callbacks, but no longer present."); continue; } @@ -450,15 +455,17 @@ } } } - - for ( Iterator i = dynaTagLibCache.keySet().iterator(); i.hasNext(); ) + + for ( Iterator i = dynaTagLibCache.keySet().iterator(); i.hasNext();) { String uri = ( String ) i.next(); String pluginName = dynaTagLibCache.getProperty( uri ); JellyScriptHousing housing = (JellyScriptHousing) pluginHousings.get( pluginName ); - if ( housing == null ) { + if ( housing == null ) + { housing = manager.loadPlugin( pluginName ); - if ( housing == null ) { + if ( housing == null ) + { sessionLog.warn("plugin " + pluginName + " is cached for a dynatag library, but no longer present."); continue; } 1.1.2.3 +3 -4 maven/src/java/org/apache/maven/plugin/PluginDefinitionHandler.java Index: PluginDefinitionHandler.java =================================================================== RCS file: /home/cvs/maven/src/java/org/apache/maven/plugin/PluginDefinitionHandler.java,v retrieving revision 1.1.2.2 retrieving revision 1.1.2.3 diff -u -r1.1.2.2 -r1.1.2.3 --- PluginDefinitionHandler.java 1 Mar 2004 22:36:38 -0000 1.1.2.2 +++ PluginDefinitionHandler.java 28 Mar 2004 21:27:27 -0000 1.1.2.3 @@ -18,8 +18,7 @@ */ /** - * - * + * * @author <a href="[EMAIL PROTECTED]">Brett Porter</a> * @version $Id$ */ @@ -32,4 +31,4 @@ void addPreGoal( String name, JellyScriptHousing housing ); void addGoal( String name, String prereqs, String description, JellyScriptHousing housing ); void addDynaTagLib( String tagLibUri, JellyScriptHousing housing ); -} \ No newline at end of file +} 1.70.4.31 +60 -53 maven/src/java/org/apache/maven/plugin/PluginManager.java Index: PluginManager.java =================================================================== RCS file: /home/cvs/maven/src/java/org/apache/maven/plugin/PluginManager.java,v retrieving revision 1.70.4.30 retrieving revision 1.70.4.31 diff -u -r1.70.4.30 -r1.70.4.31 --- PluginManager.java 28 Mar 2004 19:14:34 -0000 1.70.4.30 +++ PluginManager.java 28 Mar 2004 21:27:27 -0000 1.70.4.31 @@ -83,7 +83,7 @@ * <p/> * The <code>PluginManager</code> deals with all aspects of a plugins lifecycle. * </p> - * + * * @author <a href="mailto:[EMAIL PROTECTED]">Jason van Zyl</a> * @author <a href="mailto:[EMAIL PROTECTED]">bob mcwhirter</a> * @author <a href="mailto:[EMAIL PROTECTED]">Brett Porter</a> @@ -135,7 +135,7 @@ /** * Default constructor. - * + * * @param session The MavenSession this plugin manager will use * until Maven shuts down. */ @@ -146,7 +146,7 @@ /** * Expand the plugin jars if needed - * + * * @throws MavenException when the plugin jars can't be expanded */ private void expandPluginJars( File directory ) throws MavenException @@ -169,8 +169,8 @@ /** * Load unpacked plugins. - * - * @throws MavenException when the plugin jars can't be expanded + * @param directory The unpacked plugins directory + * @throws Exception when the plugin jars can't be expanded */ private void loadUnpackedPlugins( File directory ) throws Exception { @@ -189,8 +189,8 @@ { File pluginDir = files[i]; - if ( pluginDir.isDirectory() && new File( pluginDir, "project.xml" ).exists() && - !isLoaded( pluginDir.getName() ) ) + if ( pluginDir.isDirectory() && new File( pluginDir, "project.xml" ).exists() + && !isLoaded( pluginDir.getName() ) ) { loadedNewPlugins = true; JellyScriptHousing housing = loadPlugin( pluginDir ); @@ -202,12 +202,12 @@ if ( loadedNewPlugins ) { cacheManager.saveCache( unpackedPluginsDir ); - } + } } /** * Initialize all plugins. - * + * * @throws Exception If an error occurs while initializing any plugin. */ public void initialize() throws Exception @@ -250,12 +250,12 @@ log.debug( "Loading plugin '" + pluginName + "'" ); JellyScriptHousing jellyScriptHousing = new JellyScriptHousing( pluginDir, mavenSession.getRootContext() ); - + pluginHousings.put( pluginName, jellyScriptHousing ); - + return jellyScriptHousing; } - else + else { log.debug( "Skipping already loaded plugin '" + pluginName + "'" ); return (JellyScriptHousing) pluginHousings.get( pluginName ); @@ -268,11 +268,11 @@ } /** - * @param project - * @param unpackedPluginDirectory - * @param jelly - * @return - * @throws Exception + * @param project + * @param unpackedPluginDirectory + * @param jelly + * @return + * @throws Exception * @todo [1.0] refactor into housing * @deprecated get rid of this - it duplicates functionality in the housing */ @@ -290,10 +290,10 @@ } /** - * @param project - * @param classesDirectory - * @param jelly - * @return + * @param project + * @param classesDirectory + * @param jelly + * @return * @todo [1.0] into the housing? */ private JellyScriptHousing createJellyScriptHousing( Project project, File jelly ) @@ -310,7 +310,7 @@ /** * Process the dependencies of the project, adding dependencies to the * appropriate classloader etc - * + * * @throws MalformedURLException if a file can't be converted to a URL. * @throws Exception for any other issue. FIXME */ @@ -327,7 +327,7 @@ log.debug( "Processing dependencies for project " + project.getName() + "; classloader " + projectClassLoader ); // add the dependencies to the classpath - for ( Iterator i = project.getArtifacts().iterator(); i.hasNext(); ) + for ( Iterator i = project.getArtifacts().iterator(); i.hasNext();) { Artifact artifact = ( Artifact ) i.next(); Dependency dependency = artifact.getDependency(); @@ -349,15 +349,19 @@ { if ( dependencyClassLoader != null ) { - log.debug( "DEPRECATION: " + dependency.getId() + " in project " + project.getId() + " forces the classloader '" + dependencyClassLoader + "'" ); + log.debug( "DEPRECATION: " + dependency.getId() + " in project " + + project.getId() + " forces the classloader '" + + dependencyClassLoader + "'" ); log.debug( " This behaviour is deprecated. Please refer to the FAQ" ); ForeheadClassLoader loader = Forehead.getInstance().getClassLoader( dependencyClassLoader ); if ( loader == null ) { - log.warn( "classloader '" + dependencyClassLoader + "' not found. Adding dependencies to the project classloader instead" ); + log.warn( "classloader '" + dependencyClassLoader + + "' not found. Adding dependencies to the project classloader instead" ); loader = projectClassLoader; } - else { + else + { log.debug( "poking dependency " + artifact.getFile() + " into classloader " + dependencyClassLoader ); } loader.addURL( artifact.getFile().toURL() ); @@ -384,8 +388,8 @@ /** * Attain the goals. - * - * @throws org.apache.maven.UnknownGoalException + * + * @throws Exception * If one of the specified * goals refers to an non-existent goal. * @throws Exception If an exception occurs while running a goal. FIXME this is bad @@ -479,7 +483,8 @@ // So the reactor can process projects but not run any goals goals = Collections.EMPTY_LIST; } - else { + else + { // Always run build:start and build:end goals.add( 0, "build:start" ); goals.add( "build:end" ); @@ -505,7 +510,7 @@ // Dependencies must be processed after the driver is run for compatibility processDependencies( project ); - for ( Iterator j = projectHousings.iterator(); j.hasNext(); ) + for ( Iterator j = projectHousings.iterator(); j.hasNext();) { JellyScriptHousing housing = ( JellyScriptHousing ) j.next(); runScript( housing, baseContext ); @@ -513,15 +518,15 @@ transientMapper.addResolvedPlugins( projectHousings ); // Plugin Jelly scripts - for ( Iterator i = goals.iterator(); i.hasNext(); ) + for ( Iterator i = goals.iterator(); i.hasNext();) { String goalName = ( String ) i.next(); - + pluginSet.addAll( prepAttainGoal( goalName, baseContext, transientMapper )); } // Plugin Jelly scripts - for ( Iterator i = goals.iterator(); i.hasNext(); ) + for ( Iterator i = goals.iterator(); i.hasNext();) { String goalName = ( String ) i.next(); log.debug( "attaining goal " + goalName ); @@ -540,7 +545,7 @@ { delayedPops.addAll( pluginSet ); - for ( Iterator j = delayedPops.iterator(); j.hasNext(); ) + for ( Iterator j = delayedPops.iterator(); j.hasNext();) { JellyScriptHousing housing = ( JellyScriptHousing ) j.next(); @@ -552,7 +557,7 @@ /** * Use the name of a goal to lookup all the plugins (that are stored in the plugin housings) that need to be * executed in order to satisfy all the required preconditions for successful goal attainment. - * + * * @param goalName the goal * @param baseContext the base context to attain in * @return a set of plugins required to attain the goal @@ -563,7 +568,7 @@ { Set pluginSet = goalMapper.resolveJellyScriptHousings( goalName ); - for ( Iterator j = pluginSet.iterator(); j.hasNext(); ) + for ( Iterator j = pluginSet.iterator(); j.hasNext();) { JellyScriptHousing housing = ( JellyScriptHousing ) j.next(); artifactIdToHousingMap.put( housing.getProject().getArtifactId(), housing ); @@ -587,7 +592,7 @@ /** * Sets the pluginsDir attribute of the PluginManager object - * + * * @param dir The maven plugin directory. */ private void setPluginsDir( File dir ) @@ -597,7 +602,7 @@ /** * Retrieve the directory containing all plugins. - * + * * @return The directory containing all plugins. */ private File getPluginsDir() @@ -607,7 +612,7 @@ /** * Sets the directory where the unpacked plugins are located. - * + * * @param dir The directory where the unpacked plugins are located. */ private void setUnpackedPluginsDir( File dir ) @@ -617,7 +622,7 @@ /** * Sets the directory where the unpacked plugins are located. - * + * * @return the directory where the unpacked plugins are located. */ private File getUnpackedPluginsDir() @@ -626,7 +631,7 @@ } /** - * @return + * @return */ public Set getGoalNames() { @@ -637,12 +642,13 @@ { // By default, don't copy to the unpacked plugins directory - only use this dependency for this project installPlugin( file, parentProject, false ); - // TODO: we should unload the plugin after the project is done in this case - we really need to define the lifecycle of plugins + // TODO: we should unload the plugin after the project is done in this case - we really need + // to define the lifecycle of plugins } /** * Load and install a plugin. - * + * * @param file the file to install. Must be a plugin jar * @param parentProject the project to load the installed plugin into * @todo remove any old one, but don't save updated cache @@ -650,7 +656,7 @@ */ public void installPlugin( File file, Project parentProject, boolean installToUnpackedPluginDirectory ) throws Exception { - if ( installToUnpackedPluginDirectory ) + if ( installToUnpackedPluginDirectory ) { FileUtils.copyFileToDirectory( file, unpackedPluginsDir ); } @@ -659,10 +665,10 @@ pluginName = pluginName.substring( 0, pluginName.indexOf( ".jar" ) ); if ( !isLoaded( pluginName ) ) - { + { // expand it File unpackedPluginDir = unpackPlugin( file ); - if ( unpackedPluginDir != null ) + if ( unpackedPluginDir != null ) { JellyScriptHousing housing = loadPlugin( unpackedPluginDir ); housing.parse( cacheManager ); @@ -673,7 +679,7 @@ } cacheManager.saveCache( unpackedPluginsDir ); } - else + else { throw new MavenException( "Not a valid plugin file: " + file ); } @@ -708,7 +714,7 @@ /** * Unpack the plugin. - * + * * @throws MavenException if there was a problem unpacking */ File unpackPlugin( File jarFile ) throws MavenException @@ -772,7 +778,8 @@ // TODO: should differentiate between plugins and script housings better jellyScriptHousing.getProject().verifyDependencies(); processDependencies( jellyScriptHousing.getProject() ); - ForeheadClassLoader pluginClassLoader = (ForeheadClassLoader) jellyScriptHousing.getProject().getContext().getClassLoader(); + ForeheadClassLoader pluginClassLoader = (ForeheadClassLoader) jellyScriptHousing.getProject() + .getContext().getClassLoader(); pluginClassLoader.addURL( jellyScriptHousing.getPluginDirectory().toURL() ); } @@ -787,13 +794,13 @@ context.setRootURL( oldRoot ); context.setCurrentURL( oldCurrent ); - + return script; } /** - * @param context - * @throws Exception + * @param context + * @throws Exception */ void runScript( JellyScriptHousing jellyScriptHousing, MavenJellyContext context ) throws Exception { 1.1.4.10 +1 -1 maven/src/java/org/apache/maven/plugin/PluginScriptParser.java Index: PluginScriptParser.java =================================================================== RCS file: /home/cvs/maven/src/java/org/apache/maven/plugin/PluginScriptParser.java,v retrieving revision 1.1.4.9 retrieving revision 1.1.4.10 diff -u -r1.1.4.9 -r1.1.4.10 --- PluginScriptParser.java 27 Mar 2004 23:54:39 -0000 1.1.4.9 +++ PluginScriptParser.java 28 Mar 2004 21:27:27 -0000 1.1.4.10 @@ -112,7 +112,7 @@ log.debug( rawName + " does not have a uri in " + jellyScriptHousing.getName() ); } else - { + { log.debug( rawName + " importing from uri " + importUri ); try { No revision No revision 1.24.4.8 +2 -2 maven/src/java/org/apache/maven/project/Build.java Index: Build.java =================================================================== RCS file: /home/cvs/maven/src/java/org/apache/maven/project/Build.java,v retrieving revision 1.24.4.7 retrieving revision 1.24.4.8 diff -u -r1.24.4.7 -r1.24.4.8 --- Build.java 1 Mar 2004 22:36:38 -0000 1.24.4.7 +++ Build.java 28 Mar 2004 21:27:27 -0000 1.24.4.8 @@ -324,7 +324,7 @@ { return; } - + if ( sourceDirectory == null ) { sourceDirectory = parent.sourceDirectory; 1.8.4.2 +2 -5 maven/src/java/org/apache/maven/project/Contributor.java Index: Contributor.java =================================================================== RCS file: /home/cvs/maven/src/java/org/apache/maven/project/Contributor.java,v retrieving revision 1.8.4.1 retrieving revision 1.8.4.2 diff -u -r1.8.4.1 -r1.8.4.2 --- Contributor.java 1 Mar 2004 22:36:38 -0000 1.8.4.1 +++ Contributor.java 28 Mar 2004 21:27:27 -0000 1.8.4.2 @@ -149,7 +149,7 @@ { this.url = url; } - + /** * Gets the timezone offset of the Contributor object. * @@ -166,11 +166,8 @@ * * @param timezone offset of the Contributor */ - public void setTimezone(String timezone) { this.timezone = timezone; } - - } 1.2.10.2 +8 -8 maven/src/java/org/apache/maven/project/PackageGroup.java Index: PackageGroup.java =================================================================== RCS file: /home/cvs/maven/src/java/org/apache/maven/project/PackageGroup.java,v retrieving revision 1.2.10.1 retrieving revision 1.2.10.2 diff -u -r1.2.10.1 -r1.2.10.2 --- PackageGroup.java 1 Mar 2004 22:36:38 -0000 1.2.10.1 +++ PackageGroup.java 28 Mar 2004 21:27:27 -0000 1.2.10.2 @@ -29,42 +29,42 @@ { private String title; private String packages; - + /** * Returns the package patterns. * @return String */ - public String getPackages() + public String getPackages() { return packages; } /** * Returns the title of this package group. - * + * * @return String */ - public String getTitle() + public String getTitle() { return title; } /** * Sets the package patterns to use. - * + * * @param packages The packages to set */ - public void setPackages(String packages) + public void setPackages(String packages) { this.packages = packages; } /** * Sets the title of this package group. - * + * * @param title The title to set */ - public void setTitle(String title) + public void setTitle(String title) { this.title = title; }
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]