Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
LisaPug opened this issue May 30, 2016 · 3 comments
Closed

Comments

@LisaPug
Copy link

LisaPug commented May 30, 2016

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?

@LisaPug LisaPug closed this as completed May 31, 2016
@alexo
Copy link
Owner

alexo commented May 31, 2016

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

@LisaPug
Copy link
Author

LisaPug commented May 31, 2016

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
Copy link
Owner

alexo commented May 31, 2016

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants