You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Ca...@gru.com on 2004/01/13 15:49:09 UTC

testing maven plugins

Is there a standardized way of testing a maven plugin? I've developed one
for enforcement of our in-house packaging and deployment processes, and I've
been going through this install/test manual loop for like a day now. Is
there a way that I can [easily] test the plugin prior to installation?
Specifically, I'm talking about testing of the plugin.jelly.

 

Any advice would be much appreciated.

 

Thanks,

John Casey


${basedir} modified on invoking a plugin?

Posted by Oliver Nölle <ol...@bmw-carit.de>.
I have the following problem:

On invoking "maven site" the site gets created in the target directory of a
plugin, not the target directory of the project from which I invoke "maven
site".


More precisely
- my project contains a postgoal to java:compile in its maven.xml, which
calls a goal of a self-written plugin (code below)
- on invoking "maven site" this goal gets called once for compiling and
possibly another time when generating reports
- the output snippet below shows that first the destination path is set
correctly to errormanager\target,
but after registering the configured reports, the destination path is
suddenly set to the target of the self-written plugin
(maven-carit-plugin\target).
- this happens on a windows machine with maven-rc1


Anyone has a clue what causes this strange behaviour?
If I knew it would be a specific component responsible, I would file a bug
to JIRA...


Thanks for any help,

Oliver




OUTPUT SNIPPET
--------------
    [echo] Generating the Link Check Report...
maven-linkcheck-plugin:report:
    [copy] Copying 1 file to D:\projects\errormanager\target\generated-xdocs

    [echo] Generating the Task List...
xdoc:init:

maven-tasklist-plugin:report:
    [echo] Generating tasklist ...


xdoc:init:

xdoc:register-reports:
maven-jdepend-plugin:register:

maven-checkstyle-plugin:register:

maven-changes-plugin:register:

maven-changelog-plugin:register:

maven-developer-activity-plugin:register:

maven-file-activity-plugin:register:

maven-license-plugin:register:

maven-javadoc-plugin:register:

maven-jxr-plugin:register:

maven-junit-report-plugin:register:

maven-linkcheck-plugin:register:

maven-tasklist-plugin:register:


xdoc:generate-from-pom:
    [echo] Generating xdocs from POM ...





xdoc:transform:
xdoc:init:

xdoc:copy-resources:
    [copy] Copying 5 files to
C:\Programme\_dev\maven\plugins_unpacked\maven-carit-plugin-1.4\target\docs\
style
    [copy] Copying 89 files to
C:\Programme\_dev\maven\plugins_unpacked\maven-carit-plugin-1.4\target\docs\
images
About to use JSL stylesheet
file:/C:/Programme/_dev/maven/plugins_unpacked/maven-xdoc-plugin-1.4/plugin-
resources/site.jsl

xdoc:init:

xdoc:copy-user-resources:

xdoc:init:

xdoc:jelly-init:

xdoc:register-reports:






PLUGIN GOAL CODE
----------------
	<!-- ================================================================== -->
	<!-- ENHANCE                                                            -->
	<!-- ================================================================== -->
	<goal name="carit:enhance"
		description="enhances classes for use with FastObjects jdo (use this goal
as postGoal to java:compile in your maven.xml)">

		<j:set var="jdodir" value="etc/jdos"/>

		<ant:echo>classpath for enhancing: ${enhance.classpath} (you can set it
with property 'enhance.classpath')</ant:echo>
		<copy todir="${maven.build.dest}/">
			<fileset dir="${jdodir}" includes="**/*.jdo"/>
		</copy>


		<java failonerror="true" fork="true" dir="${maven.build.dest}"
classname="com.poet.tools.ptjx.Main">
			<classpath>
				<pathelement location="${enhance.classpath}"/>
			</classpath>-->
			<arg line="-enhance"/>
		</java>

		<java failonerror="true" fork="true" dir="${maven.build.dest}"
classname="com.poet.tools.ptjx.Main">
			<classpath>
				<pathelement location="${enhance.classpath}"/>
			</classpath>
			<arg line="-register"/>
			<arg line="-create"/>
		</java>

	</goal>


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