<div dir="ltr">Hi Jay,<div><br></div><div><div>> Any idea why the file is not created on processing?</div></div><div><br></div><div>Can you please push your changes to a branch of JEX? Otherwise there is not enough information to understand what you tried to do.</div>
<div><br></div><div>Thanks,</div><div>Curtis</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, May 6, 2014 at 5:13 PM, Jay Warrick <span dir="ltr"><<a href="mailto:warrick@wisc.edu" target="_blank">warrick@wisc.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Johannes,<br>
<br>
Thanks for the reply.<br>
<br>
If I try to force Eclipse to process annotations. I get this error...<br>
<br>
java.io.IOException: org.eclipse.core.internal.resources.ResourceException: Resource '/JEX/bin/META-INF/json/org.scijava.plugin.Plugin' does not exist.<br>
at org.eclipse.jdt.internal.apt.pluggable.core.filer.IdeInputFileObject.openInputStream(IdeInputFileObject.java:88)<br>
at org.scijava.annotations.AnnotationProcessor$Writer.openInput(AnnotationProcessor.java:224)<br>
at org.scijava.annotations.AbstractIndexWriter.merge(AbstractIndexWriter.java:118)<br>
at org.scijava.annotations.AbstractIndexWriter.write(AbstractIndexWriter.java:91)<br>
at org.scijava.annotations.AnnotationProcessor.process(AnnotationProcessor.java:91)<br>
at org.eclipse.jdt.internal.compiler.apt.dispatch.RoundDispatcher.handleProcessor(RoundDispatcher.java:139)<br>
at org.eclipse.jdt.internal.compiler.apt.dispatch.RoundDispatcher.round(RoundDispatcher.java:121)<br>
at org.eclipse.jdt.internal.compiler.apt.dispatch.BaseAnnotationProcessorManager.processAnnotations(BaseAnnotationProcessorManager.java:159)<br>
at org.eclipse.jdt.internal.apt.pluggable.core.dispatch.IdeAnnotationProcessorManager.processAnnotations(IdeAnnotationProcessorManager.java:134)<br>
at org.eclipse.jdt.internal.compiler.Compiler.processAnnotations(Compiler.java:820)<br>
at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:434)<br>
at org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.compile(AbstractImageBuilder.java:366)<br>
at org.eclipse.jdt.internal.core.builder.BatchImageBuilder.compile(BatchImageBuilder.java:178)<br>
at org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.compile(AbstractImageBuilder.java:303)<br>
at org.eclipse.jdt.internal.core.builder.BatchImageBuilder.build(BatchImageBuilder.java:60)<br>
at org.eclipse.jdt.internal.core.builder.JavaBuilder.buildAll(JavaBuilder.java:254)<br>
at org.eclipse.jdt.internal.core.builder.JavaBuilder.build(JavaBuilder.java:173)<br>
at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:733)<br>
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)<br>
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:206)<br>
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:246)<br>
at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:299)<br>
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)<br>
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:302)<br>
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:263)<br>
at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:401)<br>
at org.eclipse.core.internal.resources.Project$1.run(Project.java:618)<br>
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2345)<br>
at org.eclipse.core.internal.resources.Project.internalBuild(Project.java:597)<br>
at org.eclipse.core.internal.resources.Project.build(Project.java:114)<br>
at org.eclipse.jdt.internal.ui.util.CoreUtility$BuildJob.run(CoreUtility.java:161)<br>
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)<br>
Caused by: org.eclipse.core.internal.resources.ResourceException: Resource '/JEX/bin/META-INF/json/org.scijava.plugin.Plugin' does not exist.<br>
at org.eclipse.core.internal.resources.Resource.checkExists(Resource.java:341)<br>
at org.eclipse.core.internal.resources.Resource.checkAccessible(Resource.java:215)<br>
at org.eclipse.core.internal.resources.File.getContents(File.java:287)<br>
at org.eclipse.core.internal.resources.File.getContents(File.java:278)<br>
at org.eclipse.jdt.internal.apt.pluggable.core.filer.IdeInputFileObject.openInputStream(IdeInputFileObject.java:86)<br>
... 31 more<br>
<br>
Any idea why the file is not created on processing?<br>
<br>
Thanks,<br>
<br>
Jay<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
<br>
On May 6, 2014, at 12:43 PM, Johannes Schindelin <<a href="mailto:Johannes.Schindelin@gmx.de">Johannes.Schindelin@gmx.de</a>> wrote:<br>
<br>
> Hi Jay,<br>
><br>
> On Tue, 6 May 2014, Jay Warrick wrote:<br>
><br>
>> You run the application once, it fixes the jar file but the changes to<br>
>> the jar file on disk are not reflected in the jar file that is loaded<br>
>> already in memory for running the application (at least as indicated by<br>
>> the getResources() method).<br>
><br>
> That is not the intended workflow -- as both Curtis & I pointed out.<br>
><br>
> The annotation indexes are supposed to be generated at compile time. The<br>
> way we do that is fully compliant with the Java standard.<br>
><br>
> By using an environment that does not abide by that standard -- Eclipse --<br>
> you make it your responsibility to ensure that the annotation indexes are<br>
> generated correctly.<br>
><br>
> You could do that by making unit tests an integral part of your build<br>
> process *before* bundling into a .jar (which you should do anyway, if you<br>
> want to follow best Java practices), or by running the EclipseHelper in<br>
> another manner.<br>
><br>
> You could do that by making it a Maven project and importing it into<br>
> Eclipse.<br>
><br>
> You could do that by forcing Eclipse into running the annotation<br>
> processors (as mandated by the Java standard).<br>
><br>
> You could figure out another way to make the annotation indexing run<br>
> before packaging the sources into .jar files.<br>
><br>
> What will not work is to continue to try to generate the annotation<br>
> indexes at a stage that is way later than compile time.<br>
><br>
> Ciao,<br>
> Johannes<br>
<br>
</div></div></blockquote></div><br></div>