Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 512019 - eclipse-dmg-packager is reporting an error about undocumented property
Summary: eclipse-dmg-packager is reporting an error about undocumented property
Status: RESOLVED FIXED
Alias: None
Product: CBI
Classification: Technology
Component: maven-plugins (show other bugs)
Version: unspecified   Edit
Hardware: PC Mac OS X
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: CBI Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 461670
  Show dependency tree
 
Reported: 2017-02-10 04:32 EST by Sravan Kumar Lakkimsetti CLA
Modified: 2017-02-21 06:25 EST (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sravan Kumar Lakkimsetti CLA 2017-02-10 04:32:16 EST
I am trying to use eclipse-dmg-packager plugin to create a dmg file, but I am getting the following error

[ERROR] Failed to execute goal org.eclipse.cbi.maven.plugins:eclipse-dmg-packager:1.1.3:package-dmg (default) on project org.eclipse.rt.osgistarterkit.product: Execution default of goal org.eclipse.cbi.maven.plugins:eclipse-dmg-packager:1.1.3:package-dmg failed: Missing required properties: log -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.eclipse.cbi.maven.plugins:eclipse-dmg-packager:1.1.3:package-dmg (default) on project org.eclipse.rt.osgistarterkit.product: Execution default of goal org.eclipse.cbi.maven.plugins:eclipse-dmg-packager:1.1.3:package-dmg failed: Missing required properties: log
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
	at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
	at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
	at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
	at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
	at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default of goal org.eclipse.cbi.maven.plugins:eclipse-dmg-packager:1.1.3:package-dmg failed: Missing required properties: log
	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:145)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
	... 20 more
Caused by: java.lang.IllegalStateException: Missing required properties: log
	at org.eclipse.cbi.maven.http.AutoValue_RetryHttpClient$Builder.autoBuild(AutoValue_RetryHttpClient.java:166)
	at org.eclipse.cbi.maven.http.RetryHttpClient$Builder.build(RetryHttpClient.java:89)
	at org.eclipse.cbi.maven.plugins.dmgpackager.CreateDMGMojo.callDMGService(CreateDMGMojo.java:181)
	at org.eclipse.cbi.maven.plugins.dmgpackager.CreateDMGMojo.execute(CreateDMGMojo.java:174)
	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
	... 21 more
[ERROR] 
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException
[ERROR] 
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <goals> -rf :org.eclipse.rt.osgistarterkit.product
[DEBUG] Waiting for process to finish
[DEBUG] Result: 1
Comment 1 Sravan Kumar Lakkimsetti CLA 2017-02-10 04:48:54 EST
Here is the job I am using https://hudson.eclipse.org/releng/view/My%20Jobs/job/test-aggregator-signed-dmg-testjob/lastBuild/console
Comment 2 Eclipse Genie CLA 2017-02-10 07:53:57 EST
New Gerrit change created: https://git.eclipse.org/r/90826
Comment 4 Mikaël Barbero CLA 2017-02-10 08:03:43 EST
I've just published a new snapshot version (1.1.4-SNAPSHOT) of the dmg-packager maven plugin on repo.eclipse.org. Please give it a try. It should fix your issue.
Comment 5 Sravan Kumar Lakkimsetti CLA 2017-02-10 08:04:49 EST
(In reply to Mikaël Barbero from comment #4)
> I've just published a new snapshot version (1.1.4-SNAPSHOT) of the
> dmg-packager maven plugin on repo.eclipse.org. Please give it a try. It
> should fix your issue.

Thanks Mikael. I will give it a try now.
Comment 6 Sravan Kumar Lakkimsetti CLA 2017-02-12 15:31:58 EST
(In reply to Sravan Kumar Lakkimsetti from comment #5)
> (In reply to Mikaël Barbero from comment #4)
> > I've just published a new snapshot version (1.1.4-SNAPSHOT) of the
> > dmg-packager maven plugin on repo.eclipse.org. Please give it a try. It
> > should fix your issue.
> 
> Thanks Mikael. I will give it a try now.

There still another problem. I am getting NPE now. Here is the log
15:45:30  Caused by: java.lang.NullPointerException
15:45:30  	at org.eclipse.cbi.maven.plugins.dmgpackager.CreateDMGMojo.callDMGService(CreateDMGMojo.java:195)
15:45:30  	at org.eclipse.cbi.maven.plugins.dmgpackager.CreateDMGMojo.execute(CreateDMGMojo.java:174)
15:45:30  	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
Comment 7 Sravan Kumar Lakkimsetti CLA 2017-02-12 15:35:00 EST
I had a look at the code the nullpointer exception is coming from volumeIcon check. Since this is an optional parameter I did not pass this information. So it will be null.
Comment 8 Eclipse Genie CLA 2017-02-13 03:43:31 EST
New Gerrit change created: https://git.eclipse.org/r/90906
Comment 10 Mikaël Barbero CLA 2017-02-13 03:48:05 EST
(In reply to Sravan Kumar Lakkimsetti from comment #6)
> There still another problem. I am getting NPE now. 

A new 1.1.4-SNAPSHOT has been published with a fix.
Comment 11 Sravan Kumar Lakkimsetti CLA 2017-02-13 06:42:37 EST
(In reply to Mikaël Barbero from comment #10)
> (In reply to Sravan Kumar Lakkimsetti from comment #6)
> > There still another problem. I am getting NPE now. 
> 
> A new 1.1.4-SNAPSHOT has been published with a fix.

Thanks Michael. Sorry still no joy. Here is the new error message
[DEBUG] Will send request to 'http://build.eclipse.org:31338/dmg-packager'
[WARNING] [Mon Feb 13 05:47:26 EST 2017] HTTP request failed.
HTTP Error 404 (reason: Not Found)
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL /dmg-packager was not found on this server.</p>
</body></html
Comment 12 Mikaël Barbero CLA 2017-02-13 07:01:15 EST
Sorry, the service was only provided by internal URL only. Thus 'http://build.eclipse.org:31338/dmg-packager' URL was providing the service. It should be fixed now. Sorry for the inconvenience.
Comment 13 Sravan Kumar Lakkimsetti CLA 2017-02-13 08:57:04 EST
(In reply to Mikaël Barbero from comment #12)
> Sorry, the service was only provided by internal URL only. Thus
> 'http://build.eclipse.org:31338/dmg-packager' URL was providing the service.
> It should be fixed now. Sorry for the inconvenience.

I tried again. create-dmg command is failing now. 

java.io.IOException: The 'create-dmg' command exited with value '1'
See logs for full command output
	at org.eclipse.cbi.webservice.dmgpackaging.DMGPackager.packageImageFile(DMGPackager.java:34)
	at org.eclipse.cbi.webservice.dmgpackaging.DMGPackagerServlet.doPost(DMGPackagerServlet.java:85)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:808)
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:587)
	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:221)
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
	at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
	at org.eclipse.jetty.server.Server.handle(Server.java:497)
	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310)
	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)
	at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)
	at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)
	at java.lang.Thread.run(Thread.java:745)

For your test purposes you can use the job

https://hudson.eclipse.org/releng/view/All/job/ATestForSravan/

my expectation here is I should get 2 dmg files in the workspace if it is successful.
Comment 14 Mikaël Barbero CLA 2017-02-13 10:31:09 EST
It seems you were facing timeout. I've raised the dmg creation timeout on the server side from 3 to 10 min.
Comment 16 Mikaël Barbero CLA 2017-02-14 04:30:11 EST
The service was down during the upgrade, see bug 478954.
Comment 17 Sravan Kumar Lakkimsetti CLA 2017-02-20 06:54:59 EST
I am still not able to get a dmg using the dmg-packager service. To test this job I have created a test job https://hudson.eclipse.org/releng/view/Releng/job/ATestForSravan/ 

This job copies two cocoa packages from the down load site and call dmg-packager using maven

My Expectation here is this should create a .dmg along side .tar.gz files. What I am getting is only log files. No dmg is file is getting created.

We would like to have this in M6. Please let us know if this is not possible
Comment 18 Mikaël Barbero CLA 2017-02-20 11:08:32 EST
This is fixed now. There was still an issue on the server code that was not handling properly the default value for the parameters. You are the first user of this service which has been developed a while ago but has never been battle tested (I use to test the web service with curl only, which was working properly, but of course, I did not use the same parameters as the maven plugin).

Note I've changed you test job a bit. You were appending to your pom both times with ">> pom.xml", so you ended up with two root <project> elements which was incorrect.
Comment 19 Sravan Kumar Lakkimsetti CLA 2017-02-21 03:05:54 EST
Thank you for the quick response. I will incorporate this change to main product pom files and verify.

Thanks,
Sravan
Comment 20 Sravan Kumar Lakkimsetti CLA 2017-02-21 05:19:15 EST
I am able to create dmg files with this plugin. We are closer to the end goal getting a signed dmg.

Now I tried using mac-appsigner plugin to sign the dmg file. But what I found is appsigner plugin doesnot accept dmg file.

I have two options here.

1. Modify appsigner plugin to accept dmg files and sign
2. add signing dmg-packager plugin itself.

I prefer option 2. 

Dmg can besigned with the following command on Mac OSX 10.11.5 and above

codesign -s <identity> --keychain <full-path-to-keychain> <path-to-disk-image>

I believe the machine we are using is on 10.11.

I can create another bug if needs for the signing part.

Thanks
Sravan
Comment 21 Mikaël Barbero CLA 2017-02-21 05:40:02 EST
(In reply to Sravan Kumar Lakkimsetti from comment #20)
> I am able to create dmg files with this plugin. We are closer to the end
> goal getting a signed dmg.
> 
> Now I tried using mac-appsigner plugin to sign the dmg file. But what I
> found is appsigner plugin doesnot accept dmg file.

Yes, the signing of DMG has never been implemented, neither in the dmg-packager nor in the macsigner services.

> I have two options here.
> 
> 1. Modify appsigner plugin to accept dmg files and sign
> 2. add signing dmg-packager plugin itself.
> 
> I prefer option 2. 

+1 for option 2. I propose to add an option in the dmg-packager maven plugin to say whether or not the dmg should be signed before being returned (default to false). The webservice will need to be modified as well to implement this feature.
 
> Dmg can besigned with the following command on Mac OSX 10.11.5 and above
> 
> codesign -s <identity> --keychain <full-path-to-keychain>
> <path-to-disk-image>
> 
> I believe the machine we are using is on 10.11.

It's 10.12, but should not change a lot of things regarding dmg signing.

> I can create another bug if needs for the signing part.

Yes, please. It will be easier to track this work in a new, more focused, bug.
Comment 22 Sravan Kumar Lakkimsetti CLA 2017-02-21 06:25:14 EST
I raised bug 512489 to track signing changes.

I can confirm the eclipse-dmg-packager is working as expected. So resolving this bug

I tested this using 1.1.4-SNAPSHOT version