Modifing Alfresco 5.0.d Add-ons - maven

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!

Related

Issue with using a modified version of a Go dependency

So here is the situation:
I have a fork of go-ipfs. It depends on go-ipfs-config. I need to modify go-ipfs-config and make go-ipfs depend on my modified version.
I forked the go-ipfs-config made my changes and made sure to update the path to be that of my forked version as can be seen here. I confirmed that this still builds successfully by running go build
Then I updated go.mod in go-ipfs to use my modified version. I used the replace directive to signify this intention which can be seen here
This is where things gets absolutely bunkers and I am no longer sure what is going on.
When i do go mod tidy to fetch the dependency i get the following output:
go: finding module for package github.com/dadepo/go-ipfs-config
go: found github.com/dadepo/go-ipfs-config in github.com/dadepo/go-ipfs-config v0.5.3
The crazy thing is that v0.5.3 does not exist in github.com/dadepo/go-ipfs-config!
Also the following line get added to go.mod :
github.com/dadepo/go-ipfs-config v0.5.3 // indirect
Which can even be seen here
I have run commands like go clean -modcache and go clean -r etc but does not seem to fix things!
Does anybody know what I am doing wrong? And also how to achieve the goal of making my version of a project depend on another modified version of its dependency?
Ok, so this is as a result of me not being aware of couple of things going on in the Go lang toolchain.
Apparently https://proxy.golang.org is a thing! It is a service operated by google that caches modules. So If you made a release, deleted it, chances are that the version is already cached in https://proxy.golang.org. This was exactly what happened in my case. I had made a 0.5.3 release, deleted it, but it is not really gone as the Google cache already got a hold of it.
So in case you are seeing versions that should not exist. This should be the first place you check. This documentation link also sheds some more light on the proxy and how it can be tweaked.
I found this out based on the conversation I had on the issue I opened reporting this behaviour. If you are curious, you can check it out here.

Inconsistent internal package errors with go get

I'm trying to go get go.etcd.io/etcd/tools/benchmark.
Previously this has worked, flawlessly. However when I try to do it currently I have alternatively got no errors and I've had it fail on me with:
go/src/go.etcd.io/etcd/vendor/google.golang.org/grpc/balancer_conn_wrappers.go:28:2: use of internal package google.golang.org/grpc/internal/buffer not allowed
go/src/go.etcd.io/etcd/vendor/google.golang.org/grpc/clientconn.go:49:2: use of internal package google.golang.org/grpc/internal/resolver/dns not allowed
go/src/go.etcd.io/etcd/vendor/google.golang.org/grpc/clientconn.go:50:2: use of internal package google.golang.org/grpc/internal/resolver/passthrough not allowed
The first time I ran it on a new go-1.13 installation it worked, but the following times it has failed as above.
The repo has not changed as far as I can tell in the past 8 months and I've tried on various golang versions but all so far have failed (bar the go-1.13 on that first try...).
Any assistance debugging this would be greatly appreciated!
I have both a workaround and an official fix.
The workaround:
Here I defined a go.mod which then used a previous version of the library.
The official fix:
This was fixed upstream and thus no one else should experience this.
I guess you can try by removing vendor folder from the go.etcd.io/etcd repo. Also disable the vendoring mode. It should work.

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;

BasicMediaPlayerPluginMac an example project by firebreath

I have followed the following steps:
ran prepmac.sh examples
tried to build the FireBreath.xcodeproj got a lot many errors then added two header files and SpriteKit/SpriteKit.h to the BasicMediaPlayerPluginMac.mm only then i was able to build the project on success i linked it to Library/InternetPlugins folder. On opening the html page for the media player it says plugin missing. Application of x-vnd.fbBasicMediaPlayer not found, cannot read the plugin as error. I tried adding two other frameworks namely coregraphics/coregraphics.h and cocoa/cocoa.h but the build was unsuccesfull. I'm trying to look into the plugin and how it is developed.
Start from simplest possible setup. Build FBTestPlugin, it should not require any changes to the setup. Put the plugin to /Library/Internet-Plug Ins and restart your browser before trying to load it by the html sample supplied.
Note that project files should be never modified explicitly, only through cmake files and prep-scripts.
Good luck, these plugins are not simple to develop :)

CKBuilder gives me too many plugins

In anticipation of making some modifications to ckeditor, I'm trying to build it from source, as described in the documentation here. I want to build a version that is, as nearly as possible, identical to the version I already have installed on my production web server, so there won't be any surprises when I deploy my modified version later. Here are the steps I've followed:
Clone the git repository
git checkout 4.3.3 (this is the version on the production server)
copy the build-config.js from the production server to ckeditor-dev/dev/builder/ (my production version came from the online builder; the config is at http://ckeditor.com/builder/059ce76c63ea2ff01636265c46f713c5)
cd dev/builder ; ./build.sh
there were complaints about missing plugins (scayt and wsc) so I downloaded them as zip files (scayt_4.3.3.zip and wsc_4.3.3.zip) and unzipped them in ckeditor-dev/plugins
tried ./build.sh again
It apparently completed successfully, but the result in release/ckeditor is not a match for the production version as I had hoped. It contains a lot of plugins that I didn't ask for, and I know they're not dependencies of plugins I did ask for because the production version works fine without them. For example, I have release/ckeditor/plugins/adobeair which is not mentioned in my build-config.js.
The main ckeditor.js file is not a match for the production version either. i can see that part of the reason is that there is a different timestamp and version string ("4.3.3 DEV"), but there are lots of other changes too, which I can't easily examine because it's minified. And I can't really trust that this file was built correctly, since the plugin list wasn't built correctly. Also I can't break the build process down into smaller steps find out what it's doing because there's no source.
In a desperate move to try to understand what's going on, I reduced the plugin list in build-config.js to just the about plugin and ran ./build.sh again. This caused release/ckeditor/plugins to get even bigger!
Can anyone explain why the build.sh can't give me anything close to the version I downloaded from the online builder?
(By the way, this question is here instead of on the CKEditor support forum because they wouldn't let me post it there. Called me a spammer!)
CKBuilder which is used by the build script in https://github.com/ckeditor/ckeditor-dev is exactly the one which is used by http://ckeditor.com/builder. The difference is caused by different arguments passed to it.
By default CKBuilder adds all plugins, even those omitted in build-config.js, to the package, although it doesn't merge them into the ckeditor.js. They are available to be enabled on demand. So ckeditor.js is not bigger than that downloaded from http://ckeditor.com/builder.
To build a package with only those plugins which you specified in build-config.js pass -s option to the build script:
> ./dev/builder/build.sh -s
You can also check other options:
> ./dev/builder/build.sh --help
As you'll find there it is possible to change the version, leave JS and CSS unminified etc.
PS. Sorry for the spam filter on forum.

Resources