Maven - studiofu/brain GitHub Wiki
The instructions below are quick-start guides to building sources with Maven. You may refer to the following for details on the Maven command:
https://maven.apache.org/guides/getting-started/maven-in-five-minutes.html
https://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html
- need to know spring mvc
- need to know how to apply the connection pool
- need to know how to use maven in the eclipse
- setup in command prompt
- add mssql jar to the self repo
- need to know how to setup JNDI resources in the servers
- Prepare Eclipse for Maven
- Install springsource-tool-suite to Eclipse, or
- Download the all-in-one internal installation or get it from another colleague.
- (Optional but recommended) Install Maven to your machine.
https://repo.maven.apache.org/maven2
Includes artifacts not available in the Central Maven Repository:
CrystalReports Java runtime libraries
https://archive.sap.com/documents/docs/DOC-29757
Oracle JDBC driver
http://www.oracle.com/technetwork/apps-tech/jdbc-112010-090769.html
MS SQL Server JDBC driver (Type 4)
Download site for v4.2: https://www.microsoft.com/en-us/download/details.aspx?id=54671
JT400 - IBM Toolbox for Java, which includes the JDBC driver to access CAPSIL data
https://www-03.ibm.com/systems/power/software/i/toolbox/
mvn clean package
Skip Test
-Dmaven.test.skip=true
download the cert ⇒:gn16:jssecacerts.zip
then extract and put the file to the $JAVA_HOME/jre/lib/security/ (NOTE: must use JDK and not JRE)
it could resolve the connection and ssl problem between the central repo and local development machine which is behind websense (https://repo.maven.apache.org/maven2)
the cert is generated by the java program ⇒ :gn16:installcert.zip
https://github.com/escline/InstallCert/blob/master/InstallCert.java
/cygdrive/c/temp $ java InstallCert
Usage: java InstallCert <host>[:port] [passphrase]
https://superuser.com/questions/33588/how-to-view-internet-explorer-auto-detected-proxy-settings
download the ssl cert from https://repo.maven.apache.org/maven2/
add to the eclipse ssl cert (preference → search ssl)
https://stackoverflow.com/questions/19537396/missing-artifact-com-microsoft-sqlserversqljdbc4jar4-0
add sqljdbc42 to the self repo if the connection to mssql database is required
mvn install:install-file -Dfile=sqljdbc42.jar -DgroupId=com.microsoft.sqlserver -DartifactId=sqljdbc4 -Dversion=4.2 -Dpackaging=jar
Maven Related Issue, i.e. cannot compile, error and etc... need to clean maven or remove local .m2
https://stackoverflow.com/questions/19871437/the-import-org-springframework-cannot-be-resolved
"Missing artifact" error for dependency JARs that do exist
https://stackoverflow.com/questions/6111408/maven2-missing-artifact-but-jars-are-in-place
need to apply and use the maven jetty plugin
<!-- jetty-maven-plugin -->
<plugin>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>${jetty-maven-plugin.version}</version>
<configuration>
<scanIntervalSeconds>5</scanIntervalSeconds>
<httpConnector>
<port>9090</port>
</httpConnector>
<webApp>
<contextPath>/codenotfound</contextPath>
</webApp>
</configuration>
</plugin>
download and using jetty-runner
<!-- jetty-runner -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.3</version>
<executions>
<execution>
<phase>package</phase>
<goals><goal>copy</goal></goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-runner</artifactId>
<version>9.3.3.v20150827</version>
<destFileName>jetty-runner.jar</destFileName>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>
java -jar target/dependency/jetty-runner.jar target/*.war
apache-jetty connection
https://wiki.eclipse.org/Jetty/Tutorial/Apache#Configuring_mod_proxy_http
Web Development Tutorial
http://www.programcreek.com/2014/02/spring-mvc-helloworld-using-maven-in-eclipse/
https://crunchify.com/how-to-create-dynamic-web-project-using-maven-in-eclipse/
http://www.javahotchocolate.com/tutorials/maven.html
https://www.mkyong.com/maven/how-to-create-a-web-application-project-with-maven/
http://www.javawebtutor.com/articles/maven/maven_index.php
http://viralpatel.net/blogs/spring-4-mvc-tutorial-maven-example/
https://stackoverflow.com/questions/18745770/spring-injection-into-servlet
apply spring bean to servlet
https://stackoverflow.com/questions/14570477/how-to-read-properties-file-in-spring-project
extract properties file and inject to the spring bean
spring properties and database connection
http://www.technicalkeeda.com/spring-tutorials/spring-4-jdbctemplate-annotation-example
spring 4 annotation example
https://stackoverflow.com/questions/10604298/spring-component-versus-bean
spring components vs bean
https://stackoverflow.com/questions/41292167/connection-pool-for-tomcat-in-eclipse-for-ms-sql-server
https://examples.javacodegeeks.com/core-java/apache/commons/dbcp/dbcp-connection-pooling-example/
https://www.mkyong.com/spring/maven-spring-jdbc-example/
http://www.codejava.net/frameworks/spring/spring-mvc-with-jdbctemplate-example
https://stackoverflow.com/questions/7152829/classpathxmlapplicationcontext-cannot-find-the-xml-file
spring bean xml and connection properties files location
從零開始通過 Artifactory 搭建公網的 maven 倉庫
https://www.itread01.com/articles/1498723209.html
How to setup new local artifactory for maven?
https://stackoverflow.com/questions/14657957/how-to-setup-new-local-artifactory-for-maven
如何在不允许联网的环境下使用Maven开发