You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by Don Brown <mr...@twdata.org> on 2008/04/07 14:55:44 UTC

[s2] Get rid of optional dependencies

In an effort to make Struts 2 more OSGi friendly, I noticed we have a
number of optional dependencies that confuse the bnd plugin.  I'd like
to take the next step and resolve these:
 * DWR - Create a struts2-dwr-plugin
 * Velocity - Create a struts2-velocity-plugin
 * Commons File Upload - Change jar to be required or at least commit
a simple implementation into core and create
struts2-commons-fileupload-plugin
 * JUnit - Create struts2-junit-plugin (we'd probably have to copy the
testcase into our test code to avoid the circular dependency, keeping
the testhelper class in core)
 * TestNG - Create struts2-testng-plugin

Any objections?

Don

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


Re: [s2] Get rid of optional dependencies

Posted by Jeromy Evans <je...@blueskyminds.com.au>.
No objections from me.  The latter two or three don't have to be 
plugins, just build artefacts.

I hate that junit circular dependency.  I wish there was a better way.  
There's several base test classes that would be useful to users if they 
were available in a struts-test jar.

Don Brown wrote:
> In an effort to make Struts 2 more OSGi friendly, I noticed we have a
> number of optional dependencies that confuse the bnd plugin.  I'd like
> to take the next step and resolve these:
>  * DWR - Create a struts2-dwr-plugin
>  * Velocity - Create a struts2-velocity-plugin
>  * Commons File Upload - Change jar to be required or at least commit
> a simple implementation into core and create
> struts2-commons-fileupload-plugin
>  * JUnit - Create struts2-junit-plugin (we'd probably have to copy the
> testcase into our test code to avoid the circular dependency, keeping
> the testhelper class in core)
>  * TestNG - Create struts2-testng-plugin
>
> Any objections?
>
> Don
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>
>
>
>
>   


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


Re: [s2] Get rid of optional dependencies

Posted by Don Brown <mr...@twdata.org>.
Ok, I created the following new plugins with associated docs:
 * JUnit Plugin
 * TestNG Plugin
 * DWR Plugin

I had to skip the Velocity plugin as it is too tightly integrated into
our tag library interfaces, which I'm not sure is a good thing or a
bad thing.  I also made Commons FileUpload required to a) reduce user
confusion and b) ensure that file upload tag shipped in core works.

I'm not sure we want to keep the DWR plugin as a bundled plugin or if
we should just move it off to google code or wherever.  From what I
can tell, it hasn't worked in a while, and no one has complained, so I
wonder if it is even used.

So anyways, I wasn't able to get rid of all the optionals, but it is
looking better.  The last major refactoring I've been contemplating is
moving tags out into their own plugin, but I'm still not 100% sure it
is a good idea.

Don

On Tue, Apr 8, 2008 at 1:04 PM, Don Brown <mr...@twdata.org> wrote:
> Actually, the solution is pretty simple here: copy/paste.  All the
>  logic is in a TestCaseHelper or whatever class that is in core.  We
>  move the StrutsTestCase, only a few lines of code, into our
>  src/test/java directory then create a new struts2-junit-plugin (or
>  whatever) jar and copy the code in there too.  Same process to solve
>  the TestNG dependency only there, we don't even need it in
>  src/test/java.
>
>  Don
>
>
>
>  On Mon, Apr 7, 2008 at 11:43 PM, Antonio Petrelli
>  <an...@gmail.com> wrote:
>  > 2008/4/7, Don Brown <mr...@twdata.org>:
>  >
>  > >   * JUnit - Create struts2-junit-plugin (we'd probably have to copy the
>  >  >  testcase into our test code to avoid the circular dependency, keeping
>  >  >  the testhelper class in core)
>  >  >   * TestNG - Create struts2-testng-plugin
>  >
>  >  This is a difficult one, since the core must depend on the JUnit and
>  >  TestNG artifact, while these two depend on the core. Yuk!
>  >
>  >  Antonio
>  >
>  >
>  >
>  >  ---------------------------------------------------------------------
>  >  To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
>  >  For additional commands, e-mail: dev-help@struts.apache.org
>  >
>  >
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


Re: [s2] Get rid of optional dependencies

Posted by Don Brown <mr...@twdata.org>.
Actually, the solution is pretty simple here: copy/paste.  All the
logic is in a TestCaseHelper or whatever class that is in core.  We
move the StrutsTestCase, only a few lines of code, into our
src/test/java directory then create a new struts2-junit-plugin (or
whatever) jar and copy the code in there too.  Same process to solve
the TestNG dependency only there, we don't even need it in
src/test/java.

Don

On Mon, Apr 7, 2008 at 11:43 PM, Antonio Petrelli
<an...@gmail.com> wrote:
> 2008/4/7, Don Brown <mr...@twdata.org>:
>
> >   * JUnit - Create struts2-junit-plugin (we'd probably have to copy the
>  >  testcase into our test code to avoid the circular dependency, keeping
>  >  the testhelper class in core)
>  >   * TestNG - Create struts2-testng-plugin
>
>  This is a difficult one, since the core must depend on the JUnit and
>  TestNG artifact, while these two depend on the core. Yuk!
>
>  Antonio
>
>
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
>  For additional commands, e-mail: dev-help@struts.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


Re: [s2] Get rid of optional dependencies

Posted by Antonio Petrelli <an...@gmail.com>.
2008/4/7, Don Brown <mr...@twdata.org>:
>   * JUnit - Create struts2-junit-plugin (we'd probably have to copy the
>  testcase into our test code to avoid the circular dependency, keeping
>  the testhelper class in core)
>   * TestNG - Create struts2-testng-plugin

This is a difficult one, since the core must depend on the JUnit and
TestNG artifact, while these two depend on the core. Yuk!

Antonio

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org