When using the javadoc tool (Which I do through the Maven Javadoc Plugin, not with javadoc directly), there is the -link option to link to external sources. The problem now is that my project makes use of JSR-305 annotations, and I have configured the javadoc tool to link to the Java SE 8 APIs.
Both the Java SE 8 APIs and JSR-305 use javax.annotation, and so because javadoc can't really tell if javax.annotation.Nullable is from Java SE 8 or from JSR-305, it may generate a dead link to the Java SE 8 javadocs as opposed to a working link to the JSR-305 javadocs. Is there a way to configure javadoc to fix this, such that links to javax.annotation.Nullable is linked to JSR-305 javadocs and other things like javax.annotation.Resource is lined to the Java SE 8 API?
Related
As of Java 11 it is necessary to get JAXB from a separate library, not from the JDK. There are plenty of tutorials on the Web showing how to do that, but they all use Maven. The project I need to fix is an Eclipse RCP application. There does not seem to be an easy to make that work with Maven, as Maven essentially takes over most of what Eclipse would do but doesn't have RCP development capabilities.
Sooner or later Maven gets the required libraries. I would like to find another way to get and use whatever libraries are needed, just without using Maven. It should be possible. I just haven't found it.
Thanks.
I did what I wanted by downloading the needed JARs from https://mvnrepository.com/.
I am having difficulties understanding HOW maven compiler plugin works under the hood post java 8 (i.e. JDK 11).
(I know how to operate it to work with JDK 11 (using <release> element), but I am interesting (and confused) as to HOW it works behind the scenes)
When working with pure JDK 11 javac, I can give it the --classpath argument and have all the jars listed there be treated as Unknown module.
I can also give javac the --module-path argument, and have all the (non modular) jars appearing there to be treated as Automatic module(s).
But, when working with maven project, using the maven-compiler-plugin with JDK 11, how does it compile my code ? are all the dependencies are in the classpath ? or in the module-path ? perhaps both ? what maven uses to distinguish between them ?
I have read the maven-compiler-plugin documentation, that referred me to the plexus compiler project (and could not find there much to be honest). I expected to be able, eventually, see the actual command line that maven compiler plugin uses when invoking javac for me and its various used arguments. I tried to invoked it with verbose=true and did not get anything useful as well..
All in all, I could not find anything useful on that stuff ; All references explains how to operate compiler plugin as a black box, nothing about how it actually works internally. :(
Anyone knows or has a good reference to a proper documentation\explanation on the above ?
Update:
Following #khmarbaise comment, -X shows a lot of debug information, among it a detailed list of what jars\classes are used in the class-path and which are in the module path.
One strange thing remains though:
I am compiling maven module A which is a java module as well (it has module-info.java file). It seems that A's classes (...\A\target\classes folder) is given to the class-path argument. Any idea why ?
I have been looking tirelessly for a working example of a simple application that uses AspjectJ 1.7 and is compiled using Maven 3.3. I have been able to find complex examples that use older versions of AsjectJ and older versions of Maven, but nothing recent.
Any related example that somebody could be able to provide would be incredibly helpful!
See my simple example of of java.lang.instrument and AspectJ Weaver on github?
https://github.com/noahlz/weaver-demo
I would like to ask, if there is some maven plugin (or another way) to generate jboss modules hierarchy (with modules.xml files) from maven dependencies (or in list of libraries for such a maven plugin) ?
I have found this plugin :
https://www.smartics.eu/confluence/display/SJBMMP/smartics+JBoss+Modules+Maven+Plugin;jsessionid=3CA5AE2D1DEB5DFB62C1E64692EDCAB6
But documentation / usage pages seem to be offline (or for some reason I cannot open page).
Thank you very much for your help !
I have tried SMARTICS plugin plugin and it created for each maven module special JAR file with ALL dependencies in it.
It is like using maven assembly plugin but all libraries are packed in standalone jar which can be placed into own jboss module. Than in your application : jboss-deployment-structure.xml you reference to this librari (e.g. jar file) and application has all libraries provided.
But splitting dependencies into own directories and generating modules.xml is not possible (confirmed by JBOSS EAP support).
I will create standalone maven project (something like "JBOSS-modules BOM project") which will generate such structure (this structure will be ready for usage on jboss).
I just would like to add an introduction to the mentioned plugin for Maven:
https://www.smartics.eu/confluence/display/BLOG/2013/10/18/Maven+Plugin+to+generate+a+Modules+Directory+for+JBoss+AS+7
The article includes screenshots that help new users to get an idea on how the plugin generates separate modules.
(I would like to comment to your answer, but unfortunately I'm some points from being entitles to do so :( )
Usually I learn new frameworks by going through each line of the source code
I have spring 3.2 in my eclipse project but java aspect classes are not included.
I tried to decompile them but they look messed up
Any where can I find them?
If you have your code a maven project, and it is setup well, it will download the sources automatically. So I recommend you setup your project in maven.
you can find here a good configuration of a spring 3.2 project with maven,
https://github.com/andonescu/springmvc-freemarker
and use maven to download source code, see this link to help you
Maven – Always download sources and javadocs