How do I set the port using maven? - maven

I'm using Maven from the command line on Windows, but I don't need to necessarily change the port from the command line specifically.
Running the command
mvn -Djetty.http.port=8000 exec:java
results in the following output:
[INFO] Scanning for projects...
[WARNING] The project com.google.apis-samples:oauth2-cmdline-sample:jar:1
uses prerequisites which is only intended for maven-plugin projects but not
for non maven-plugin projects. For such purposes you should use the maven-
enforcer-plugin. See https://maven.apache.org/enforcer/enforcer-
rules/requireMavenVersion.html
[INFO]
[INFO] ---------------------------------------------------------------------
---
[INFO] Building Example for the OAuth2 API using JSON and OAuth 2.0 1
[INFO] --------------------------------------------------------------------
----
[INFO]
[INFO] >>> exec-maven-plugin:1.1:java (default-cli) > validate # oauth2-
cmdline-sample >>>
[INFO]
[INFO] <<< exec-maven-plugin:1.1:java (default-cli) < validate # oauth2-
cmdline-sample <<<
[INFO]
[INFO]
[INFO] --- exec-maven-plugin:1.1:java (default-cli) # oauth2-cmdline-sample
---
Jun 19, 2017 5:09:53 PM
com.google.api.client.util.store.FileDataStoreFactory
setPermissionsToOwnerOnly
WARNING: unable to change permissions for everybody:
C:\Users\roxlala\.store\oauth2_sample
Jun 19, 2017 5:09:53 PM
com.google.api.client.util.store.FileDataStoreFactory
setPermissionsToOwnerOnly
WARNING: unable to change permissions for owner:
C:\Users\roxlala\.store\oauth2_sample
2017-06-19 17:09:53.229:INFO::Logging to STDERR via
org.mortbay.log.StdErrLog
2017-06-19 17:09:53.229:INFO::jetty-6.1.26
2017-06-19 17:09:53.259:INFO::Started SocketConnector#localhost:1871
Please open the following address in your browser:
https://accounts.google.com/o/oauth2/auth?client_id=<my-id>.
googleusercontent.com&redirect_uri=http:
//localhost:1871/Callback&response_type=code&scope=https://www.googleapis.
com/auth
/userinfo.profile%20https://www.googleapis.com/auth/userinfo.email
Attempting to open that address in the default browser now...

Related

Jenkins job produces a successful build without completing the pipeline [duplicate]

I configure my job as freestyle. And I need to run cases to a specified machine. MY project is maven project. I want to copy reports to master node after cases finish to run.
Jenkins ver. 1.483
I use pscp to copy files which works fine by hand in windows command prompt.
My command looks like:
mvn clean install -U
pscp -P 22 -i pgrsa.ppk -r %SLAVE_JENKINS_HOME%\workspace\%JOB_NAME%\target\surefire-reports ci#master:%JENKINS_HOME%/workspace/%JOB_NAME%
The pscp seems not work. When I use command like this:
echo EchoCommand is working.===
mvn clean install -U
echo EchoCommand is working again.===
EchoCommand is working again.===Not show at the output of the console while EchoCommand is working.=== has been shown. Why? Anyone knows that?
EDIT
C:\Tools\Jenkins\workspace\myproject-testng-sample-windows>echo EchoCommand is working.===
EchoCommand is working.===
C:\Tools\Jenkins\workspace\myproject-testng-sample-windows>mvn clean install -U
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for com.pak.automation:myproject-testng-sample:jar:1.0.0-SNPASHOT
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-deploy-plugin is missing. # com.pak:pak-parent:2.0.0, C:\Users\pak\.m2\repository\com\pak\pak-parent\2.0.0\pak-parent-2.0.0.pom, line 484, column 12
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-source-plugin is missing. # com.pak:pak-parent:2.0.0, C:\Users\pak\.m2\repository\com\pak\pak-parent\2.0.0\pak-parent-2.0.0.pom, line 472, column 12
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[INFO]
[INFO] Using the builder org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder with a thread count of 1
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building myproject-testng-sample 1.0.0-SNPASHOT
[INFO] ------------------------------------------------------------------------
Downloading: http://mvn.pak.com/pakrepo/org/apache/maven/plugins/maven-source-plugin/maven-metadata.xml
Downloading: http://mvn.pak.com/pak-releases/org/apache/maven/plugins/maven-source-plugin/maven-metadata.xml
Downloading: http://mvn.pak.com/pak-snapshots/org/apache/maven/plugins/maven-source-plugin/maven-metadata.xml
Downloading: http://mvn.pak.com/third-party/org/apache/maven/plugins/maven-source-plugin/maven-metadata.xml
377/377 B
377/377 B 377/377 B
Downloaded: http://mvn.pak.com/third-party/org/apache/maven/plugins/maven-source-plugin/maven-metadata.xml (377 B at 1.5 KB/sec)
Downloaded: http://mvn.pak.com/pakrepo/org/apache/maven/plugins/maven-source-plugin/maven-metadata.xml (377 B at 1.4 KB/sec)
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) # myproject-testng-sample ---
[INFO] Deleting C:\Tools\Jenkins\workspace\myproject-testng-sample-windows\target
[INFO]
[INFO] --- maven-resources-plugin:2.3:resources (default-resources) # myproject-testng-sample ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory C:\Tools\Jenkins\workspace\myproject-testng-sample-windows\src\main\resources
[INFO]
[INFO] --- maven-compiler-plugin:2.0.2:compile (default-compile) # myproject-testng-sample ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-resources-plugin:2.3:testResources (default-testResources) # myproject-testng-sample ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory C:\Tools\Jenkins\workspace\myproject-testng-sample-windows\src\test\resources
[INFO]
[INFO] --- maven-compiler-plugin:2.0.2:testCompile (default-testCompile) # myproject-testng-sample ---
[INFO] Compiling 4 source files to C:\Tools\Jenkins\workspace\myproject-testng-sample-windows\target\test-classes
[INFO]
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) # myproject-testng-sample ---
[INFO] Surefire report directory: C:\Tools\Jenkins\workspace\myproject-testng-sample-windows\target\surefire-reports
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running TestSuite
Configuring TestNG with: org.apache.maven.surefire.testng.conf.TestNG652Configurator#4d20a47e
testMethod1
testMethod2
testMethodmyproject2
testmyprojectSample
testMethod1
testMethod2
testMethodmyproject2
testmyprojectSample
we wont run test with class name: com.pak.myproject.sample.NoInjectionTest
we wont run test with class name: com.pak.myproject.sample.NoInjectionTest
I am test method 2
parameter in test method is: firstname
Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.895 sec
Results :
Tests run: 4, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) # myproject-testng-sample ---
[WARNING] JAR will be empty - no content was marked for inclusion!
[INFO] Building jar: C:\Tools\Jenkins\workspace\myproject-testng-sample-windows\target\myproject-testng-sample-1.0.0-SNPASHOT.jar
[INFO]
[INFO] >>> maven-source-plugin:2.1.1:jar (attach-sources) # myproject-testng-sample >>>
[INFO]
[INFO] <<< maven-source-plugin:2.1.1:jar (attach-sources) # myproject-testng-sample <<<
[INFO]
[INFO] --- maven-source-plugin:2.1.1:jar (attach-sources) # myproject-testng-sample ---
[INFO] No sources in project. Archive not created.
[INFO]
[INFO] --- maven-install-plugin:2.4:install (default-install) # myproject-testng-sample ---
[INFO] Installing C:\Tools\Jenkins\workspace\myproject-testng-sample-windows\target\myproject-testng-sample-1.0.0-SNPASHOT.jar to C:\Users\pak\.m2\repository\com\pak\automation\myproject-testng-sample\1.0.0-SNPASHOT\myproject-testng-sample-1.0.0-SNPASHOT.jar
[INFO] Installing C:\Tools\Jenkins\workspace\myproject-testng-sample-windows\pom.xml to C:\Users\pak\.m2\repository\com\pak\automation\myproject-testng-sample\1.0.0-SNPASHOT\myproject-testng-sample-1.0.0-SNPASHOT.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 7.649 s
[INFO] Finished at: 2014-04-08T13:19:58+08:00
[INFO] Final Memory: 10M/24M
[INFO] ------------------------------------------------------------------------
Recording test results
TestNG Reports Processing: START
mvn is a batch file. So It is need to call mvn .... Not just mvn ....
See call-batch-file-from-cygwin-breaks-after-1st-command
This could be due to an environment problem. You could, however, save yourself a lot of time and work by doing things a little bit different:
Make your job a Maven Project, makes configuration easier (and offers you nice features like test reports for single modules etc.). This might also make your report copying unneccessary.
Depending on what you want to do with these reports afterwards, you could simple use the Jenkins archiving mechanism to copy them over to your master.
if you REALLY need to copy them by hand, use the Publish Over SSH Jenkinsn plugin
Are you using Execute Shell in your free-style project, i.e. you are running on a *nix based environment? If so, your problem is detailed in my answer here:
Jenkins Build Script exits after Google Test execution
Jenkins launches Execute Shell as a temporary shell script with command /bin/sh -xe tempshell.sh. Note the -e part. This tells sh to exit when any single command in the script returns with non-zero value.
Your mvn clean install -U is probably returning with a non-zero value. You can check that by running it on command line, immediately followed by echo $?
Solution: To circumvent that, add set +e to the top of your Execute Shell script.
The problem may be that you are not giving enter after the last command.
Today I came across the same problem in our project, last command in jenkins is not executed.
After some trail and error methods, came to understand that.

How to use gradle-enterprise-maven-extension behind a proxy?

Willing to use the gradle-enterprise-maven-extension
to migrate a project from maven to gradle,
I cloned the maven-build-scan-quickstart provided by the gradle team.
But runing mvn install, as specified, after acceptation of gradle terms of service,
I receive the following message:
UnknownHostException: scans-in.gradle.com
I tried to configure the proxy in several manners:
Using commannd line option:
mvn install -Dhttps.proxyHost=localhost:8888 -Dhttps.proxyPort=localhost:8888
Using a gradle.properties file in a directory at %GRADLE_USER_HOME% directory location:
(proxy is also configured in maven's settings.xml and need no password it works fine when using maven in standard ways)
gradle.properties :
systemProp.http.proxyHost=localhost
systemProp.http.proxyPort=8888
systemProp.http.nonProxyHosts=*.nonproxyrepos.com|localhost|127.0.0.1
systemProp.https.proxyHost=localhost
systemProp.https.proxyPort=8888
systemProp.https.nonProxyHosts=*.nonproxyrepos.com|localhost|127.0.0.1
But I still receive the same message:
~/github/maven-build-scan-quickstart
$ mvn install
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.830 s
[INFO] Finished at: 2019-12-31T13:09:19+01:00
[INFO] ------------------------------------------------------------------------
[INFO] 7 goals, 7 executed
Publishing a build scan to scans.gradle.com requires accepting the Gradle Terms of Service defined at https://gradle.com/terms-of-service. Do you accept these terms? (yes/no): yes
[INFO] Gradle Terms of Service accepted.
[INFO]
[INFO] Publishing build scan...
[INFO]
[INFO] A network error occurred.
[INFO]
[INFO] The hostname 'scans-in.gradle.com' could not be resolved.
[INFO] You may be disconnected from the Internet.
[INFO]
[INFO] If you require assistance with this problem, please report it via https://gradle.com/help/plugin and include the following information via copy/paste.
[INFO]
[INFO] ----------
[INFO] Maven version: 3.6.2
[INFO] Extension version: 1.3.3
[INFO] Request URL: https://scans-in.gradle.com/in/maven/3.6.2/1.3.3
[INFO] Request ID: 1234567e-abcd-23de-c2d3-3fbbccd14a32
[INFO] Exception: java.net.UnknownHostException: scans-in.gradle.com
[INFO] ----------
[INFO]

Maven - Failed to execute goal org.apache.maven.plugins:maven-assembly-plugin:2.4:single (1-pre-dist) on project

I'm using wso2 emm 2.2.0 Beta, Please refer the below error console. when I run the maven install I got maven assembly plugin issue.
So please let me know why it occurs? and give some suggestion to fix this problem.
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building WSO2 Mobile Device Manager (MDM) - Distribution 2.2.0-BETA2
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- incremental-build-plugin:1.3:incremental-build (default) # wso2emm ---
[INFO] Verifying module descriptor ...
[INFO] Verifying parent modules...
[INFO] Verifying resources...
[INFO] Resources directory does not exist : /home/next/Praveen/Project/secureON/Project/Project_Setup/product-emm-2.2.0-BETA2/modules/distribution/src/main/resources
[INFO] Verifying sources...
[INFO] No sources to check ...
[INFO]
[INFO] --- buildnumber-maven-plugin:1.3:create (default) # wso2emm ---
[INFO] Storing buildNumber: 27 Oct 2016 at timestamp: 1477554746130
[WARNING] Cannot get the branch information from the git repository:
Detecting the current branch failed: fatal: Not a git repository (or any of the parent directories): .git
[INFO] Executing: /bin/sh -c cd /home/next/Praveen/Project/secureON/Project/Project_Setup/product-emm-2.2.0-BETA2/modules/distribution && git rev-parse --verify HEAD
[INFO] Working directory: /home/next/Praveen/Project/secureON/Project/Project_Setup/product-emm-2.2.0-BETA2/modules/distribution
[INFO] Storing buildScmBranch: UNKNOWN_BRANCH
[INFO]
[INFO] --- maven-remote-resources-plugin:1.5:process (default) # wso2emm ---
[INFO]
[INFO] --- maven-assembly-plugin:2.4:single (1-pre-dist) # wso2emm ---
[INFO] Reading assembly descriptor: /home/next/Praveen/Project/secureON/Project/Project_Setup/product-emm-2.2.0-BETA2/modules/distribution/src/assembly/dist.xml
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.203s
[INFO] Finished at: Thu Oct 27 13:22:26 IST 2016
[INFO] Final Memory: 13M/188M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-assembly-plugin:2.4:single (1-pre-dist) on project wso2emm: Failed to create assembly: Error creating assembly archive dist: You must set at least one file.
If you want to build WSO2 EMM 2.2.0 Beta follows the below steps.
Clone the product-emm repo
git clone https://github.com/wso2/product-emm.git
Checkout the v2.2.0-BETA tag.
git checkout v2.2.0-BETA
Build from root pom. Go to project root folder and issue
mvn clean install
If you want just product zip you can build the distribution module for that go to project root -> modules ->distribution folder and issue mvn clean install from there. you can find the build zip file in distribution/target folder.
It seems like you are in master branch. The failing maven goal for you added after the emm beta tag creation. The reason for failing is, in build time it tries to connect to some resources in internet and your computer failed to connect to that resources on internet. If you really want to build the master branch (2.2.0-SNAPSHOT), just check your internet connection or firewall blockings.

jdbc.OracleDriver error while building Jenkins job

I would be very thankful, if somebody could explain this to me. What the hell this Jenkins is trying to do in my situation.
Here is the piece of my log file:
I have created the simple job. Have linked to it my SVN repository, have set Maven Goals, same things as always. But this time he refused to work. The last 3 lines are repeating every minute. I have waited for an hour and then aborted the job.
In my MAVEN_OPTS I said to him where he can find JDBC Driver.
I have a couple of another jobs with the same configuration, and they are working pretty fine.
Is Jenkins trying to download the jdbc Driver for each testcase? Or am I wrong?
How can I fix this?
Thanks for the help.
P.S. here is the log file, at the end I have aborted job manually.
Started by user admin
Building in workspace /var/jenkins_home/jobs/SCM/jobs/DInvoice/jobs/InvoiceUserInterface/workspace
[WS-CLEANUP] Deleting project workspace...
Checking out a fresh workspace because there's no workspace at /var/jenkins_home/jobs/SCM/jobs/DInvoice/jobs/InvoiceUserInterface/workspace
Cleaning local Directory .
Checking out http://development.bonprix.net/svn/Java/app/Invoice/InvoiceUserInterface/trunk/InvoiceUserInterface at revision '2016-07-28T13:44:48.317 +0000'
A src
A src/test
A src/test/resources
A src/test/resources/testng-suite.xml
A src/test/resources/application-test.properties
A src/test/java
A src/test/java/de
A src/test/java/de/bonprix
A src/test/java/de/bonprix/dinvoice
A src/test/java/de/bonprix/dinvoice/modules
A src/test/java/de/bonprix/dinvoice/modules/invoice
A src/test/java/de/bonprix/dinvoice/modules/invoice/InvoicePresenterTest.java
A src/main
A src/main/java
A src/main/java/de
A src/main/java/de/bonprix
A src/main/java/de/bonprix/dinvoice
A src/main/java/de/bonprix/dinvoice/DInvoiceUI.java
A src/main/java/de/bonprix/dinvoice/model
AU src/main/java/de/bonprix/dinvoice/model/DiscountsClaims.java
AU src/main/java/de/bonprix/dinvoice/model/AuShipmentType.java
AU src/main/java/de/bonprix/dinvoice/model/GnCurrency.java
AU src/main/java/de/bonprix/dinvoice/model/IvType.java
AU src/main/java/de/bonprix/dinvoice/model/InvoicePosition.java
A src/main/java/de/bonprix/dinvoice/dao
AU src/main/java/de/bonprix/dinvoice/dao/InvoiceDao.java
A src/main/java/de/bonprix/dinvoice/modules
A src/main/java/de/bonprix/dinvoice/modules/invoice
A src/main/java/de/bonprix/dinvoice/modules/invoice/ui
A src/main/java/de/bonprix/dinvoice/modules/invoice/ui/InvoiceViewImpl.java
A src/main/java/de/bonprix/dinvoice/modules/invoice/InvoiceModule.java
A src/main/java/de/bonprix/dinvoice/modules/invoice/InvoicePresenter.java
A src/main/java/de/bonprix/dinvoice/modules/invoice/InvoiceView.java
A src/main/resources
A src/main/resources/de
A src/main/resources/de/bonprix
A src/main/resources/de/bonprix/dinvoice
A src/main/resources/de/bonprix/dinvoice/dao
AU src/main/resources/de/bonprix/dinvoice/dao/InvoiceDao.xml
A src/main/resources/de/bonprix/dinvoice/dinvoice.css
A src/main/resources/application.properties
A src/main/resources/i18n
A src/main/resources/i18n/dinvoice-messages.properties
A src/main/resources/i18n/dinvoice-messages_en.properties
A src/main/resources/i18n/dinvoice-messages_de.properties
A src/main/webapp
A pom.xml
At revision 21398
Parsing POMs
Established TCP socket on 38864
[workspace] $ /usr/lib/jvm/java-8-openjdk-amd64//bin/java -Djava.awt.headless=true -Doracle.driver.path=/opt/oracle/instantclient_11_2/ojdbc6.jar -cp /var/jenkins_home/plugins/maven-plugin/WEB-INF/lib/maven31-agent-1.7.jar:/opt/maven/maven-current/boot/plexus-classworlds-2.5.1.jar:/opt/maven/maven-current/conf/logging jenkins.maven3.agent.Maven31Main /opt/maven/maven-current /var/jenkins_home/war/WEB-INF/lib/remoting-2.60.jar /var/jenkins_home/plugins/maven-plugin/WEB-INF/lib/maven31-interceptor-1.7.jar /var/jenkins_home/plugins/maven-plugin/WEB-INF/lib/maven3-interceptor-commons-1.7.jar 38864
<===[JENKINS REMOTING CAPACITY]===>channel started
Executing Maven: -B -f /var/jenkins_home/jobs/SCM/jobs/DInvoice/jobs/InvoiceUserInterface/workspace/pom.xml -s /opt/maven/maven-current/conf/settings.xml -gs /opt/maven/maven-current/conf/settings.xml clean deploy
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for de.bonprix.invoice:InvoiceUserInterface:war:1.0.0-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for org.codehaus.mojo:cobertura-maven-plugin is missing. # de.bonprix.base.webbase:WebBase:4.4.26, /opt/maven/cache/de/bonprix/base/webbase/WebBase/4.4.26/WebBase-4.4.26.pom, line 624, column 12
[WARNING] 'build.plugins.plugin.version' for org.codehaus.mojo:properties-maven-plugin is missing. # de.bonprix.base.webbase:WebBase:4.4.26, /opt/maven/cache/de/bonprix/base/webbase/WebBase/4.4.26/WebBase-4.4.26.pom, line 637, column 12
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-surefire-plugin is missing. # de.bonprix.base.webbase:WebBase:4.4.26, /opt/maven/cache/de/bonprix/base/webbase/WebBase/4.4.26/WebBase-4.4.26.pom, line 628, column 12
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-clean-plugin is missing. # line 60, column 12
[WARNING] 'build.plugins.plugin.version' for org.codehaus.mojo:buildnumber-maven-plugin is missing. # line 68, column 12
[WARNING] 'build.plugins.plugin.version' for org.codehaus.mojo:build-helper-maven-plugin is missing. # de.bonprix.base.webbase:WebBase:4.4.26, /opt/maven/cache/de/bonprix/base/webbase/WebBase/4.4.26/WebBase-4.4.26.pom, line 612, column 12
[WARNING] 'dependencyManagement.dependencies.dependency.exclusions.exclusion.groupId' for org.springframework:spring-context-support:jar with value '*' does not match a valid id pattern. # de.bonprix.base.webbase:WebBase:4.4.26, /opt/maven/cache/de/bonprix/base/webbase/WebBase/4.4.26/WebBase-4.4.26.pom, line 221, column 16
[WARNING] 'dependencyManagement.dependencies.dependency.exclusions.exclusion.artifactId' for org.springframework:spring-context-support:jar with value '*' does not match a valid id pattern. # de.bonprix.base.webbase:WebBase:4.4.26, /opt/maven/cache/de/bonprix/base/webbase/WebBase/4.4.26/WebBase-4.4.26.pom, line 222, column 19
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[HUDSON] Collecting dependencies info
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building InvoiceUserInterface 1.0.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] Downloading: http://digistyle.bonprix.net/artifactory/plugins-snapshot/org/codehaus/mojo/build-helper-maven-plugin/maven-metadata.xml
[INFO] Downloading: http://digistyle.bonprix.net/artifactory/plugins-release/org/codehaus/mojo/build-helper-maven-plugin/maven-metadata.xml
[INFO] Downloaded: http://digistyle.bonprix.net/artifactory/plugins-release/org/codehaus/mojo/build-helper-maven-plugin/maven-metadata.xml (727 B at 3.7 KB/sec)
[INFO] Downloaded: http://digistyle.bonprix.net/artifactory/plugins-snapshot/org/codehaus/mojo/build-helper-maven-plugin/maven-metadata.xml (727 B at 3.7 KB/sec)
[INFO] Downloading: http://digistyle.bonprix.net/artifactory/plugins-release/org/codehaus/mojo/cobertura-maven-plugin/maven-metadata.xml
[INFO] Downloading: http://digistyle.bonprix.net/artifactory/plugins-snapshot/org/codehaus/mojo/cobertura-maven-plugin/maven-metadata.xml
[INFO] Downloaded: http://digistyle.bonprix.net/artifactory/plugins-snapshot/org/codehaus/mojo/cobertura-maven-plugin/maven-metadata.xml (605 B at 19.1 KB/sec)
[INFO] Downloaded: http://digistyle.bonprix.net/artifactory/plugins-release/org/codehaus/mojo/cobertura-maven-plugin/maven-metadata.xml (605 B at 17.9 KB/sec)
[INFO] Downloading: http://digistyle.bonprix.net/artifactory/plugins-release/org/codehaus/mojo/properties-maven-plugin/maven-metadata.xml
[INFO] Downloading: http://digistyle.bonprix.net/artifactory/plugins-snapshot/org/codehaus/mojo/properties-maven-plugin/maven-metadata.xml
[INFO] Downloaded: http://digistyle.bonprix.net/artifactory/plugins-snapshot/org/codehaus/mojo/properties-maven-plugin/maven-metadata.xml (421 B at 14.7 KB/sec)
[INFO] Downloaded: http://digistyle.bonprix.net/artifactory/plugins-release/org/codehaus/mojo/properties-maven-plugin/maven-metadata.xml (421 B at 13.3 KB/sec)
[INFO] Downloading: http://digistyle.bonprix.net/artifactory/plugins-snapshot/org/codehaus/mojo/buildnumber-maven-plugin/maven-metadata.xml
[INFO] Downloading: http://digistyle.bonprix.net/artifactory/plugins-release/org/codehaus/mojo/buildnumber-maven-plugin/maven-metadata.xml
[INFO] Downloaded: http://digistyle.bonprix.net/artifactory/plugins-release/org/codehaus/mojo/buildnumber-maven-plugin/maven-metadata.xml (602 B at 21.8 KB/sec)
[INFO] Downloaded: http://digistyle.bonprix.net/artifactory/plugins-snapshot/org/codehaus/mojo/buildnumber-maven-plugin/maven-metadata.xml (602 B at 21.8 KB/sec)
[INFO] Downloading: http://digistyle.bonprix.net/artifactory/plugins-release/org/apache/maven/plugins/maven-jar-plugin/maven-metadata.xml
[INFO] Downloading: http://digistyle.bonprix.net/artifactory/plugins-snapshot/org/apache/maven/plugins/maven-jar-plugin/maven-metadata.xml
[INFO] Downloaded: http://digistyle.bonprix.net/artifactory/plugins-snapshot/org/apache/maven/plugins/maven-jar-plugin/maven-metadata.xml (743 B at 29.0 KB/sec)
[INFO] Downloaded: http://digistyle.bonprix.net/artifactory/plugins-release/org/apache/maven/plugins/maven-jar-plugin/maven-metadata.xml (743 B at 27.9 KB/sec)
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) # InvoiceUserInterface ---
[INFO]
[INFO] --- build-helper-maven-plugin:1.12:add-source (add-source) # InvoiceUserInterface ---
[INFO] Source directory: /var/jenkins_home/jobs/SCM/jobs/DInvoice/jobs/InvoiceUserInterface/workspace/target/generated-sources/apt added.
[INFO] Source directory: /var/jenkins_home/jobs/SCM/jobs/DInvoice/jobs/InvoiceUserInterface/workspace/target/generated-sources/classes added.
[INFO]
[INFO] --- maven-processor-plugin:2.2.4:process (process) # InvoiceUserInterface ---
[WARNING] No processors specified. Using default discovery mechanism.
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # InvoiceUserInterface ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 6 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.3:compile (default-compile) # InvoiceUserInterface ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 13 source files to /var/jenkins_home/jobs/SCM/jobs/DInvoice/jobs/InvoiceUserInterface/workspace/target/classes
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) # InvoiceUserInterface ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 2 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.3:testCompile (default-testCompile) # InvoiceUserInterface ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 1 source file to /var/jenkins_home/jobs/SCM/jobs/DInvoice/jobs/InvoiceUserInterface/workspace/target/test-classes
[INFO]
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) # InvoiceUserInterface ---
[INFO] Surefire report directory: /var/jenkins_home/jobs/SCM/jobs/DInvoice/jobs/InvoiceUserInterface/workspace/target/surefire-reports
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running de.bonprix.dinvoice.modules.invoice.InvoicePresenterTest
Configuring TestNG with: org.apache.maven.surefire.testng.conf.TestNG652Configurator#7a92922
Jul 28, 2016 1:44:56 PM org.springframework.test.context.support.DefaultTestContextBootstrapper getTestExecutionListeners
INFO: Using TestExecutionListeners: [org.springframework.test.context.web.ServletTestExecutionListener#6121c9d6, org.springframework.test.context.support.DependencyInjectionTestExecutionListener#87f383f, org.springframework.test.context.support.DirtiesContextTestExecutionListener#4eb7f003, org.springframework.test.context.transaction.TransactionalTestExecutionListener#eafc191, org.springframework.test.context.jdbc.SqlScriptsTestExecutionListener#612fc6eb]
ERROR StatusLogger No log4j2 configuration file found. Using default configuration: logging only errors to the console.
Jul 28, 2016 1:44:57 PM org.springframework.context.support.GenericApplicationContext prepareRefresh
INFO: Refreshing org.springframework.context.support.GenericApplicationContext#77a57272: startup date [Thu Jul 28 13:44:57 UTC 2016]; root of context hierarchy
Jul 28, 2016 1:44:57 PM org.springframework.context.support.PostProcessorRegistrationDelegate$BeanPostProcessorChecker postProcessAfterInitialization
INFO: Bean 'aspectConfiguration' of type [class de.bonprix.configuration.AspectConfiguration$$EnhancerBySpringCGLIB$$48895d0c] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
Using test database connection test at jdbc:oracle:thin:#(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=172.16.1.194)(PORT=18000)))(CONNECT_DATA=(SID=orcl)))
Jul 28, 2016 1:44:58 PM org.springframework.jdbc.datasource.DriverManagerDataSource setDriverClassName
INFO: Loaded JDBC driver: oracle.jdbc.OracleDriver
Build was aborted
Results :
Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
Aborted by admin
channel stopped
[WS-CLEANUP] Deleting project workspace...[WS-CLEANUP] done
Finished: ABORTED

How to debug "The plugin 'org.apache.maven.plugins:maven-archetype-plugin' does not exist or no valid version could be found"?

This is what I am trying to do. I have installed Maven. Set the path till bin folder of Maven.
C:\Workspace\Eaxample>mvn archetype:generate -DgroupId=com.mkyong -DartifactId=N
umberGenerator
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'archetype'.
[INFO] org.apache.maven.plugins: checking for updates from central
[WARNING] repository metadata for: 'org.apache.maven.plugins' could not be retri
eved from repository: central due to an error: Error transferring file: Connecti
on timed out: connect
[INFO] Repository 'central' will be blacklisted
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] The plugin 'org.apache.maven.plugins:maven-archetype-plugin' does not exi
st or no valid version could be found
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 21 seconds
[INFO] Finished at: Tue Nov 24 14:04:15 IST 2015
[INFO] Final Memory: 5M/122M
You forget archetypeArtifactId :
Do this :
mvn archetype:generate -DgroupId={project-packaging}
-DartifactId={project-name}
-DarchetypeArtifactId=maven-archetype-quickstart
-DinteractiveMode=false
http://www.mkyong.com/maven/how-to-create-a-java-project-with-maven/

Resources