Java source files are not copied when "optimizationLevel" is set to "SIMPLE"
See original GitHub issueHi:
When you use the plug-in for Maven and set the optimizationLevel
option to SIMPLE
, the plug-in does not copy the Java source files to the target directory; it only copies the source maps. These are the most relevant options of my configuration:
...
<sourceMapsGenerated>true</sourceMapsGenerated>
<sourceFilesCopied>true</sourceFilesCopied>
<optimizationLevel>SIMPLE</optimizationLevel>
If you set optimizationLevel
to ADVANCED
or FULL
, though, the source files are effectively copied there.
This happens in version 0.6.1 and also 0.7.0-dev-1105.
The only workaround that has came to my mind is to compile first in ADVANCE
level and then in SIMPLE
level. But it’s tiring when you need to do multiple clean-then-build actions.
Thank you.
Issue Analytics
- State:
- Created 3 years ago
- Comments:10 (4 by maintainers)
Top Results From Across the Web
4 Ways to Copy File in Java | DigitalOcean
Java copy file is a very common operation. But java.io.File class doesn't have any shortcut method to copy a file from source to...
Read more >IntelliJ IDEA - how to copy .java file as a resource?
java files are in a source tree (in order to be copied as resources), they are automatically compiled. I do not want to...
Read more >Copying a File or Directory - The Java™ Tutorials
Directories can be copied. However, files inside the directory are not copied, so the new directory is empty even when the original directory...
Read more >IC45411: WHEN COPYING .JAVA FILES IN ECLIPSE ... - IBM
java file from one folder to another, using copy/paste, the source file is checked out. This is only the case with .java files....
Read more >RTI Code Generator User's Manual
-noCopyable. Forces Code Generator to put 'copy' logic into the corresponding TypeSupport class, rather than the type itself. This option is only used...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Ok, but writing a documentation requires some time and efforts from my side which I don’t have. So in brief you need
teavm-cli
artifact. To build it, you need to enablewith-cli
Maven profile. CLI module is located attools/cli
directory. Also, you can download this artifact from bintray (for example, current latest one is https://bintray.com/konsoletyper/teavm/download_file?file_path=org%2Fteavm%2Fteavm-cli%2F0.7.0-dev-1105%2Fteavm-cli-0.7.0-dev-1105.jar).Run
from command line and you’ll get some help.
You’ll need to specify following options:
And dev server will serve generated Javascript at http://localhost:9090/classes.js. Classpath elements are either directories (
path/to/module/target/classes
or jar files). Each time.class
files are updated, TeaVM will pick these changes and rebuild Javascript.I fixed the issue. However, I see that your are trying to use Maven for development cycle, which is inefficient. I’m going to remove incremental mode from Maven build at all. You can try to use dev server available on IDEA plugin (which has really efficient incremental compilation and performs deobfuscation of stack traces and allows debugging right in IDEA) or if IDEA is not an option for you, ask me and I provide further instructions to setup CLI version of dev server.