Merge Project: Error while building merged project with error undefined compiler variable - install4j

I am using merge project feature of install4j.
I have created sub-project with one action in it. This action uses some compiler variables which are defined in same project(sub-project).
Now I have merged this project into main project, and created the link to an action from sub-project.
But when I try to build main project it gives error that variable used in action is not defined as shown below.
Build failed.
Cause: com.exe4j.b.z
When trying to process '${compiler:RegPath}': the variable 'RegPath' has not been defined. Stack trace:
com.exe4j.a.d: com.exe4j.b.z: When trying to process
'${compiler:RegPath}': the variable 'RegPath' has not been defined.
at com.install4j.b.i.b(ejt:175) at com.install4j.gui.b.run(ejt:100)
Caused by: com.exe4j.b.z: When trying to process
'${compiler:RegPath}': the variable 'RegPath' has not been defined.
at com.install4j.config.l.a(ejt:577) at
com.install4j.config.l.a(ejt:485) at
com.install4j.config.l.a(ejt:431) at com.install4j.b.c.f.a(ejt:84)
at com.install4j.b.c.f.a(ejt:87) at com.install4j.b.c.f.a(ejt:87)
at com.install4j.b.c.a.a(ejt:1079) at com.install4j.b.c.a.a(ejt:957)
at com.install4j.b.c.a.a(ejt:943) at com.install4j.b.c.a.a(ejt:925)
at com.install4j.b.c.a.a(ejt:762) at com.install4j.b.c.a.a(ejt:721)
at com.install4j.b.c.a.k(ejt:685) at com.install4j.b.c.a.b(ejt:227)
at com.install4j.b.c.a.a(ejt:133) at com.install4j.b.b.v.a(ejt:75)
at com.install4j.b.b.c(ejt:285) at com.install4j.b.b.a(ejt:141) at
com.install4j.b.i.a(ejt:413) at com.install4j.b.i.b(ejt:156) ... 1
more
Am I missing anything?
Project Files: Sub-Project Main Project

This is a bug that will be fixed in 7.0.9. Please contact support#ej-technologies.com to get a build where this is already fixed.

Related

How to remedy error caused by guava: Program type already present: com.google.common.util.concurrent.internal.InternalFutures

An AAR library already uses com.google.guava.
If an app includes the following in its build.gradle:
api 'com.google.guava:guava:27.0-android'
Building the app generates the following error:
Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'.
> com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives: ...
Learn how to resolve the issue at https://developer.android.com/studio/build/dependencies#duplicate_classes.
Program type already present: com.google.common.util.concurrent.internal.InternalFutures
If I do not include "api 'com.google.guava:guava:27.0-android'", the app can be built, but it has runtime error of java.lang.NoClassDefFoundError when it reaches the point of using the Guava method: Iterables.find
I had to update to version 27.0.1, at the time of writing they still haven't updated the README with this new version.
implementation 'com.google.guava:guava:27.0.1-android'
Since Guava 27.0, ListenableFuture is located in separate artifact, see the announcement. You can try two things (one at a time):
Exclude "listenablefuture" module (group "com.google.guava") and build your project again.
I don't know the AAR specifics, but it could be that 27.0-android doesn't work with AAR, so you should try 26.0-android instead.

Migrating to Dart 2 I get a "check imports error" that means that some templates have not been generated

I'm trying to migrate to Dart 2, I have a lot of packages and up to now I could do my job with not so much problems.
Now I'm getting a strange error bot with DDC and dart2js:
[SEVERE] build_web_compilers|entrypoint on web/main.dart (cached):
Unable to find modules for some sources, this is usually the result of either a
bad import, a missing dependency in a package (or possibly a dev_dependency
needs to move to a real dependency), or a build failure (if importing a
generated file).
Please check the following imports:
`import 'package:ledger_web/src/ui/components/main_selection_bar.template.dart';` from ledger_web|lib/src/ui/components/service/main_selection_bar_service.dart at 7:1
`import 'package:ledger_web/src/ui/components/main_selection_bar.template.dart';` from ledger_web|lib/src/ui/components/service/main_selection_bar_service.template.dart at 11:1
... and more
It is correct to signal that there is not the import (MainSelectionBar is an angular component), because the template has not been generated.
Now the problem is, why the template is not there?
I checked the .dart_tool/build/generated directory but the template has not been created.
I have a similar package with a similar component that works fine, so I cannot figure out what's happened.
Is there a place where there is a more detailed error list?
Interestingly enough, there is also a case in which the template exists, but it is listed like if it was not found....
Any hint?
Most likely this is related to a build failure when generating the template, which is not being properly reported on subsequent builds. This pull request should help that https://github.com/dart-lang/build/pull/1834/, but you can also try running pub run build_runner clean and then doing a new build to get the original error back.

system compiler variables are not overwritten in merged project

I have a launcher in a sub-project whose name is dependend on the ${compiler:sys.version} variable.
The project is merged into a parent project, which is build with a gradle task on command line.
task serverSetup(type: com.install4j.gradle.Install4jTask, dependsOn: 'initialize') {
projectFile = file('server.install4j')
release = artifactVersion
}
Problem is, that the launcher of the sub-project is created with the value set in the sub-projects Application Info and not overridden with the version set by the gradle task.
Am I doing something wrong? The documentation says:
As a result of flat merging, there are no intermediary artifacts for merged projects. .... In particular, all elements in the final result share the same
namespace for compiler and installer variables.
Because of this I expect the sys.version variable to be overriden in the sub-project.
This is a bug, it will be fixed in 7.0.5. Please contact support#ej-technologies.com to get a build where this already fixed.

Early grey environment setup

I'm trying to get Earlgrey setup on my computer by following the steps for Cocoapod installation as described here
After performing all the steps I keep on getting compilation error during build
EarlGrey.swift:17:27: Use of undeclared type 'EarlGreyImpl'
There are 13 such compilation errors all related to unresolved identifier.
I re-tried the steps multiple times with same results. My folder structure matches with what is shown in the instructions.
Any suggestions where should i look further to get this resolved.
For reference i'm using this swift project as base for writing test cases.
So the issue was related to BridgingHeader.h file setting in
test target -> build Setting -> Swift compiler -Code generation -> Objective-C bridging Header
I copied the file from demo project, but did not specify it in the above setting. Once specified there, the compilation errors was gone.
Try importing EarlGrey using #import <EarlGrey/EarlGrey.h> instead of #import EarlGrey;

Jenkins tag name is invalid

Has anyone seen the following exception from Jenkins?
FATAL: org.eclipse.jgit.api.errors.InvalidTagNameException: tag name jenkins-Push Notifications API (Master)-3 is invalid
hudson.plugins.git.GitException: org.eclipse.jgit.api.errors.InvalidTagNameException: tag name jenkins-Push Notifications API (Master)-3 is invalid
at org.jenkinsci.plugins.gitclient.JGitAPIImpl.tag(JGitAPIImpl.java:179)
at hudson.plugins.git.GitAPI.tag(GitAPI.java:220)
at hudson.plugins.git.GitSCM$4.invoke(GitSCM.java:1239)
at hudson.plugins.git.GitSCM$4.invoke(GitSCM.java:1196)
at hudson.FilePath.act(FilePath.java:865)
at hudson.FilePath.act(FilePath.java:838)
at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1196)
at hudson.model.AbstractProject.checkout(AbstractProject.java:1353)
at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:689)
at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:88)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:594)
at hudson.model.Run.execute(Run.java:1567)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:237)
Caused by: org.eclipse.jgit.api.errors.InvalidTagNameException: tag name jenkins-Push Notifications API (Master)-3 is invalid
at org.eclipse.jgit.api.TagCommand.processOptions(TagCommand.java:198)
at org.eclipse.jgit.api.TagCommand.call(TagCommand.java:112)
at org.jenkinsci.plugins.gitclient.JGitAPIImpl.tag(JGitAPIImpl.java:175)
... 14 more
This is a Scala project and we are using SBT 12.1 to build it. My googling has only returned issues with older versions of Jenkins which I am past. We have 1.506.
We have a ton of other projects building just fine and some of them are also Scala.
I got this error building a Java project. I'm not sure why this would suddenly crop up, but I was able to work around it by doing the following:
Go to the Advanced... config settings for the Source Code Management section of the build config and check "Skip Internal Tag".
(upgraded from comment)