Khan,

I apologize - I meant to send this to the mailing list. You will probably get two copies.

This is mostly a Maven question. Two things:

<maven.compiler.release>11</maven.compiler.release>

The release should be major versions only.

Second, you'll have to actually configure the compiler plugin in order to use the above value. A minimum plugin configuration is:

    <build>
        <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>3.12.1</version>
                    <configuration>
                        <release>${maven.compiler.release}</release>
                    </configuration>
                </plugin>
        </plugins>
    </build>

In general, it's a good idea to declare all plugins that are used in the build. That way, when the implied parent changes, your build will still be reproducible. Run mvn -X package to get a start on that. Look at the enforcer plugin to enforce a minimum version of Maven.

That should get you started. Read more about how to use Maven at maven.apache.org.

. . . just my two cents
/mde/
On 2/26/2024 7:39 PM, Zulfi Khan wrote:
Dear NetBeans Mailing List user,I am getting a invalidating email. I am using 
an Apache email validation class. I have attached the tar file of my project.
Following is the error

Failed to execute goal 
org.apache.maven.plugins:maven-compiler-plugin:3.11.0:compile (default-compile) on 
project ValidateName3: Fatal error compiling: error: release version 11.0.19 not 
supported -> [Help 1]
To see the full stack trace of the errors, re-run Maven with the -e switch.
Re-run Maven using the -X switch to enable full debug logging.

For more information about the errors and possible solutions, please read the 
following articles:
[Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException


Email Validation in Java | Baeldung

|
|
|
|  |  |

  |

  |
|
|  |
Email Validation in Java | Baeldung

Learn how to validate email addresses in Java using regular expressions.
  |

  |

  |






package com.mycompany.validatename;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.apache.commons.validator.*;
import org.apache.commons.validator.routines.InetAddressValidator;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import javax.swing.JOptionPane;
import javax.swing.UnsupportedLookAndFeelException;
public class ValidateNameForm extends javax.swing.JFrame {

     /**
      * Creates new form ValidateNameForm
      */
     public ValidateNameForm() {
     :
     :
}

  private void jTF1ActionPerformed(java.awt.event.ActionEvent evt) {
         // TODO add your handling code here:
     }
     private void CheckIfInputValid(String input, String regex){
         String s;
         //for(int i=0; i<4; ++i) {
            Pattern pattern = Pattern.compile(regex);

            s = input.trim();

            Matcher matcher = pattern.matcher(s);

            JOptionPane.showMessageDialog(null, "Input "+s+" is valid " + 
String.valueOf(matcher.matches()));
         //}
    }
     private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
         // TODO add your handling code here:
         String emailAddress= jTF1.getText();
         //String strInput[]  = new String[5];
         //strInput[0]= strAccName;
         //String regex = "^[a-zA-Z]*$";
         //String emailRegex = regexArr[2] = 
"[_a-zA-Z0-9-]+(\\.[_a-zA-Z0-9-]+)*@[a-zA-Z0-9-]+(\\.[a-zA-Z0-9-]+)*(\\.[a-zA-Z]{1,6}))?";
         boolean isValidEmail = 
EmailValidator.getInstance().isValid(emailAddress);
         //CheckIfInputValid(strInput[0], emailRegex);
     }

     /**
      * @param args the command line arguments
      */
     public static void main(String args[]) {
     }
     // Variables declaration - do not modify
     private javax.swing.JButton jButton1;
     private javax.swing.JLabel jLabel1;
     private javax.swing.JTextField jTF1;
     // End of variables declaration

  //private void initComponents() {
      //   throw new UnsupportedOperationException( "Not supported yet." ); // 
Generated from nbfs://nbhost/SystemFileSystem/Templates/Classes/Code/GeneratedMethodBody
    // }
}
Somebody please guide me.
Zulfi.



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@netbeans.apache.org
For additional commands, e-mail: users-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@netbeans.apache.org
For additional commands, e-mail: users-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to