Dear Hermod,

Hermod,

Hermod,

I got it to work! Thanks a lot! For reference I will lay out what I did. 

I did not have the dependency on tomahawk in the Tld2ClayCfg/test/pom.xml
because I did not need the clay cfg for it. Adding it did cause the
java.lang.NoClassDefFoundError to go away. It still didn't build though as
it couldn't find the:

Missing:
----------
1) org.apache.myfaces.tomahawk:tomahawk:jar:1.1.5-SNAPSHOT

Your comments on the settings.xml made me do a little search and I found [1]
explaining that you need to add repositories to your project to use SNAPSHOT
releases. I haven't figured out how to add these repositories globally in my
settings (any pointers would be great?) but adding them to my project like
[2] did the trick. I had to play a bit with artifactId's and versions but
managed to figure those out by browsing what was available at [3].

I can finally start and use my subForms which what I needed this for in the
first place. I'm happy to have been introduced to maven and am contemplating
integration in my own projects.

I hope you have had a good weekend. But judging by your response time you,
like me, don't differentiate between weekdays and a weekends ;-)

Cheers,
Joost

[1]
http://wiki.apache.org/myfaces/Using_MyFaces_in_a_Project_built_with_Maven
[2]
<repositories>
  <repository> 
            <releases> 
              <enabled>true</enabled>
            </releases>
            <snapshots> 
              <enabled>false</enabled>
            </snapshots>
            <id>myfaces.staging</id>
            <name>MyFaces Staging Repository</name>
            <url>http://myfaces.zones.apache.org/dist/maven-repository</url>
    </repository>
    <repository> 
            <snapshots> 
              <enabled>true</enabled>
            </snapshots>
            <id>apache.snapshots</id>
            <name>Apache Snapshot Repository</name>
            <url>http://people.apache.org/repo/m2-snapshot-repository</url>
  </repository>
</repositories>

[3]
http://people.apache.org/repo/m2-snapshot-repository/org/apache/myfaces/toma
hawk/


-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Monday, April 23, 2007 9:40 PM
To: [EMAIL PROTECTED]
Subject: FW: SV: SV: using tld2claycfg

Hi

Looks like my mails are still delayed, so I'm sending it directly

Hermod

-----Original Message-----
From: Opstvedt, Hermod 
Sent: Monday, April 23, 2007 8:45 AM
To: 'user@shale.apache.org'
Subject: RE: SV: SV: using tld2claycfg


Hi

Have you declared the dependency on tomahawk?

Here is a sample to consider:

        ......

      <plugin>
        <groupId>org.apache.shale</groupId>
        <artifactId>Tld2ClayCfgMojo</artifactId>
        <version>1.0-SNAPSHOT</version>
        <executions>
          <execution>
            <id>convert tld</id>
            <phase>generate-resources</phase>
            <goals>
              <goal>convert</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <tlds>

            <tld implementation="org.apache.shale.Tld">
              <name>META-INF/tomahawk.tld</name>
              <version>1.1.6-SNAPSHOT</version>
 
<mbFilter>(?i).*Listener.*,(?i).*Validate.*,(?i).*Convert.*</mbFilter>
 
<acFilter>(?i).*Listener.*,(?i).*Validate.*,(?i).*Convert.*</acFilter>
            </tld>
        </tlds>

        ......
        
  <dependencies>
    <dependency>
      <groupId>org.apache.myfaces.tomahawk</groupId>
      <artifactId>tomahawk</artifactId>
      <version>1.1.6-SNAPSHOT</version>
    </dependency>
  </dependencies>

Actually if you have your (Maven2) settings.xml file set up correct you
should not need to build any of the MyFaces or Tomahawk stuff your self,
because it will get downloaded. A trick is to use mvn -U clean installl

Hermod


-----Original Message-----
From: JS Portal Support [mailto:[EMAIL PROTECTED]
Sent: Monday, April 23, 2007 5:16 AM
To: user@shale.apache.org
Subject: RE: SV: SV: using tld2claycfg


Hi,

Thnaks, that helped me and I think I'm almost there. I'm starting to
understand maven e bit. I managed to get to the last step successfully, but
there I get the error show below [1]. It seems to me I probably don't have
myfacses-tomahawk properly installed in my repository. Any clues?

To get to this point I had to have maven install a few things like tomahawk
and myfaces. But since I've just been working on one machine to build and
deploy through ant, both subversion and maven are new to me. I don't quite
get how I can simply install all of myfaces including the subprojects to my
local repository. Is there a step-by-step guide which lines this out; not
assuming any prior knowledge of svn and mvn? 
 
I've been spending a few days on just trying to use a s:subForm with clay.
Learning a lot thought ;-)

Thanks,
Joost


[1]the error:

C:\Program Files\Java\tld2claycfg\test>mvn clean install
[INFO] Scanning for projects...
[INFO]
-------------------------------------------------------------------------
---
[INFO] Building Tld2ClayCfg Maven testapplication
[INFO]    task-segment: [clean, install]
[INFO]
-------------------------------------------------------------------------
---
[INFO] [clean:clean]
[INFO] Deleting directory C:\Program Files\Java\tld2claycfg\test\target
[INFO] Deleting directory C:\Program
Files\Java\tld2claycfg\test\target\classes
[INFO] Deleting directory C:\Program
Files\Java\tld2claycfg\test\target\test-cla
sses
[INFO] [Tld2ClayCfgMojo:convert {execution: convert tld}]
[INFO] Generate resources in C:\Program Files\Java\tld2claycfg\test\target
[INFO] Got: 1 tlds
[INFO] Converting: META-INF/myfaces_sandbox.tld
[INFO]
------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO]
------------------------------------------------------------------------
[INFO] org/apache/myfaces/shared_tomahawk/taglib/UIComponentTagBase
[INFO]
------------------------------------------------------------------------
[INFO] Trace
java.lang.NoClassDefFoundError:
org/apache/myfaces/shared_tomahawk/taglib/UIComp
onentTagBase
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
        at
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:12
4)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
        at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
        at
org.apache.shale.clay.util.TldToClayconfig.isUIComponentTag(TldToClay
config.java:560)
        at
org.apache.shale.clay.util.TldToClayconfig.writeConfigFile(TldToClayc
onfig.java:447)
        at
org.apache.shale.clay.util.TldToClayconfig.convert(TldToClayconfig.ja
va:275)
        at org.apache.shale.Tld2ClayCfgMojo.execute(Tld2ClayCfgMojo.java:81)
        at
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi
nManager.java:443)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
ultLifecycleExecutor.java:539)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLi
fecycle(DefaultLifecycleExecutor.java:480)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau
ltLifecycleExecutor.java:459)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan
dleFailures(DefaultLifecycleExecutor.java:311)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen
ts(DefaultLifecycleExecutor.java:278)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi
fecycleExecutor.java:143)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:334)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:272)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at
org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
        at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
        at
org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)

        at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 5 seconds
[INFO] Finished at: Mon Apr 23 15:00:41 NZST 2007
[INFO] Final Memory: 5M/10M
[INFO]
------------------------------------------------------------------------
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, April 18, 2007 10:39 PM
To: user@shale.apache.org
Subject: RE: SV: SV: using tld2claycfg

Hi

Stupid me :(

I forgot that you also have to build the tool it self also (The mojo uses
it). Downloa the tool [1] and build it using mvn clean install first.
(Somehow Iassumed that everybody does like me and generate everything my
self)

[1]  https://svn.apache.org/repos/asf/shale/tools/trunk/tld2claycfg

Hermod

(Hoping this will apear on the list before christmas)

-----Original Message-----
From: Torsten Krah [mailto:[EMAIL PROTECTED]
Sent: Wednesday, April 18, 2007 11:58 AM
To: [EMAIL PROTECTED]
Cc: user@shale.apache.org
Subject: Re: SV: SV: using tld2claycfg


mojo folder.

Torsten

Am Dienstag, den 17.04.2007, 22:52 +0200 schrieb Hermod Opstvedt:
> Hi
> 
> Where did you run this (folder?)
> 
> Hermod
> 
> 
> -----Opprinnelig melding-----
> Fra: Torsten Krah [mailto:[EMAIL PROTECTED] 
> Sendt: 17. april 2007 15:23
> Til: [EMAIL PROTECTED]
> Kopi: user@shale.apache.org
> Emne: Re: SV: using tld2claycfg
> 
> It seems that building anything with maven is a real pain to me.
> 
> Java 1.5, Maven 2.0.5.
> 
> mvn clean install
> 
> [ERROR] BUILD ERROR
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Failed to resolve artifact.
> 
> Missing:
> ----------
> 1) org.apache.shale:Tld2ClayCfg:jar:1.0-SNAPSHOT
> 
>   Try downloading the file manually from the project website.
> 
>   Then, install it using the command: 
>       mvn install:install-file -DgroupId=org.apache.shale
> -DartifactId=Tld2ClayCfg \
>           -Dversion=1.0-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file
> 
>   Path to dependency: 
>         1) org.apache.shale:Tld2ClayCfgMojo:maven-plugin:1.0-SNAPSHOT
>         2) org.apache.shale:Tld2ClayCfg:jar:1.0-SNAPSHOT
> 
> ----------
> 1 required artifact is missing.
> 
> for artifact: 
>   org.apache.shale:Tld2ClayCfgMojo:maven-plugin:1.0-SNAPSHOT
> 
> from the specified remote repositories:
>   central (http://repo1.maven.org/maven2)
> 
> 
> [INFO]
> ------------------------------------------------------------------------
> [INFO] For more information, run Maven with the -e switch
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Total time: 7 seconds
> [INFO] Finished at: Tue Apr 17 15:21:30 CEST 2007
> [INFO] Final Memory: 6M/11M
> [INFO]
> ------------------------------------------------------------------------
> 
> 
> Hints?
> 
> Torsten
> 
> Am Dienstag, den 17.04.2007, 15:09 +0200 schrieb Hermod Opstvedt:
> > Hi
> > 
> > I answered this yesterday, but it seems that mail sent from work uses
4-5
> > days to reach the list.
> > 
> > 
> > Download the source from[1]
> > 
> > Build the Maven plugin in the folder mojo by using mvn clean install
> > In the test folder open the Mavne POM and tweak it according to what you
> > want (the tld section and the dependency section).
> > Run mvn clean install in the test folder. The generated jar in the
target
> > folder contains the Clay config files you want.
> > 
> > [1] https://svn.apache.org/repos/asf/shale/maven/trunk/tld2claycfg
> > 
> > Hermod
> > 
> > 
> > -----Opprinnelig melding-----
> > Fra: Torsten Krah [mailto:[EMAIL PROTECTED] 
> > Sendt: 17. april 2007 13:43
> > Til: user@shale.apache.org
> > Emne: Re: using tld2claycfg
> > 
> > I guess Hermod does, because he made it.
> > 
> > My problem is, i cant build the tool with maven, maybe i am doing
> > something wrong - so Hermod, can you give us a short intro what to do to
> > build it after svn checkout and how to create the clay config files?
> > 
> > Torsten
> > 
> > Am Sonntag, den 15.04.2007, 12:40 +1200 schrieb JS Portal Support:
> > > Hi,
> > > 
> > > I've been trying to find some documentation on how to use the
> tld2claycfg.
> > I
> > > want to use some myfaces sandbox components but can't find the clay
> config
> > > file for it and understand you can create it with tld2claycfg. Does
> anyone
> > > know how and where?
> > > 
> > > Thanks,
> > > Joost Schouten
> > > 
> > > 
> > 
> 
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

This email with attachments is solely for the use of the individual or
entity to whom it is addressed. Please also be aware that the DnB NOR Group
cannot accept any payment orders or other legally binding correspondence
with
customers as a part of an email. 

This email message has been virus checked by the anti virus programs used
in the DnB NOR Group.

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

This email with attachments is solely for the use of the individual or
entity to whom it is addressed. Please also be aware that the DnB NOR Group
cannot accept any payment orders or other legally binding correspondence
with
customers as a part of an email. 

This email message has been virus checked by the anti virus programs used
in the DnB NOR Group.

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *


Reply via email to