Re: [T5.4] split Tapestry application into separate modules

2014-07-10 Thread Ilya Obshadko
Thanks guys!

I have successfully resolved the problem with component loading by
introducing another namespace (just like tapestry-jquery does); I have
concluded it would be better than messing with Tapestry core namespace.

But I still have problems with picking up changes in component library at
runtime. I've been trying to configure it using VM arguments and pom.xml
properties, but unsuccessfully.

This setting

systemProperty
  nametapestry.modules/name
  valuemy.package.name.ModuleName/value
/systemProperty

in main application configuration doesn't work.



On Thu, Jul 10, 2014 at 12:05 AM, Thiago H de Paula Figueiredo 
thiag...@gmail.com wrote:

 On Wed, 09 Jul 2014 17:38:04 -0300, Ilya Obshadko ilya.obsha...@gmail.com
 wrote:

  - component that was moved into separate module can't be loaded by main
 application using standard namespace; is there any way to fix that? (that
 is, t:mycomponent/ results in UknownValueException);


 That's expected: When you changed the component from the application to a
 component library, you've changed its namespace. You can advise or decorate
 ComponentClassResolver.resolveComponentTypeToClassName() and
 resolveMixinTypeToClassName() (for mixins), which are the methods which map
 logical names to component or mixin class names.


  - is that possible to run the whole thing within Eclipse without having
 to install 'module' project into local repository?


 Yes. Just make sure the webapp module has the component modules in its
 classpath. Module class autoloading won't work, as there's no JAR for the
 component libraries included in this way, but then you can use the
 tapestry.modules VM argument to specify comma-separated fully qualified
 module class names to be loaded. Another option is to use @Submodule in
 your AppModule.

 --
 Thiago H. de Paula Figueiredo
 Tapestry, Java and Hibernate consultant and developer
 http://machina.com.br

 -
 To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
 For additional commands, e-mail: users-h...@tapestry.apache.org




-- 
Ilya Obshadko


Re: [T5.4] split Tapestry application into separate modules

2014-07-10 Thread Thiago H de Paula Figueiredo
What are you using to launch the webapp? I recommend the RunJettyRun  
plugin. Way better than jetty:run, if you ask me.


--
Thiago H. de Paula Figueiredo
Tapestry, Java and Hibernate consultant and developer
http://machina.com.br

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: [T5.4] split Tapestry application into separate modules

2014-07-10 Thread Daniel Jue
Yes, it could be an issue using an external maven.  I let Eclipse handle
the build while I'm developing, and I don't do a full external maven
rebuild unless I need to deploy war files.  Sometimes it helps to know the
art of the possible, and myself and my team have it working this way.  :-)
 Hopefully you find a development procedure that is right for you.




On Thu, Jul 10, 2014 at 6:04 AM, Ilya Obshadko ilya.obsha...@gmail.com
wrote:

  For your last question, if you are using Eclipse Kepler or better, the
  maven integration should be good enough to allow workspace resolution of
  the other modules, as long as they are open.
  i.e. you can change something in one module and have the dependent
 modules
  pick up the changes, without needing to do a separate maven build or
  install.  This even works between overlays and the main web app project.
 

 I've been expecting it should work that way, but it doesn't.

 Unless I perform mvn clean install inside the module project, I receive
 build error

 [WARNING] The POM for my.package:module-name:jar:0.0.1-SNAPSHOT is
 missing, no dependency information available

 I suppose it has something to do with external Maven installation that I'm
 using instead of embedded one, but I'm not sure.



  On Wed, Jul 9, 2014 at 4:38 PM, Ilya Obshadko ilya.obsha...@gmail.com
  wrote:
 
   I would like to modularize my application into several modules, so that
   each one of them would be a separate Maven artifact. I'm trying to
   reproduce what I can borrow from tapestry-upload module source, but
 still
   have questions:
  
   - component that was moved into separate module can't be loaded by main
   application using standard namespace; is there any way to fix that?
 (that
   is, t:mycomponent/ results in UknownValueException);
   contributeComponentClassResolver() (like in tapestry-upload) doesn't
 help
   (or I just use it incorrectly)
  
   - is that possible to run the whole thing within Eclipse without having
  to
   install 'module' project into local repository?
  
   Thanks in advance.
  
   --
   Ilya Obshadko
  
 



 --
 Ilya Obshadko



Re: [T5.4] split Tapestry application into separate modules

2014-07-10 Thread Ilya Obshadko
Thanks Thiago, I'll give it a try (currently I'm using jetty:run and until
this moment I had no problems with it).


On Thu, Jul 10, 2014 at 4:43 PM, Thiago H de Paula Figueiredo 
thiag...@gmail.com wrote:

 What are you using to launch the webapp? I recommend the RunJettyRun
 plugin. Way better than jetty:run, if you ask me.


 --
 Thiago H. de Paula Figueiredo
 Tapestry, Java and Hibernate consultant and developer
 http://machina.com.br

 -
 To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
 For additional commands, e-mail: users-h...@tapestry.apache.org




-- 
Ilya Obshadko


Re: [T5.4] split Tapestry application into separate modules

2014-07-10 Thread Thiago H de Paula Figueiredo
On Thu, 10 Jul 2014 11:56:07 -0300, Ilya Obshadko  
ilya.obsha...@gmail.com wrote:


Thanks Thiago, I'll give it a try (currently I'm using jetty:run and  
until this moment I had no problems with it).


jetty:run is slower to start, doesn't find the sources of most external  
code even when available and doesn't handle live changes to assets very  
well. RunJettyRun is faster, finds all available sources when debugging  
and it's way easier to configure.


--
Thiago H. de Paula Figueiredo
Tapestry, Java and Hibernate consultant and developer
http://machina.com.br

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: [T5.4] split Tapestry application into separate modules

2014-07-09 Thread Thiago H de Paula Figueiredo
On Wed, 09 Jul 2014 17:38:04 -0300, Ilya Obshadko  
ilya.obsha...@gmail.com wrote:



- component that was moved into separate module can't be loaded by main
application using standard namespace; is there any way to fix that? (that
is, t:mycomponent/ results in UknownValueException);


That's expected: When you changed the component from the application to a  
component library, you've changed its namespace. You can advise or  
decorate ComponentClassResolver.resolveComponentTypeToClassName() and  
resolveMixinTypeToClassName() (for mixins), which are the methods which  
map logical names to component or mixin class names.


- is that possible to run the whole thing within Eclipse without having  
to install 'module' project into local repository?


Yes. Just make sure the webapp module has the component modules in its  
classpath. Module class autoloading won't work, as there's no JAR for the  
component libraries included in this way, but then you can use the  
tapestry.modules VM argument to specify comma-separated fully qualified  
module class names to be loaded. Another option is to use @Submodule in  
your AppModule.


--
Thiago H. de Paula Figueiredo
Tapestry, Java and Hibernate consultant and developer
http://machina.com.br

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: [T5.4] split Tapestry application into separate modules

2014-07-09 Thread Daniel Jue
I think in T 5.4 @Submodule has been deprecated in favor of @ImportModule


On Wed, Jul 9, 2014 at 6:05 PM, Thiago H de Paula Figueiredo 
thiag...@gmail.com wrote:

 On Wed, 09 Jul 2014 17:38:04 -0300, Ilya Obshadko ilya.obsha...@gmail.com
 wrote:

  - component that was moved into separate module can't be loaded by main
 application using standard namespace; is there any way to fix that? (that
 is, t:mycomponent/ results in UknownValueException);


 That's expected: When you changed the component from the application to a
 component library, you've changed its namespace. You can advise or decorate
 ComponentClassResolver.resolveComponentTypeToClassName() and
 resolveMixinTypeToClassName() (for mixins), which are the methods which map
 logical names to component or mixin class names.


  - is that possible to run the whole thing within Eclipse without having
 to install 'module' project into local repository?


 Yes. Just make sure the webapp module has the component modules in its
 classpath. Module class autoloading won't work, as there's no JAR for the
 component libraries included in this way, but then you can use the
 tapestry.modules VM argument to specify comma-separated fully qualified
 module class names to be loaded. Another option is to use @Submodule in
 your AppModule.

 --
 Thiago H. de Paula Figueiredo
 Tapestry, Java and Hibernate consultant and developer
 http://machina.com.br

 -
 To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
 For additional commands, e-mail: users-h...@tapestry.apache.org