You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Gilles Dodinet <rh...@free.fr> on 2004/11/07 13:41:27 UTC
Unable to attain goal [build:end] -- null
hi-
im writing a plugin using mostly java and get a NPE at build:end when,
and only when, a specific custom tag is called. ive searched google for
this problem but didnot anything helpful (besides xref).
below the jelly scripts and the debug output. i dont think im doing
fancy stuff in the tag however i attach it below - maybe is it relevant.
also please note that the problem only appears when calling the goal
pde:test defined in maven.xml (below).
thanks for your help !
-- plugin.jelly --
<project xmlns:pde="jelly:org.codehaus.mevenide.pde.taglib.PdeTaglib"
xmlns:j="jelly:core"
xmlns:maven="jelly:maven"
xmlns:ant="jelly:ant">
<goal name="pde:plugin" prereqs="test:test">
<pde:plugin />
</goal>
<goal name="pde:classpath">
<pde:classpath var="eclipseArtifacts" />
<ant:path id="eclipse.dependency.classpath">
<j:forEach var="artifact" items="${eclipseArtifacts}">
<ant:pathelement location="${artifact}"/>
</j:forEach>
</ant:path>
<maven:addPath id="maven.dependency.classpath"
refid="eclipse.dependency.classpath" />
</goal>
</project>
-- maven.xml --
<project>
<preGoal name="build:start">
<attainGoal name="pde:classpath"/>
</preGoal>
<goal name="pde:test" prereqs="pde:plugin"/>
</project>
-- debug output --
[snip]
Using projectPropertiesFile:
E:\mevenide-workspace-HEAD\maven-pde-plugin\m1\test\resources\it.v3\project.properties
Using projectBuildPropertiesFile:
E:\mevenide-workspace-HEAD\maven-pde-plugin\m1\test\resources\it.v3\build.properties
replacing a context when the stack is not empty
attaining goal build:end
BUILD FAILED
java.lang.NullPointerException
com.werken.werkz.UnattainableGoalException: Unable to obtain goal
[build:end] -- null
at com.werken.werkz.Goal.fire(Goal.java:646)
at com.werken.werkz.Goal.attain(Goal.java:575)
at com.werken.werkz.WerkzProject.attainGoal(WerkzProject.java:193)
[snip]
-- PdePluginTag --
public void doTag(XMLOutput arg0) throws JellyTagException {
try {
PdePluginBuilder builder = new PdePluginBuilder();
String artifactName = (String)
getContext().getVariable("maven.final.name");
builder.setArtifactName(artifactName);
File basedir = new File((String)
getContext().getVariable("basedir"));
builder.setBasedir(basedir);
builder.setClassesLocation((String)
getContext().getVariable("maven.build.dir"));
builder.setExcludes((String)
getContext().getVariable("maven.pde.excludes"));
builder.setLibFolder((String)
getContext().getVariable("maven.pde.libTargetPath"));
builder.setProject(new MavenProjectConverter((Project)
getContext().getVariable("pom")).convert());
List includes = getCommonIncludes(basedir);
//@todo custom includes
builder.setIncludes(includes);
builder.build();
}
catch (PdePluginException e) {
throw new JellyTagException("Unable to build plugin", e);
}
}
-- gd
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Unable to attain goal [build:end] -- null
Posted by Gilles Dodinet <rh...@free.fr>.
Gilles Dodinet wrote:
> hi-
>
> im writing a plugin using mostly java and get a NPE at build:end when,
> and only when, a specific custom tag is called. ive searched google
> for this problem but didnot anything helpful (besides xref).
i should certainly add that the tag executes normally (values correctly
replaced in the specified files and zip files correctly constructed).
thanks.
-- gd
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org