Open GoogleCodeExporter opened 9 years ago
Original comment by alex.obj...@gmail.com
on 21 Mar 2013 at 9:41
Original comment by alex.obj...@gmail.com
on 28 May 2013 at 8:10
Original comment by alex.obj...@gmail.com
on 8 Jun 2013 at 9:50
Original comment by alex.obj...@gmail.com
on 13 Sep 2013 at 3:55
Original comment by alex.obj...@gmail.com
on 5 Nov 2013 at 1:54
Original comment by alex.obj...@gmail.com
on 8 Jan 2014 at 3:13
Original comment by alex.obj...@gmail.com
on 21 Mar 2014 at 9:20
Actually this works, but the problem is probably related to what maven
considers part of the classpath. For instance, if the resources are located in
a jar which is added as a dependency to your project, the resources are
successfully located.
I've noticed that when adding resources to a folder like src/main/resources is
not picked up. But at least, you have a workaround: build your resources in a
separate module and add those as a dependency.
Please provide more details about the location of your resources when the
problem can be reproduce.
Original comment by alex.obj...@gmail.com
on 8 Apr 2014 at 8:04
Issue 680 has been merged into this issue.
Original comment by alex.obj...@gmail.com
on 8 Apr 2014 at 8:05
Original comment by alex.obj...@gmail.com
on 8 Apr 2014 at 9:55
I also have this problem. I even moved resources to standalone maven module and
added it as a dependency, but it doesn't prevent the problem. Non-wildcard
resources are found, but wildcard resources are not.
Original comment by pavel.ar...@loutka.cz
on 10 Jun 2014 at 1:08
Could you enable DEBUG log level and attach the logs?
Original comment by alex.obj...@gmail.com
on 10 Jun 2014 at 1:14
Log is included. Resources are located in "webassets" jar - shouldn't
JarWildcardStreamLocator inspect it? It looks like that it inspects only
"wro4j-core" jar.
Original comment by pavel.ar...@loutka.cz
on 10 Jun 2014 at 1:56
Attachments:
Alex, will you have time for this? Can I help you somehow?
Original comment by pavel.ar...@loutka.cz
on 13 Jun 2014 at 12:13
I'm quite busy right now. Trying to release a new version containing some of
the issues I've been working on recently.
If you could contribute, it would be very useful. Any kind of contribution is
appreciated: debugging, investigation, development...
Original comment by alex.obj...@gmail.com
on 13 Jun 2014 at 12:20
Build output and dependencies are not path of plugin's classpath:
"Please note that the plugin classloader does neither contain the dependencies
of the current project nor its build output. Instead, plugins can query the
project's compile, runtime and test class path from the MavenProject in
combination with the mojo annotation requiresDependencyResolution from the Mojo
API Specification. For instance, flagging a mojo with
@requiresDependencyResolution runtime enables it to query the runtime class
path of the current project from which it could create further classloaders."
(http://maven.apache.org/guides/mini/guide-maven-classloading.html)
At stackoverflow
(http://stackoverflow.com/questions/2659048/add-maven-build-classpath-to-plugin-
execution-classpath) I found two solutions:
1) http://stackoverflow.com/a/16263482 - delegate URLClassLoader with URLs
acquired from MavenProject#getRuntimeClasspathElements method - suggested
solution there uses thread's context classloader, maybe this can influence
other plugins as well?; cleaner solution would be probably to simply pass
delegate classloader to ClasspathUriLocator, somehow
2) http://stackoverflow.com/a/2659324 - custom maven ComponentConfigurator
which adds runtimeClasspathElements to classpath; it's quite a magic but it
works; I don't know if it can influence other maven plugins, probably not
In both cases, I must replace:
final String fullPath = "/" + FilenameUtils.getFullPathNoEndSeparator(location);
with:
final String fullPath = FilenameUtils.getFullPath(location);
because in URLClassLoader directories must end with /; why the slash mustn't be
at the beginning, I don't know, but it doesn't work with it
Original comment by pavel.ar...@loutka.cz
on 13 Jun 2014 at 6:36
Thanks for such detailed description. It will definitely help.
Original comment by alex.obj...@gmail.com
on 13 Jun 2014 at 7:08
Original issue reported on code.google.com by
richard....@ft.com
on 6 Dec 2012 at 9:33