maven-javadoc-plugin sourceFileExcludes not working - maven

I'm not too sure what is the right way to use this tag, but I use it like this:
<sourceFileExcludes>
<exclude></exclude>
<exclude></exclude>
</sourceFileExcludes>
It doesn't work at all. It seems that there was a known bug in maven that this tag won't work as I found these threads:
https://stackoverflow.com/a/26223872/3209177
But that was a while ago. I didn't find much useful information on maven website as well.
So how can we exclude certain source files / classes while we build javadoc using maven?

Finally figured it out.
First, there was an known bug as tracked in this page: https://issues.apache.org/jira/browse/MJAVADOC-365
And the patch went into the plugin 2.10.2. So after that version, the bug is fixed. However, I was using some earlier version.
Second, use this schema:
<sourceFileExcludes>
<sourceFileExclude></sourceFileExclude>
<sourceFileExclude></sourceFileExclude>
</sourceFileExcludes>
To exclude file.
Third, in the sourceFileExclude, I used someClass.java, this is probably not right. Instead, I used someClass.* and this works for me.

You can use this pattern. It excludes the files irregardless of their package structure. More information here
<sourceFileExcludes>
<exclude>**/AppTest.java</exclude>
<exclude>**/Tester.java</exclude>
</sourceFileExcludes>

Related

Fortify Exclusion File Location

Ok, so I'm trying to get exclusions to work with fortify scanning using maven. I've got everything working except for the exclusions. The documentation says to create a *.exclusions file and add com.fortify.sca.exclude="fileA;fileB;fileC" to the file. However, it does not say where to put the file. Do I put it in the maven directory? Or do I put it in the Fortify directory? Any help on this would be appreciated.
Unfortunately, my reputation isn't high enough yet for me to ask you what version of Fortify SCA you're using, so that I can try and better help you. But I'll try taking a stab with this.
I'm not sure about the *.exclusions file you're talking about, but perhaps you can add something on the command line when you call maven to build and scan your app using the "-Dfortify.sca.exclude" property option. See the example command below:
mvn com.fortify.sca.plugins.maven:sca-maven-plugin: <ver> :translate -Dfortify.sca.source.version=1.8 -Dfortify.sca.exclude="fileA;fileB;fileC;

Modifing Alfresco 5.0.d Add-ons

I've been trying to modify an addon to accept filtering in custom datalists.
The addon is called DatalistExtensions for Alfresco Share and can be found at https://github.com/deas/contentreich-alfresco-datalists This is supposed to be working on the version 5.*
It comes with an example. That example doesn't work at all, it gives multiple errors... I fixed the errors but it still doesn't work.
The full explanation of the behaviour can be found here:
https://forums.alfresco.com/forum/developer-discussions/alfresco-share-development/filters-custom-datalists-07052016-1320
Now the problem:
I decided to modify the add-on itself. My test was easy, I found where the filter form is created which is inside the file: contentreich-extdl.xml that is found on contentreich-alfresco-datalists-master/contentreich-extdl-share/src/main/resources/alfresco/site-data/extension/
It didn't work at all... Since it was too strange to me I decided to delete one of the built-in filters and it was still working as always which just killed my mind.
The steps I did:
Added the lines into the file.
Ran the mvn package after the change.
Copied the target files created.
What am I missing to make this changes work?
It seems that the changes I was doing were not reflected, in order to archive that you must first clean your maven target and then build the package.
mvn clean
mvn package
or even
mvn clean package
Hope this helps other people!

Creating '--rsyncable' maven assembly

Currently, maven-assembly-plugin allows only pre-defined output archive formats, such as .zip, tar.gz. The docs do not mention straightforward configuration to create --rsyncable gzip.
So far, I've gotten as far as maven-archiver should be configured, however the docs are rather scarce.
Just wondering, anyone already explored this?
Update: Maven-archiver uses org.codehaus.plexus.archiver.gzip, which uses java.util.zip.GZIPOutputStream, which is a standard impl of zip, expectedly without --rsyncable support.
Looks like the most feasible option is to search for alternative zip implementation and promote it to plexus guys.
I had the same problem and tried to find a way to create rsyncable tar.gz archives but to no avail. However I could solve it by using 'zip' as format. 'zip' seems to be rsyncable by default. Most probably 'jar' will do the trick as well. So, if there is no specific reason to use 'tar.gz' or 'tar.bz2', I prefer 'zip' now for packaging in order to get the advantage from rsync on transfering my packages to remote machines.

CodeIgniter 2.1.0 Template Library

Recently CI 2.1.0 is out.
I have a question. As I recognized that the CI folder structure has been 'evolved' (easy to setup, automatically defines base_url,etc), I'm wondering if the current template libraries like Phil's,william's concept,ocular,etc.. can be adapted to this new CI version.
I've tried Phil's but no luck, I mean..I don't know if I'm missing something this time, and ocular, also, to no avail ( I don't subclass the Controller, as suggested here)
Any better templating suggestions that will be suited enough to the latest CodeIgniter 2.1.0?
Thanks.
It seems like from the comments above that you're having trouble finding any resources online on the matter. Here's my suggestion for you:
Check the CodeIgniter Change Log here, and compare all the changes between this newest release, and the release that you know last worked with the template libraries that you've mentioned above. Use deductive reasoning, and see if you can find a way to modify the templates you need to work with the current CodeIgniter structure. I know that's a lot of work, and is not ideal for your situation. Regardless, it's the best advice I can give at the current moment. Good luck, and happy reading!

When running phpdoc on a CodeIgniter project, which folders should be included?

On my first try, I've only included system/application/models, system/application/controllers, system/application/helpers, and system/application/libraries. I chose those folders because I think those folders contain the code that you want to be properly documented for future reference. What other folders do you think should be included?
To be thorough in terms of your own code. I would recommend the following folders and where necessary have annotated:
system/application/controllers
system/application/helpers
system/application/hooks - Don't miss this out! Any time that you change/extend the CI core, you should definitely document it
system/application/models
system/application/libraries
system/application/language - This may come in useful when implementing localisation
system/plugins - As you're including libraries, it would make sense to include any external plug-ins being used as well
I think you got it covered. The rest is probably documented in CodeIgniter's documentation already.
If you add any plugin/library/whatever that requires to be outside of these folders, make sure you add them later as well.

Resources