You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by ji...@codehaus.org on 2004/09/13 08:38:12 UTC

[jira] Closed: (MAVEN-1445) junit test PluginManagerTest.java failure

Message:

   The following issue has been closed.

   Resolver: Brett Porter
       Date: Mon, 13 Sep 2004 2:37 AM

it worked for me with a clean checkout of CVS HEAD of maven and maven-plugins. Are you sure?

Anyway, I have updated all the tag library dependencies (and commons-io for good measure) to 1.0.
---------------------------------------------------------------------
View the issue:
  http://jira.codehaus.org/browse/MAVEN-1445

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: MAVEN-1445
    Summary: junit test PluginManagerTest.java failure
       Type: Bug

     Status: Closed
   Priority: Critical
 Resolution: CANNOT REPRODUCE

 Original Estimate: Unknown
 Time Spent: Unknown
  Remaining: Unknown

    Project: maven
 Components: 
             plugin manager
   Versions:
             1.1

   Assignee: 
   Reporter: Wallace Peng

    Created: Mon, 13 Sep 2004 1:52 AM
    Updated: Mon, 13 Sep 2004 2:37 AM
Environment: Windows XP

Description:
cd maven_src
just run ant -f build-bootstrap.xml

everything works fine except PluginManager unit test.

Testcase: testPluginPropertySubstitution(org.apache.maven.plugin.PluginManagerTest):	Caused an ERROR
Error initialising plugin context
org.apache.maven.MavenException: Error initialising plugin context
	at org.apache.maven.plugin.PluginManager.getPluginContext(PluginManager.java:906)
	at org.apache.maven.plugin.PluginManagerTest.testPluginPropertySubstitution(PluginManagerTest.java:263)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
--- Nested Exception ---
org.apache.commons.jelly.JellyTagException: C:\opwv\mdm\maven\src\test\java\org\apache\maven\plugin\maven.home\plugins\jar\plugin.jelly:28:19: 
<project> java.lang.NullPointerException
	at org.apache.commons.jelly.impl.TagScript.handleException(TagScript.java:637)
	at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:242)
	at org.apache.maven.plugin.PluginManager.runScript(PluginManager.java:1018)
	at org.apache.maven.plugin.PluginManager.initialiseHousingPluginContext(PluginManager.java:719)
	at org.apache.maven.plugin.PluginManager.getPluginContext(PluginManager.java:903)
	at org.apache.maven.plugin.PluginManagerTest.testPluginPropertySubstitution(PluginManagerTest.java:263)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
Caused by: java.lang.NullPointerException
	at org.apache.commons.jelly.tags.ant.AntTagLibrary.createProject(AntTagLibrary.java:137)
	at org.apache.commons.jelly.tags.ant.AntTagLibrary.getProject(AntTagLibrary.java:103)
	at com.werken.werkz.jelly.ProjectTag.doTag(ProjectTag.java:107)
	at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:233)
	... 18 more
Root cause
java.lang.NullPointerException
	at org.apache.commons.jelly.tags.ant.AntTagLibrary.createProject(AntTagLibrary.java:137)
	at org.apache.commons.jelly.tags.ant.AntTagLibrary.getProject(AntTagLibrary.java:103)
	at com.werken.werkz.jelly.ProjectTag.doTag(ProjectTag.java:107)
	at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:233)
	at org.apache.maven.plugin.PluginManager.runScript(PluginManager.java:1018)
	at org.apache.maven.plugin.PluginManager.initialiseHousingPluginContext(PluginManager.java:719)
	at org.apache.maven.plugin.PluginManager.getPluginContext(PluginManager.java:903)
	at org.apache.maven.plugin.PluginManagerTest.testPluginPropertySubstitution(PluginManagerTest.java:263)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)


I checked the source code, found it failed in AntTagLibrary.java, 
ant tag version current maven depends on is 20030625.032346 which threw this exception. and I found this problem has been fixed in jelly ant tag library.
(jelly ant tag) below is the new version of 

    public static Project createProject(JellyContext context) {
        GrantProject project = new GrantProject();
        project.setPropsHandler(new JellyPropsHandler(context));

        BuildLogger logger = new NoBannerLogger();

        logger.setMessageOutputLevel( org.apache.tools.ant.Project.MSG_INFO );
        logger.setOutputPrintStream( System.out );
        logger.setErrorPrintStream( System.err);

        project.addBuildListener( logger );

        project.init();
        project.getBaseDir();
        if (context.getCurrentURL() != null) {
            project.setProperty("ant.file",
                    context.getCurrentURL().toExternalForm());
        }

        return project;
    }


in the jelly ant tag source tree.  Actually I found this problem caused by brett's 8/20 checkin.

Sugguestion: use the latest version of jelly ant tag.





---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org