[jira] Commented: (MACR-3) Maven site should has an example with adding Main Class
[ https://jira.codehaus.org/browse/MACR-3?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=282613#comment-282613 ] Dennis Lundberg commented on MACR-3: If you follow the link at the bottom of the page you will find examples of how to configure the manifest. > Maven site should has an example with adding Main Class > --- > > Key: MACR-3 > URL: https://jira.codehaus.org/browse/MACR-3 > Project: Maven ACR Plugin > Issue Type: Improvement >Affects Versions: 1.0 >Reporter: Gustavo Orair > > Maven ACR plugin should confirm if the resulting Manifest contain a setting > for Main-Class, because The Java EE spec requires that app clients specify > the main class > (http://www.java.net/forum/topic/glassfish/glassfish/problems-using-java-web-start-application-client-libraries-not-found). > If Manifest does not contain Main-Class a warning should be emitted. > Also, It would be very valuable if some examples specifying Main-Class are > added to the site http://maven.apache.org/plugins/maven-acr-plugin/. > In actual configuration, users tend to create application clients without > Main-Class and may get strange errors while trying to launch the application > client. One example of these errors, may be accessed in: > http://www.java.net/forum/topic/glassfish/glassfish/problems-using-java-web-start-application-client-libraries-not-found -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (MACR-3) Maven site should has an example with adding Main Class
[ https://jira.codehaus.org/browse/MACR-3?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=282621#comment-282621 ] Gustavo Orair commented on MACR-3: -- I already followed this link, but this link does not show a specific manifest to application clients. I think the fact that Java EE spec requires that app clients specify the main class should should be considered and at least a simple specific manifest for an application client example that specifies Main-Class should be provided. Also, the doc may instruct users to specify manifest and Main-Class stating it is required by Java EE spec. This doc would improve user experience reducing risks of problems. > Maven site should has an example with adding Main Class > --- > > Key: MACR-3 > URL: https://jira.codehaus.org/browse/MACR-3 > Project: Maven ACR Plugin > Issue Type: Improvement >Affects Versions: 1.0 >Reporter: Gustavo Orair > > Maven ACR plugin should confirm if the resulting Manifest contain a setting > for Main-Class, because The Java EE spec requires that app clients specify > the main class > (http://www.java.net/forum/topic/glassfish/glassfish/problems-using-java-web-start-application-client-libraries-not-found). > If Manifest does not contain Main-Class a warning should be emitted. > Also, It would be very valuable if some examples specifying Main-Class are > added to the site http://maven.apache.org/plugins/maven-acr-plugin/. > In actual configuration, users tend to create application clients without > Main-Class and may get strange errors while trying to launch the application > client. One example of these errors, may be accessed in: > http://www.java.net/forum/topic/glassfish/glassfish/problems-using-java-web-start-application-client-libraries-not-found -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (MACR-3) Maven site should has an example with adding Main Class
[ https://jira.codehaus.org/browse/MACR-3?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=282637#comment-282637 ] Dennis Lundberg commented on MACR-3: After following the link there is a menu option called "Set Up The Classpath" which takes you to http://maven.apache.org/shared/maven-archiver/examples/classpath.html On that page there is a section called "Make The Jar Executable" which explains how to specify a Main-Class. These docs (at http://maven.apache.org/shared/maven-archiver/) are shared by all archiving plugins, and includes functionality that is common for all of them. If there is more specific documentation that applies only to a specific plugin, then it should be located in that plugin. I.e. the suggestion to instruct user to add manifest and Main-Class because the JEE spec requires it, should be in on the ACR Plugin site. > Maven site should has an example with adding Main Class > --- > > Key: MACR-3 > URL: https://jira.codehaus.org/browse/MACR-3 > Project: Maven ACR Plugin > Issue Type: Improvement >Affects Versions: 1.0 >Reporter: Gustavo Orair > > Maven ACR plugin should confirm if the resulting Manifest contain a setting > for Main-Class, because The Java EE spec requires that app clients specify > the main class > (http://www.java.net/forum/topic/glassfish/glassfish/problems-using-java-web-start-application-client-libraries-not-found). > If Manifest does not contain Main-Class a warning should be emitted. > Also, It would be very valuable if some examples specifying Main-Class are > added to the site http://maven.apache.org/plugins/maven-acr-plugin/. > In actual configuration, users tend to create application clients without > Main-Class and may get strange errors while trying to launch the application > client. One example of these errors, may be accessed in: > http://www.java.net/forum/topic/glassfish/glassfish/problems-using-java-web-start-application-client-libraries-not-found -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (MACR-3) Maven site should has an example with adding Main Class
[ https://jira.codehaus.org/browse/MACR-3?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=282638#comment-282638 ] Gustavo Orair commented on MACR-3: -- When I said Maven site should have an example I really means ACR Plugin site (the ticket was created to Maven ACR Plugin project. > Maven site should has an example with adding Main Class > --- > > Key: MACR-3 > URL: https://jira.codehaus.org/browse/MACR-3 > Project: Maven ACR Plugin > Issue Type: Improvement >Affects Versions: 1.0 >Reporter: Gustavo Orair > > Maven ACR plugin should confirm if the resulting Manifest contain a setting > for Main-Class, because The Java EE spec requires that app clients specify > the main class > (http://www.java.net/forum/topic/glassfish/glassfish/problems-using-java-web-start-application-client-libraries-not-found). > If Manifest does not contain Main-Class a warning should be emitted. > Also, It would be very valuable if some examples specifying Main-Class are > added to the site http://maven.apache.org/plugins/maven-acr-plugin/. > In actual configuration, users tend to create application clients without > Main-Class and may get strange errors while trying to launch the application > client. One example of these errors, may be accessed in: > http://www.java.net/forum/topic/glassfish/glassfish/problems-using-java-web-start-application-client-libraries-not-found -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (MACR-3) Maven site should has an example with adding Main Class
[ https://jira.codehaus.org/browse/MACR-3?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=282661#comment-282661 ] Dennis Lundberg commented on MACR-3: Yes, I understood that is what you wanted. I am just pointing out that some of it is already documented elsewhere. So those bits will not be documented on the plugin site. If you write up the missing pieces I can add them to the plugin site. > Maven site should has an example with adding Main Class > --- > > Key: MACR-3 > URL: https://jira.codehaus.org/browse/MACR-3 > Project: Maven ACR Plugin > Issue Type: Improvement >Affects Versions: 1.0 >Reporter: Gustavo Orair > > Maven ACR plugin should confirm if the resulting Manifest contain a setting > for Main-Class, because The Java EE spec requires that app clients specify > the main class > (http://www.java.net/forum/topic/glassfish/glassfish/problems-using-java-web-start-application-client-libraries-not-found). > If Manifest does not contain Main-Class a warning should be emitted. > Also, It would be very valuable if some examples specifying Main-Class are > added to the site http://maven.apache.org/plugins/maven-acr-plugin/. > In actual configuration, users tend to create application clients without > Main-Class and may get strange errors while trying to launch the application > client. One example of these errors, may be accessed in: > http://www.java.net/forum/topic/glassfish/glassfish/problems-using-java-web-start-application-client-libraries-not-found -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (MACR-3) Maven site should has an example with adding Main Class
[ https://jira.codehaus.org/browse/MACR-3?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=282737#comment-282737 ] Gustavo Orair commented on MACR-3: -- Lundberg, As you recommended, I am sending missing pieces to be added in plugin site. I would change inside the Usage Page (http://maven.apache.org/plugins/maven-acr-plugin/usage.html): I would add before "If the packaging type defined in the pom.xml is app-client, the package lifecycle phase can be used" the sentence: "Define the package type to be app-client." Before: "Pay attention that prior to Maven 3.0.4, the plugin's extension must be enabled since the app-client packaging type is new." I would add "Pay attention that JEE spec requires to add a manifest and a Main-Class. So, your application client need this to be JEE compliant." See "How can I specify a Main-Class: entry in the manifest of an Application Client jar?" inside FAQ for more details. Note: Some application servers may execute an application client without a Main-Class if you specify the Main-Class while running, however specify Main-Class while running would not be possible for some technologies such as Java Web Start Technology. Inside FAQ Page (http://maven.apache.org/plugins/maven-acr-plugin/faq.html): Add as the FIRST question: 1 - How can I specify a Main-Class: entry in the manifest of an Application Client jar? JEE spec and also some launching technologies such as Java Web Start Technology require to add a manifest and a Main-Class in application clients. This requirement is done because the launching technology need to know which method to execute. So, you need to configure Maven Archiver accordingly inside the acr-plugin configuration of your pom.xml app-client project. Here is a sample pom.xml configured to use the class fully.qualified.MainClass as the main class: ... org.apache.maven.plugins maven-acr-plugin ... fully.qualified.MainClass ... ... This configuration is really similar to making the jar executable for jar Maven projects. See "Make the jar executable" in Maven Archiver Examples Page for more details (http://maven.apache.org/shared/maven-archiver/examples/classpath.html#aMake). Optionally you can configure Archiver to use your own manifest file with an already define Main-Class. Details can be found here http://maven.apache.org/shared/maven-archiver/examples/manifestFile.html. Obviously, a good improvement should be make maven acr plugin warns the user if do not find a Main Class configuration neither a src/main/resources/META-INF/MANIFEST.MF. In the case user added a manifestFile option and plugin couldn't check if this manifestFile has a Main-Class, the plugin could at least info the user to add a MainClass inside you own Manifest-File. Best regards, > Maven site should has an example with adding Main Class > --- > > Key: MACR-3 > URL: https://jira.codehaus.org/browse/MACR-3 > Project: Maven ACR Plugin > Issue Type: Improvement >Affects Versions: 1.0 >Reporter: Gustavo Orair > > Maven ACR plugin should confirm if the resulting Manifest contain a setting > for Main-Class, because The Java EE spec requires that app clients specify > the main class > (http://www.java.net/forum/topic/glassfish/glassfish/problems-using-java-web-start-application-client-libraries-not-found). > If Manifest does not contain Main-Class a warning should be emitted. > Also, It would be very valuable if some examples specifying Main-Class are > added to the site http://maven.apache.org/plugins/maven-acr-plugin/. > In actual configuration, users tend to create application clients without > Main-Class and may get strange errors while trying to launch the application > client. One example of these errors, may be accessed in: > http://www.java.net/forum/topic/glassfish/glassfish/problems-using-java-web-start-application-client-libraries-not-found -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (MACR-3) Maven site should has an example with adding Main Class
[ https://jira.codehaus.org/browse/MACR-3?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=282944#comment-282944 ] Gustavo Orair commented on MACR-3: -- Lundberg, notice that the apparently some documentation looks like deplicated. However, it is necessary because the section "Make The Jar Executable" called which explains how to specify a Main-Class is targeted just to jar package type. Since, the appclient jar type was created, we need instruct how to specify the Main-Class also to appclient type. Maybe, the archiver doc may include a section for appclient modules. > Maven site should has an example with adding Main Class > --- > > Key: MACR-3 > URL: https://jira.codehaus.org/browse/MACR-3 > Project: Maven ACR Plugin > Issue Type: Improvement >Affects Versions: 1.0 >Reporter: Gustavo Orair > > Maven ACR plugin should confirm if the resulting Manifest contain a setting > for Main-Class, because The Java EE spec requires that app clients specify > the main class > (http://www.java.net/forum/topic/glassfish/glassfish/problems-using-java-web-start-application-client-libraries-not-found). > If Manifest does not contain Main-Class a warning should be emitted. > Also, It would be very valuable if some examples specifying Main-Class are > added to the site http://maven.apache.org/plugins/maven-acr-plugin/. > In actual configuration, users tend to create application clients without > Main-Class and may get strange errors while trying to launch the application > client. One example of these errors, may be accessed in: > http://www.java.net/forum/topic/glassfish/glassfish/problems-using-java-web-start-application-client-libraries-not-found -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira