Hi,
you had a very good idea with this plugin!
I tried to install and use the plugin but I got a NullPointerException
(see the stack) as explained in the web page.
Maybe I set the plugin wrongly...
(BTW I did not this: "Carefully javadoc your component classes and
their attributes annotated with @Parameter" )
Hope this helps.
-- Alessio
Configuration:
Mac Os X
1.5.8
Java
java -version
java version "1.6.0_20"
Java(TM) SE Runtime Environment (build 1.6.0_20-b02-279-9M3165)
Java HotSpot(TM) 64-Bit Server VM (build 16.3-b01-279, mixed mode)
Eclipse Platform
Version: 3.5.2.R35x_v20100210-0800-9hEiFzmFst-TiEn9hNYgDWg1XN8ulH_JvCNGB
Build id: M20100211-1343
pom.xml snippet:
<plugin>
<groupId>fr.exanpe</groupId>
<artifactId>tapestry-tldgen</artifactId>
<version>1.0.0</version>
<!-- I am using a Mac and I had problems with the dependency on
tools.jar as Java for Mac OS does not provide it -->
<dependencies>
<dependency>
<groupId>com.sun</groupId>
<artifactId>tools</artifactId>
<version>1.5.0</version>
<scope>system</scope>
<!-- Tried also the /System/Library/Frameworks/JavaVM.framework/
Versions/1.5.0/Classes/classes.jar -->
<systemPath>/System/Library/Frameworks/JavaVM.framework/Classes/
classes.jar</systemPath>
</dependency>
</dependencies>
<executions>
<execution>
<goals>
<goal>tld-generate</goal>
</goals>
<phase>process-classes</phase>
<configuration>
<!-- Not sure about this UDI... but I could figure out anything
different -->
<uri>http://tapestry.apache.org/schema/tapestry_5_0_0.xsd</uri>
<!-- My components packages are here
se.pmdit.tutorial.t5gwt.tapestry -->
<rootPackage>se.pmdit.tutorial.t5gwt.tapestry</rootPackage>
</configuration>
</execution>
</executions>
</plugin>
Console Output by running mvn with -X option
[INFO] --- tapestry-tldgen:1.0.0:tld-generate (default) @ t5gwt ---
[DEBUG] Created new class realm plugin>fr.exanpe:tapestry-tldgen:1.0.0
[DEBUG] Populating class realm plugin>fr.exanpe:tapestry-tldgen:1.0.0
[DEBUG] Included: fr.exanpe:tapestry-tldgen:maven-plugin:1.0.0
[DEBUG] Included: com.sun:tools:jar:1.5.0
[DEBUG] Included: org.codehaus.plexus:plexus-utils:jar:2.0.5
[DEBUG] Included: junit:junit:jar:3.8.1
[DEBUG] Included: commons-lang:commons-lang:jar:2.3
[DEBUG] Included: org.reflections:reflections:jar:0.9.5-RC2
[DEBUG] Included: com.google.collections:google-collections:jar:1.0
[DEBUG] Included: javassist:javassist:jar:3.8.0.GA
[DEBUG] Included: org.slf4j:slf4j-api:jar:1.5.6
[DEBUG] Included: ch.qos.logback:logback-classic:jar:0.9.9
[DEBUG] Included: ch.qos.logback:logback-core:jar:0.9.9
[DEBUG] Included: dom4j:dom4j:jar:1.6
[DEBUG] Included: xml-apis:xml-apis:jar:1.0.b2
[DEBUG] Included: com.google.code.gson:gson:jar:1.4
[DEBUG] Included: javax.servlet:servlet-api:jar:2.5
[DEBUG] Included: commons-digester:commons-digester:jar:2.0
[DEBUG] Included: commons-beanutils:commons-beanutils:jar:1.8.0
[DEBUG] Included: commons-logging:commons-logging:jar:1.1.1
[DEBUG] Included: com.thoughtworks.xstream:xstream:jar:1.3.1
[DEBUG] Included: xpp3:xpp3_min:jar:1.1.4c
[DEBUG] Excluded: org.apache.maven:maven-settings:jar:2.0.5
[DEBUG] Excluded: org.apache.maven:maven-repository-metadata:jar:2.0.5
[DEBUG] Excluded: classworlds:classworlds:jar:1.1-alpha-2
[DEBUG] Excluded: org.codehaus.plexus:plexus-container-default:jar:
1.0-alpha-9
[DEBUG] Excluded: org.apache.maven:maven-project:jar:2.0.5
[DEBUG] Excluded: org.apache.maven:maven-model:jar:2.0.5
[DEBUG] Excluded: org.apache.maven:maven-plugin-api:jar:2.0
[DEBUG] Excluded: org.apache.maven.wagon:wagon-provider-api:jar:1.0-
beta-2
[DEBUG] Excluded: org.apache.maven:maven-artifact-manager:jar:2.0.5
[DEBUG] Excluded: org.apache.maven:maven-artifact:jar:2.0.5
[DEBUG] Excluded: org.apache.maven:maven-profile:jar:2.0.5
[DEBUG] Configuring mojo 'fr.exanpe:tapestry-tldgen:1.0.0:tld-
generate' with include-project-dependencies configurator -->
this is repeated almost 1000 times ;)
java
.lang
.reflect
.InvocationTargetExceptionjava
.lang
.reflect
.InvocationTargetExceptionjava.lang.reflect.InvocationTargetException
at sun.reflect.GeneratedMethodAccessor7.invoke(Unknown Source)
at
sun
.reflect
.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
25)
at java.lang.reflect.Method.invoke(Method.java:592)
at
org
.codehaus
.plexus
.component
.configurator
.AbstractComponentConfigurator
.configureComponent(AbstractComponentConfigurator.java:88)
at sun.reflect.GeneratedMethodAccessor7.invoke(Unknown Source)
DEBUG] -- end configuration --
[WARNING] encoding parameter has not been set. Using plateform
encoding for source file javadoc processing (MacRoman)
[INFO]
------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 9.413s
[INFO] Finished at: Wed Sep 22 12:37:36 CEST 2010
[INFO] Final Memory: 3M/12M
[INFO]
------------------------------------------------------------------------
[ERROR] Failed to execute goal fr.exanpe:tapestry-tldgen:1.0.0:tld-
generate (default) on project t5gwt: Execution default of goal
fr.exanpe:tapestry-tldgen:1.0.0:tld-generate failed.
NullPointerException -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to
execute goal fr.exanpe:tapestry-tldgen:1.0.0:tld-generate (default) on
project t5gwt: Execution default of goal fr.exanpe:tapestry-tldgen:
1.0.0:tld-generate failed.
at
org
.apache
.maven
.lifecycle
.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:593)
at
org
.apache
.maven
.lifecycle
.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:324)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:247)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:104)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:427)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:157)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:121)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun
.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
39)
at
sun
.reflect
.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
25)
at java.lang.reflect.Method.invoke(Method.java:592)
at
org
.codehaus
.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at
org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:
230)
at
org
.codehaus
.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:
409)
at
org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:
352)
Caused by: org.apache.maven.plugin.PluginExecutionException: Execution
default of goal fr.exanpe:tapestry-tldgen:1.0.0:tld-generate failed.
at
org
.apache
.maven
.plugin
.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:
114)
at
org
.apache
.maven
.lifecycle
.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:577)
... 14 more
Caused by: java.lang.NullPointerException
at
fr
.exanpe
.tapestry
.tldgen
.mojo.TapestryTldGenMojo.loadCustomClassLoader(TapestryTldGenMojo.java:
183)
at
fr
.exanpe
.tapestry
.tldgen.mojo.TapestryTldGenMojo.execute(TapestryTldGenMojo.java:137)
at
org
.apache
.maven
.plugin
.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:
105)
... 15 more
[ERROR]
On Sep 22, 2010, at 10:50 AM, Laurent Guerin wrote:
For those interested in using Eclipse code completion with tml files,
EXANPE Team (Julien Maupoux, Katia Aresti and myself) has developped
a Maven plugin that allow you to generate a tld describing any
Tapestry 5 components library.
The plugin uses both Javadoc and @Parameter annotation to perform
the generation.
Once you have generated your TLD, just to configure Eclipse as
described in the Wiki :
http://wiki.apache.org/tapestry/Tapestry5JSPEditorEclipse
This plugin has been tested on Tapestry 5.2 itself (see result TLD
attachment for test completion with core components).
The source code of this plugin is available here :
http://github.com/exanpe/tapestry-tldgen
Informations, usage and notes available here :
http://exanpe.free.fr/tapestry-tldgen/
The plugin has been released as alpha version 1.0.0 and promoting
into Maven central repository.
So, all feedbacks are appreciated (directly on GitHub) !
Best regards,
Laurent Guerin
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org