jbosstools / m2e-wro4j

m2e connector for WRO4J
Eclipse Public License 2.0
34 stars 12 forks source link

Issue 7: Support for groupNameMappingFile option #9

Closed micmeyer closed 11 years ago

micmeyer commented 11 years ago

Basically only an additonal call to #customizeFolder and #refreshFolder are needed. The patch also contains some renaming since groupNameMappingFile is not a folder.

buildhive commented 11 years ago

JBoss Tools » m2e-wro4j #10 FAILURE Looks like there's a problem with this pull request (what's this?)

alexo commented 11 years ago

This issue can be closed, since the fix will be available in next release of wro4j (1.6.3)

micmeyer commented 11 years ago

Hi Alex

This issue can be closed, since the fix will be available in next release of wro4j (1.6.3)

Can you elaborate a bit more how this is solved in wro4j?

At the moment the m2e-wro4j connector checks if it's a WTP project. If so the connector replaces ${project.build.directory}/${project.build.finalName} with ${project.build.directory}/m2e-wtp/web-resources.

Currently this is only done for destinationFolder, cssDestinationFolder and jsDestinationFolder. This patch applies the same logic to the groupNameMappingFile parameter.

Cheers michael

alexo commented 11 years ago

Hi Michael,

here is the commit which fixes the problem.

The idea is simple: as long as the build is incremental, the grouNameMappingFile content is reused before generating an updated version. This way, after incremental build is performed, the file contains all the mappings along with the updated ones.

micmeyer commented 11 years ago

Hi Alex

This is a fix for a different problem.

Your fix makes sure that groupNameMappingFile always contains mappings for all css/js files (even when doing incremental builds).

This fix adds support for the groupNameMappingFile parameter (maven-wro4j-plugin) to the m2e-wro4j connector.

Cheers michael

alexo commented 11 years ago

ok. Sorry for this misunderstanding.

fbricon commented 11 years ago

Could you add some integration test (I believe it would check the groupNameMappingFile is visible in the workspace after wro4j is run), or at the very least a test project?

alexo commented 11 years ago

@fbricon do you find the existing unit test insufficient?

buildhive commented 11 years ago

JBoss Tools » m2e-wro4j #11 FAILURE Looks like there's a problem with this pull request (what's this?)

micmeyer commented 11 years ago

Are there any other changes that I should implement or is the patch ok like this?

fbricon commented 11 years ago

Thanks for the PR. A new dev build is available at http://download.jboss.org/jbosstools/builds/staging/m2e-wro4j/all/repo/