chore: prep the repo for automated release - #599
Conversation
|
So as far as I can still, this is still going to require manually going into Sonatype to promote the deployment from Staging to Release to get it to Maven Central. I haven't quite figured out why the twilio-java repo doesn't have this manual step, even though we also upload to Sonatype. I'd like some feedback on whether we should try to pivot off of Gradle and set up the repo to be more in line with twilio-java before I propagate similar changes to the other SG java repos. |
|
I'm in favor of pivoting from gradle to mvn. However, I have not been able to get it to function properly. Here are the steps I took:
import com.sendgrid.*;
import java.io.IOException;
public class Example {
public static void main(String[] args) throws IOException {
Email from = new Email("dx@sendgrid.com");
String subject = "Hello World from the Twilio SendGrid Java Library!";
Email to = new Email("ethomas@twilio.com");
Content content = new Content("text/html", "<bold>Test Invalid Emails");
Mail mail = new Mail(from, subject, to, content);
SendGrid sg = new SendGrid(System.getenv("SENDGRID_API_KEY"));
Request request = new Request();
try {
request.setMethod(Method.POST);
request.setEndpoint("mail/send");
request.setBody(mail.build());
System.out.println(mail.build());
Response response = sg.api(request);
System.out.println(response.getStatusCode());
System.out.println(response.getBody());
System.out.println(response.getHeaders());
} catch (IOException ex) {
throw ex;
}
}
}
Example.java
./Example.java:6: error: cannot find symbol
Email from = new Email("dx@sendgrid.com");
^
symbol: class Email
location: class Example
./Example.java:6: error: cannot find symbol
Email from = new Email("dx@sendgrid.com");
^
symbol: class Email
location: class Example
./Example.java:8: error: cannot find symbol
Email to = new Email("ethomas@twilio.com");
^
symbol: class Email
location: class Example
./Example.java:8: error: cannot find symbol
Email to = new Email("ethomas@twilio.com");
^
symbol: class Email
location: class Example
./Example.java:9: error: cannot find symbol
Content content = new Content("text/html", "<bold>Test Invalid Emails");
^
symbol: class Content
location: class Example
./Example.java:9: error: cannot find symbol
Content content = new Content("text/html", "<bold>Test Invalid Emails");
^
symbol: class Content
location: class Example
./Example.java:10: error: cannot find symbol
Mail mail = new Mail(from, subject, to, content);
^
symbol: class Mail
location: class Example
./Example.java:10: error: cannot find symbol
Mail mail = new Mail(from, subject, to, content);
^
symbol: class Mail
location: class Example
8 errorsNote that if I download the .jar from here: https://github.com/sendgrid/sendgrid-java/releases/download/v4.4.1/sendgrid-java.jar and run Also, if I run META-INF/MANIFEST.MF
META-INF/
com/
com/sendgrid/
com/sendgrid/helpers/
com/sendgrid/helpers/mail/
com/sendgrid/helpers/mail/objects/
META-INF/maven/com.sendgrid/
META-INF/maven/com.sendgrid/sendgrid-java/
com/sendgrid/Client$1.class
com/sendgrid/Client.class
com/sendgrid/HttpDeleteWithBody.class
com/sendgrid/Method.class
com/sendgrid/Request.class
com/sendgrid/Response.class
com/sendgrid/SendGridResponseHandler.class
com/sendgrid/SendGridAPI.class
com/sendgrid/SendGrid$1.class
com/sendgrid/APICallback.class
com/sendgrid/SendGrid$2.class
com/sendgrid/SendGrid.class
com/sendgrid/helpers/mail/objects/SpamCheckSetting.class
com/sendgrid/helpers/mail/objects/Attachments$Builder.class
com/sendgrid/helpers/mail/objects/OpenTrackingSetting.class
com/sendgrid/helpers/mail/objects/Setting.class
com/sendgrid/helpers/mail/objects/GoogleAnalyticsSetting.class
com/sendgrid/helpers/mail/objects/ASM.class
com/sendgrid/helpers/mail/objects/FooterSetting.class
com/sendgrid/helpers/mail/objects/Personalization.class
com/sendgrid/helpers/mail/objects/Email.class
com/sendgrid/helpers/mail/objects/MailSettings.class
com/sendgrid/helpers/mail/objects/BccSettings.class
com/sendgrid/helpers/mail/objects/Content.class
com/sendgrid/helpers/mail/objects/TrackingSettings.class
com/sendgrid/helpers/mail/objects/ClickTrackingSetting.class
com/sendgrid/helpers/mail/objects/Attachments.class
com/sendgrid/helpers/mail/objects/ContentVerifier.class
com/sendgrid/helpers/mail/objects/SubscriptionTrackingSetting.class
com/sendgrid/helpers/mail/Mail.class
com/sendgrid/RateLimitException.class
META-INF/maven/com.sendgrid/sendgrid-java/pom.xml
META-INF/maven/com.sendgrid/sendgrid-java/pom.propertiesRunning the above command on the downloaded jar, reveals: META-INF/
META-INF/MANIFEST.MF
com/sendgrid/
com/sendgrid/SendGridAPI.class
com/sendgrid/SpamCheckSetting.class
com/sendgrid/Attachments$Builder.class
com/sendgrid/OpenTrackingSetting.class
com/sendgrid/SendGridResponseHandler.class
com/sendgrid/Setting.class
com/sendgrid/GoogleAnalyticsSetting.class
com/sendgrid/ASM.class
com/sendgrid/FooterSetting.class
com/sendgrid/Personalization.class
com/sendgrid/Client$1.class
com/sendgrid/Method.class
com/sendgrid/Response.class
com/sendgrid/Email.class
com/sendgrid/Client.class
com/sendgrid/SendGrid$1.class
com/sendgrid/MailSettings.class
com/sendgrid/BccSettings.class
com/sendgrid/Request.class
com/sendgrid/Content.class
com/sendgrid/APICallback.class
com/sendgrid/TrackingSettings.class
com/sendgrid/Mail.class
com/sendgrid/SendGrid$2.class
com/sendgrid/ClickTrackingSetting.class
com/sendgrid/SendGrid.class
com/sendgrid/Attachments.class
com/sendgrid/ContentVerifier.class
com/sendgrid/SubscriptionTrackingSetting.class
com/sendgrid/HttpDeleteWithBody.class
com/sendgrid/RateLimitException.class
com/sendgrid/helpers/
com/sendgrid/helpers/mail/
com/sendgrid/helpers/mail/Mail.class
com/sendgrid/helpers/mail/objects/
com/sendgrid/helpers/mail/objects/SpamCheckSetting.class
com/sendgrid/helpers/mail/objects/Attachments$Builder.class
com/sendgrid/helpers/mail/objects/OpenTrackingSetting.class
com/sendgrid/helpers/mail/objects/Setting.class
com/sendgrid/helpers/mail/objects/GoogleAnalyticsSetting.class
com/sendgrid/helpers/mail/objects/ASM.class
com/sendgrid/helpers/mail/objects/FooterSetting.class
com/sendgrid/helpers/mail/objects/Personalization.class
com/sendgrid/helpers/mail/objects/Email.class
com/sendgrid/helpers/mail/objects/MailSettings.class
com/sendgrid/helpers/mail/objects/BccSettings.class
com/sendgrid/helpers/mail/objects/Content.class
com/sendgrid/helpers/mail/objects/TrackingSettings.class
com/sendgrid/helpers/mail/objects/ClickTrackingSetting.class
com/sendgrid/helpers/mail/objects/Attachments.class
com/sendgrid/helpers/mail/objects/ContentVerifier.class
com/sendgrid/helpers/mail/objects/SubscriptionTrackingSetting.classI'm currently investigating the differences between the |
|
If I add these two imports, it works: import com.sendgrid.helpers.mail.objects.*;
import com.sendgrid.helpers.mail.*; |
thinkingserious
left a comment
There was a problem hiding this comment.
Sam wrote some code to upload the packaged file to the release on GitHub for PHP. I believe we want to do the same with the generated jar so that it shows up here: https://github.com/sendgrid/sendgrid-java/releases/tag/v4.4.1
|
Hello @eshanholtz, |
No description provided.