Remove some old files relating to AspectJ Debugger ajdb
If ajdb ever existed and was part of the product, it must have been 20+
years ago. There are still some references to it in old release notes
and unused Ant and text files, but that is OK for now.
Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
Overhaul ClassLoaderWeavingAdaptor to use statically initialised Unsafe
instances and method handles pointing to their 'defineClass' methods.
Those now work universally on JDKs 8-21. In older JDKs, the method used
to be in sun.misc.Unsafe, in more recent ones on jdk.internal.misc.Unsafe.
It is challenging to fetch instances, especially as reflection
protection and module boundaries have been increased in the JDK
progressively. But finally, a solution was adapted from Byte Buddy (BB).
Kudos to BB author Rafael Winterhalter. The previous solution to use
ClassLoader::defineClass and require '--add-opens' is no longer
necessary for the first time since it became necessary in AspectJ 1.9.7
with Java 16 support.
Add org.ow2.asm:asm-common as a dependency everywhere org.ow2.asm:asm
was used before. Maybe that is too many places, but no worse than before.
Add missing dependency on loadtime to aspectjweaver. This kept a build
like "mvn install -am -pl aspectjweaver" from picking up changed
loadtime classes.
Fixes #117.
Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
Update AJDT update site URLs after project termination
AJDT is now part of the AspectJ project. Hence, both repository and
download area have moved to other URLs. See also:
https://gitlab.eclipse.org/eclipsefdn/emo-team/emo/-/issues/475#note_1612124
Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
- Redundant copies of HTML files used in AspectJ installer, which
already exist as resource files in module 'build'
- Null-sized AspectJ library JARs which probably were used to trigger
certain build steps in the former Ant build
- BridgeVersion.java.txt, which has been replaced by a regular
org.aspectj.bridge.Version class which can dynamically determine
versions from a properties file instead of relying on them being
hard-coded into the template.
Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
The former HTML file was moved up one directory level and converted to
asciidoc format. Therefore, include the ADOC file from the correct
location now.
Alternatively, we could have included the generated HTML from the
aj-build/dist/docs/doc directory, but that would have meant adding a
dependency to the 'docs' module to several other modules for this one
file. Actually, asciidoc has become a widely used and accepted format
for documentation and is human-readable by design. Therefore, it is OK
to include the ADOC file. The important thing is that the licence
information
- is contained in each published artifact,
- can be found easily,
- its content is human-readable.
All these requirements are still met with this change. Arguably, ADOC is
easier to read than HTML and does not even need a web browser.
Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
Like the javadocs in aspectjrt and aspectjweaver (if the releas profile
is active), for docs also copy the docs in the package phase to the
aj-dist directory.
Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
If we ever decide to add Maven site docs to the AspectJ website, now we
can deploy them locally using 'mvn site:deploy' and publish them on a
web server or even incorporate them into the binary distribution in the
installer's belly.
Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
Docs: Create separate CSS files, do not embed into HTML
TODO: There still is one set of CSS files per subdirectory due to the
way the docs directories are organised. It would be better to have them
just once. But to achieve that, the ADOC-to-HTML conversion would have
to be changed, e.g. using one central directory for images and
reorganisation of the overall directory structure and build options.
See https://github.com/asciidoctor/asciidoctor-maven-plugin/issues/729.
Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
Using Asciidoctor Maven, we now produce PDFs (which are also linked to
from the main documentation index page) for
- Programming Guide,
- AspectJ 5 Developer's Notebook,
- Development Environment Guide,
- Problem Diagnosis Guide,
- AspectJ Design Overview.
Attention! PDF generation alone takes 3+ minutes, almost 4 minutes
including asciidoc to HTML conversion. Just deactivate the 'create-docs'
profile if you do not need docs during the build.
Closes #272.
Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
Follow-up on previous rename-only commit. This time, the binaries are
real PNGs. The asciidoc and other references to them have also been
replaced. File figures_classes.png in the teaching materials also was
rotated by 90° to display it correctly.
Background: The Asciidoctor PDF back-end cannot handle GIFs directly
without an additional Ruby Gem. It is easier to only use PNGs and JPEGs.
Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
Fix warning in Asciidoctor Maven by JRuby version bump
Warning "Native subprocess control requires open access to the JDK IO
subsystem" can be avoided by upgrading JRuby, see
https://github.com/asciidoctor/asciidoctor-maven-plugin/issues/553.
Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
Before, only one image was referenced, consisting of a screenshot of two
diagrams. The other image file, containing just one of the diagrams, was
not used. Now, both images have been cropped correctly and are both
referenced separately from the release notes.
Better late than never...
Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
- AspectJ Browser (ajbrowser)
- Forte IDE integration
- JBuilder IDE integration
- Emacs integration
All this information was old and outdated. Ajbrowser was removed from
AspectJ a while ago. If the other tools even still exist, any possibly
existing AspectJ support is not part of AspectJ itself.
Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
In one case, we need to copy images from a subdirectory one level up,
because otherwise the images are only found in the included document,
but not in the single-page one including it from the subdirectory. In
all other cases, included ADOCs are located in the same directory as the
including document.
Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
- The website is just a front page.
- I failed to contact anyone via:
* fb9553b7471df638478bbf918044bf52.gdrp@customers.whoisprivacycorp.com
* info@aosd.net
* admin@aosd.net
- The discuss@aosd.net mailing list had its last post 6 years ago and
the last one concerning AspectJ 11 years ago according to the archive
at https://discuss.aosd.narkive.com/.
Mention Spring support for native AspectJ an Spring AOP as a real world
example in the FAQ.
Also remove an FAQ link to a no longer existing PARC website about
AspectJ and fix a small typo.
Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
- Add Java syntax highlighting to AspectJ and Java files
- Add XML syntax highlighting to XML files (Ant, LTW etc.)
- Dedent and remove empty lines, where necessary
- Enclose in-line line numbers for Java code in /*23*/ comments in order
to enable Java formatting
Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
Add initial set of AsciiDoc files, converted from HTML/XML
Some originals have been deleted already. Others, especially the user
guides, still exist in both formats because they have not been
proof-read and probably lots of links do not function as expected. But I
want to see what the files look like directly on GitHun.
Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
Use new constant Main.MINIMAL_JRE_VERSION (currently = 17) and
SourceVersion.latest().ordinal() to check, if the minimal JRE version
requirement for AJC is met. If not, then exit with code -1 and error
message "The AspectJ compiler needs at least Java runtime 17".
Relates to #269.
Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
Add tests for Java 21 unnamed classes and instance methods
TODO: Activate the unnamed class test after
https://github.com/eclipse-jdt/eclipse.jdt.core/issues/1106 is done. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
TODO: Due to eclipse-jdt/eclipse.jdt.core#1719, one line per test is
currently rendered incorrectly. After the upstream fix, change
"\Bill \Duck" to "Bill Duck".
Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
Add missing file RecordPatternsPreview1ExhaustivenessOK1.java for JDK 21
This file was missing, which did not trigger an error in CI builds,
because AllTestsAspectJ1921 was not part of the AllTests19 suite before.
The latter will be fixed in the next commit.
Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
AjcTaskTest: Be more lenient with aspectjrt version warning
Filter out a warning which occurs, if the current release does not match
the stored binary in lib/test:
bad version number found in aspectjrt.jar
expected 1.9.21.M1 found 1.9.20.1
If e.g. we run tests for a milestone release a.b.5.M1 and afterwards
switch back to a.b.5-SNAPSHOT, we do not want to update lib/test for a
single commit, just to make this test pass. Hence, we ignore this
warning here.
Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
Enable some tests after J19 problems were fixed for J21
Two test classes which had redundant default clauses for switch with
record patterns were copied from the java19 to the java21 directory and
the redundant clauses deactivated, i.e. the test now run as originally
intended. For older JDK versions, the old tests still stay active in
order to document the old state of affairs.
Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>