# HG changeset patch # User Doug Simon # Date 1410262328 -7200 # Node ID c24ea91c30ba2b183a292fbd0283d4cda0819e1a # Parent 899dd861f081cd83d320fb9d678cdbeb5f6605e8 create generated source dirs as part of netbeansinit diff -r 899dd861f081 -r c24ea91c30ba mxtool/mx.py --- a/mxtool/mx.py Tue Sep 09 12:14:23 2014 +0200 +++ b/mxtool/mx.py Tue Sep 09 13:32:08 2014 +0200 @@ -3978,14 +3978,14 @@ out.open('source-roots') out.element('root', {'id' : 'src.dir'}) if len(p.annotation_processors()) > 0: - out.element('root', {'id' : 'src.ap-source-output.dir'}) + out.element('root', {'id' : 'src.ap-source-output.dir', 'name' : 'Generated Packages'}) out.close('source-roots') out.open('test-roots') out.close('test-roots') out.close('data') firstDep = True - for dep in p.all_deps([], True): + for dep in p.all_deps([], includeLibs=False, includeAnnotationProcessors=True): if dep == p: continue @@ -4020,7 +4020,10 @@ annotationProcessorSrcFolder = "" if len(p.annotation_processors()) > 0: annotationProcessorEnabled = "true" - annotationProcessorSrcFolder = "src.ap-source-output.dir=${build.generated.sources.dir}/ap-source-output" + genSrcDir = p.source_gen_dir() + if not exists(genSrcDir): + os.makedirs(genSrcDir) + annotationProcessorSrcFolder = "src.ap-source-output.dir=" + genSrcDir content = """ annotation.processing.enabled=""" + annotationProcessorEnabled + """ @@ -4033,7 +4036,6 @@ build.classes.excludes=**/*.java,**/*.form # This directory is removed when the project is cleaned: build.dir=bin -build.generated.dir=${build.dir}/generated build.generated.sources.dir=${build.dir}/generated-sources # Only compile against the classpath explicitly listed here: build.sysclasspath=ignore @@ -4054,7 +4056,7 @@ includes=** jar.compress=false # Space-separated list of extra javac options -javac.compilerargs= +javac.compilerargs=-XDignore.symbol.file javac.deprecation=false javac.source=""" + str(p.javaCompliance) + """ javac.target=""" + str(p.javaCompliance) + """ @@ -4154,10 +4156,12 @@ if updated: log('If using NetBeans:') - log(' 1. Ensure that the following platform(s) are defined (Tools -> Java Platforms):') + # http://stackoverflow.com/questions/24720665/cant-resolve-jdk-internal-package + log(' 1. Edit etc/netbeans.conf in your NetBeans installation and modify netbeans_default_options variable to include "-J-DCachingArchiveProvider.disableCtSym=true"') + log(' 2. Ensure that the following platform(s) are defined (Tools -> Java Platforms):') for jdk in jdks: log(' JDK_' + str(jdk.version)) - log(' 2. Open/create a Project Group for the directory containing the projects (File -> Project Group -> New Group... -> Folder of Projects)') + log(' 3. Open/create a Project Group for the directory containing the projects (File -> Project Group -> New Group... -> Folder of Projects)') _zip_files(files, suite.dir, configZip.path) _zip_files(libFiles, suite.dir, configLibsZip)