alexo / wro4j

New project location is:https://github.com/wro4j/wro4j
442 stars 110 forks source link

No processed css and js files in target directory using wro4j-maven-plugin #223

Closed LisaPug closed 8 years ago

LisaPug commented 8 years ago

I tried to implement the wro4j-maven-plugin to a testproject but do not get any output in my target directory after running maven "clean install". I played around with different versions of the plugin, for example 1.7.5 (where the build is successful, but without an output of processed css files) and 1.8.0 where the build fails. The plugin in pom.xml looks like this: pomxml

Dependencies in pom.xml: dependenciespom

My wro.xml: wroxml

My wro.properties: preProcessors=cssMin

My console output: consoleoutput1 consoleoutput2

The error message says: Failed to execute goal ro.isdc.wro4j:wro4j-maven-plugin:1.8.0:run (default) on project wroNeu: Exception occured while processing: ro.isdc.wro.WroRuntimeException: Exception while merging resources: No valid resource '/css/style.css' found inside any of contextFolders: [C:\Users\lkuhlmann\workspaceNeu\wroNeu\src\main\frontend], class: ro.isdc.wro.WroRuntimeException,caused by: java.io.IOException: C:\Users\lkuhlmann\workspaceNeu\wroNeu\src\main\frontend\css\style.css (Das System kann den angegebenen Pfad nicht finden) -> [Help 1]

My project structure: projectstructure

If I try it with version 1.7.5 the console output when running mvn clean install is as follows: consoleoutput3 consoleoutput4

I work on a Windows PC. Does anybody know what I am doing wrong?

alexo commented 8 years ago

@LisaPug have you found the cause of the problem? Btw, the project has moved to https://github.com/wro4j/wro4j/

LisaPug commented 8 years ago

Yes, thank you for asking. I changed the path to my css and js files in wro.xml this way: wroneuxml Now it works :)

alexo commented 8 years ago

It is recommended to use servlet context relative path. This way it will work on any environment. Your approach works, but it uses absolute path which can differ on different machine.