-
Notifications
You must be signed in to change notification settings - Fork 409
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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("[email protected]");
String subject = "Hello World from the Twilio SendGrid Java Library!";
Email to = new Email("[email protected]");
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("[email protected]");
^
symbol: class Email
location: class Example
./Example.java:6: error: cannot find symbol
Email from = new Email("[email protected]");
^
symbol: class Email
location: class Example
./Example.java:8: error: cannot find symbol
Email to = new Email("[email protected]");
^
symbol: class Email
location: class Example
./Example.java:8: error: cannot find symbol
Email to = new Email("[email protected]");
^
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 errors Note 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.properties Running 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.class I'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.*; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
test
Hello @eshanholtz, |
No description provided.