wro4j-runner & maven central repo

132 views
Skip to first unread message

jj

unread,
Feb 14, 2012, 2:57:47 PM2/14/12
to wro4j
I was hoping to download the wro4j-runner dependency via Ivy to use
with ant.
[http://code.google.com/p/wro4j/wiki/UsingWro4jWithAnt]

However, according to the release steps, this module is not deployed
to central.
[http://code.google.com/p/wro4j/wiki/ReleaseSteps]

Why is the runner not being deployed to central?

Thanks!

Alex Objelean

unread,
Feb 14, 2012, 3:05:48 PM2/14/12
to wr...@googlegroups.com
The wro4j-runner is not deployed to central because it is a command line utility and it was never intended to use as a maven dependency. You can still download the runner from downloads section or build it locally after checkout the project.
There is a wro4j-maven-plugin which provides the same features and can be found on central repo.  
Do you think uploading it to maven central repo would be useful?

Alex


jj

unread,
Feb 15, 2012, 11:49:53 AM2/15/12
to wro4j
I see your point. I do see value for the runner to be hosted, but
wonder if it is better to merge these modules.
That is, have one module that works seamlessly using either maven or
ant.

Is that possible?

I do not know enough about the details of creating a maven plugin. Nor
do I have a good handle on the wro4j code to review this goal.
What do you think?

Alex Objelean

unread,
Feb 15, 2012, 11:55:52 AM2/15/12
to wr...@googlegroups.com
I'm not an ANT user for several of years. I agree that it would be helpful to deploy something to maven central which would work for your use-case. 
I can create a module for that (wro4j-ant), but I need some contribution to make it work (ant knowledge required and defining requirements). I will handle the wro4j internals or give any support if required.
What do you think?

Thanks,
Alex

--
You received this message because you are subscribed to the Google Groups "wro4j" group.
To post to this group, send email to wr...@googlegroups.com.
To unsubscribe from this group, send email to wro4j+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/wro4j?hl=en.


jj

unread,
Feb 15, 2012, 1:21:18 PM2/15/12
to wro4j
I too have not used Ant for some time. My plan was to contribute.

Creating a specific ant module for this feels wrong. Plus your ant
macrodef and runner already fulfill this.

I'm looking at the code of both the maven and runner modules. Is it
possible that a higher level abstraction could provide a path to run
any build system provided an adapter class?

If the wro4j-maven-plugin already provides the same features as the
runner. Could the maven specific code be decoupled from the core wro4j
calls. And is this in essence the runner module?

Are the maven and runner modules both clients of the core module
depicted here?:
http://code.google.com/p/wro4j/wiki/wro4j

I know that's a lot of questions. I'm just trying to get deeper design
insight.
I don't mind looking into this. Do you think this path is doable or
justified?


On Feb 15, 11:55 am, Alex Objelean <alex.objel...@gmail.com> wrote:
> I'm not an ANT user for several of years. I agree that it would be helpful
> to deploy something to maven central which would work for your use-case.
> I can create a module for that (wro4j-ant), but I need some contribution to
> make it work (ant knowledge required and defining requirements). I will
> handle the wro4j internals or give any support if required.
> What do you think?
>
> Thanks,
> Alex
>

Alex Objelean

unread,
Feb 15, 2012, 2:54:43 PM2/15/12
to wr...@googlegroups.com
The class diagram is quite outdated. You can get a better understanding of the overall design from here:  http://code.google.com/p/wro4j/wiki/DesignOverview

wro4j heavily depends on servlet-api because the it was designed initially as a run-time solution (filter or servlet). Since you can't work with HttpServletRequest outside of a servlet container, using it for a build system like maven or ant requires some work-around. Currently, the workaround is to mock the servlet-api (this is common for both: maven plugin & runner). 

The runner is indeed very similar to maven plugin. The differences are:
1) All dependencies are packaged in the same jar (which makes it bigger)
2) Configurations are read from command line arguments 

I'm not sure if higher level of abstraction for different build systems is required, since using it is straightforward: 
1) create an instance of WroManagerFactory (configure it with all processors you need)
2) Call wroManager.process() 

The code looks a bit ugly in maven plugin and runner because of the servlet-api mocking.. but except it, it should be simple to use.

If you think it might be useful, I can create (or help you to create) a simple abstraction, but the hard part is to understand the requirements.

I'm open to any suggestions.

Cheers,
Alex

jj

unread,
Feb 17, 2012, 2:57:11 PM2/17/12
to wro4j
Alex, thanks for that great info!

With support for both the build and runtime clients, you've suggested
the runtime aspects (Servlet) of the code do not belong in the core
module.
What would it take to create a servlet filter client, removing the
Servlet dependencies from core? I think this would really improve the
design!

I feel this is important as I may have trouble evangelizing a build
tool that requires a dependency on the servlet-api.

What do you think?

Alex Objelean

unread,
Feb 17, 2012, 3:08:58 PM2/17/12
to wr...@googlegroups.com
Removing servlet api dependency from core is considered for the future releases. The only problem is that this will break the api as it is now and require a lot of changes .... and time :)  

Alex
Reply all
Reply to author
Forward
0 new messages