maven-glassfish-plugin in maven-3.0.4 - maven-3

Upon running mvn install glassfish:deploy I run into the following problems
[...]
[ERROR] Failed to execute goal org.glassfish.maven.plugin:maven-glassfish-plugin:2.1:deploy (default-cli) on project post-build-pom: Execution default-cli of goal org.glassfish.maven.plugin:maven-glassfish-plugin:2.1:deploy failed: Plugin o rg.glassfish.maven.plugin:maven-glassfish-plugin:2.1 or one of its dependencies could not be resolved: Failed to collect dependencies for org.glassfish.maven.plugin:maven-glassfish-plugin:jar:2.1 (): Failed to read artifact descriptor for org.apache.maven:maven-plugin-api:jar:3.0-SONATYPE-688946: Failure to find org.apache.maven:maven-parent:pom:9-SNAPSHOT in http://maven-repository/content/groups/public was cached in the local repository, resolution will not be reattempted until the update interval of internal-repository has elapsed or updates are forced -> [Help 1]
[...]
My mvn -v looks like this:
Apache Maven 3.0.4 (r1232337; 2012-01-17 09:44:56+0100)
Maven home: C:\Users\rob\apache-maven-3.0.4\bin\..
Java version: 1.6.0_37, vendor: Sun Microsystems Inc.
Java home: C:\Programme\Java\jdk1.6.0_37\jre
Default locale: de_DE, platform encoding: Cp1252
OS name: "windows 7", version: "6.1", arch: "amd64", family: "windows"
Futhermore my nexus-repository runs on http://maven-repository .
EDIT: The plugin-part from pom.xml looks like this:
<plugin>
<groupId>org.glassfish.maven.plugin</groupId>
<artifactId>maven-glassfish-plugin</artifactId>
<version>2.1</version>
<configuration>
<user>admin</user>
<adminPassword>adminadmin</adminPassword>
<glassfishDirectory>c:\development\glassfish-v2.1.1-b31g</glassfishDirectory>
</configuration>
</plugin>

you're not the only one facing problems there :)
there seems to be even official bug report for that: http://java.net/jira/browse/GLASSFISH-14411
As a workaround suggested here: http://jira.codehaus.org/browse/MNG-4843
you should override the plugin dependencies in your project with proper versions.
Following should solve your problem:
<build>
<plugins>
<plugin>
<groupId>org.glassfish.maven.plugin</groupId>
<artifactId>maven-glassfish-plugin</artifactId>
<version>2.1</version>
<configuration>
<user>admin</user>
<adminPassword>adminadmin</adminPassword>
<glassfishDirectory>c:\development\glassfish-v2.1.1-b31g</glassfishDirectory>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-project</artifactId>
<version>3.0-alpha-2</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
<version>3.0.4</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-artifact</artifactId>
<version>3.0.4</version>
<scope>provided</scope>
</dependency>
</dependencies>
Of course you need to provide all the configuration required, but it's another topic covered by: http://maven-glassfish-plugin.java.net/examples/complete.html

I find another way to solve this:
copy file "C:\Users\< current user >\.m2\repository\org\apache\maven\maven-parent\11\maven-parent-11.pom"
to
"C:\Users\< current user >\.m2\repository\org\apache\maven\maven-parent\11-SNAPSHOT\"
and rename it to "maven-parent-11-SNAPSHOT.pom"

Related

Unable to start jira com.atlassian.plugin:atlassian-spring-scanner-maven-plugin:1.2.6

I just formatted my laptop, and install everything fresh and new. But now I am unable to start Jira.
Here is the error message I get:
The POM for com.atlassian.plugin:atlassian-spring-scanner-maven-plugin:jar:1.2.6 is missing, no dependency information available
------------------------------------------------------------------------
BUILD FAILURE
------------------------------------------------------------------------
Total time: 2.428s
Finished at: Fri Nov 20 08:18:15 IST 2015
Final Memory: 11M/166M
------------------------------------------------------------------------
Plugin com.atlassian.plugin:atlassian-spring-scanner-maven-plugin:1.2.6 or one of its dependencies could not be resolved: Failed to read artifact descriptor for com.atlassian.plugin:atlassian-spring-scanner-maven-plugin:jar:1.2.6: Failure to find com.atlassian.plugin:atlassian-spring-scanner-maven-plugin:pom:1.2.6 in http://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced -> [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/PluginResolutionException
and this is my pom.xml:
<dependency>
<groupId>com.atlassian.jira</groupId>
<artifactId>jira-api</artifactId>
<version>${jira.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.atlassian.plugin</groupId>
<artifactId>atlassian-spring-scanner-annotation</artifactId>
<version>${atlassian.spring.scanner.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.atlassian.plugin</groupId>
<artifactId>atlassian-spring-scanner-runtime</artifactId>
<version>${atlassian.spring.scanner.version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>javax.inject</groupId>
<artifactId>javax.inject</artifactId>
<version>1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.ws.rs</groupId>
<artifactId>jsr311-api</artifactId>
<version>1.1.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.2.2-atlassian-1</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.4</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>2.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.atlassian.plugins.rest</groupId>
<artifactId>atlassian-rest-common</artifactId>
<version>1.0.2</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.atlassian.sal</groupId>
<artifactId>sal-api</artifactId>
<version>2.6.0</version>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>com.atlassian.maven.plugins</groupId>
<artifactId>maven-jira-plugin</artifactId>
<version>${amps.version}</version>
<extensions>true</extensions>
<configuration>
<productVersion>${jira.version}</productVersion>
<productDataVersion>${jira.version}</productDataVersion>
<enableQuickReload>true</enableQuickReload>
<enableFastdev>false</enableFastdev>
<instructions>
<Atlassian-Plugin-Key>${atlassian.plugin.key}</Atlassian-Plugin-Key>
<Export-Package>net.gisnas.jira.mailqueue.api,</Export-Package>
<Import-Package>org.springframework.osgi.*;resolution:="optional",
org.eclipse.gemini.blueprint.*;resolution:="optional", *</Import-Package>
<Spring-Context>*</Spring-Context>
</instructions>
</configuration>
</plugin>
<plugin>
<groupId>com.atlassian.plugin</groupId>
<artifactId>atlassian-spring-scanner-maven-plugin</artifactId>
<version>1.2.6</version>
<executions>
<execution>
<goals>
<goal>atlassian-spring-scanner</goal>
</goals>
<phase>process-classes</phase>
</execution>
</executions>
<configuration>
<scannedDependencies>
<dependency>
<groupId>com.atlassian.plugin</groupId>
<artifactId>atlassian-spring-scanner-external-jar</artifactId>
</dependency>
</scannedDependencies>
<verbose>false</verbose>
</configuration>
</plugin>
</plugins>
</build>
<properties>
<maven.local.repo>C:\Applications\Atlassian\atlassian-plugin-sdk-6.1.0\repository</maven.local.repo>
<jira.version>7.0.2</jira.version>
<amps.version>6.1.2</amps.version>
<plugin.testrunner.version>1.2.3</plugin.testrunner.version>
<atlassian.spring.scanner.version>1.2.6</atlassian.spring.scanner.version>
<!-- This key is used to keep the consistency between the key in atlassian-plugin.xml and the key to generate bundle. -->
<atlassian.plugin.key>${project.groupId}.${project.artifactId}</atlassian.plugin.key>
<!-- TestKit version 6.x for JIRA 6.x -->
<testkit.version>6.3.11</testkit.version>
</properties>
Sometimes the above error is throwing, and sometimes I am facing jta.jar error even I don't understand why that jar is required. I tried with cloning the repo and starting it, but I'm still facing the same error.
Please add into your project pom.xml, following
<pluginRepositories>
<pluginRepository>
<id>atlassian-public</id>
<url>https://maven.atlassian.com/content/repositories/atlassian-public/</url>
<snapshots>
<enabled>true</enabled>
<updatePolicy>never</updatePolicy>
<checksumPolicy>warn</checksumPolicy>
</snapshots>
<releases>
<enabled>true</enabled>
<checksumPolicy>warn</checksumPolicy>
</releases>
</pluginRepository>
</pluginRepositories>
atlassian-spring-scanner-maven-plugin of course is Maven plugin of Atlassian. It should be hosted in Atlassian Maven Repositories - https://maven.atlassian.com/#nexus-search;quick~atlassian-spring-scanner-maven-plugin. But I see this error message:
Failure to find com.atlassian.plugin:atlassian-spring-scanner-maven-plugin:pom:1.2.6 in http://repo.maven.apache.org/maven2
It says that it can not be looked up in Maven Central Repositories instead of Atlassian Maven Repositories
So I think you should check your Maven runtime settings. Your maven should read local settings.xml from Atlassian plugin SDK which configured Atlassian Maven Proxy, please refer this resource for configuration Atlassian Maven Proxy https://developer.atlassian.com/docs/advanced-topics/working-with-maven/atlassian-maven-repositories
I see your pom.xml has maven.local.repo
<maven.local.repo>C:\Applications\Atlassian\atlassian-plugin-sdk-6.1.0\repository</maven.local.repo>
But it just means that you are using a custom local repository directory, it does not mean your Maven has Atlassian Maven Proxy yet

Parent POM is taking the same version which I am giving in the module version

I have a multi module maven project for e.g.
A
B
C
D
E
Currently this project is working fine and have a single job to build all the modules and upload to the artifactory with some version for e.g. 4.0.0-.They are using versions:set -DnewVersion=4.0.0-${BUILD_NUMBER} from Jenkins job.Now my next task is to split this project into module so they dev team can build each module independetly but my issue is some modules is having the dependecy on other modules for e.g
Module B is having dependecy on module A and Module C.if I build the module A first then it generate the number 4.0.0-00001 and upload it to the artifactory and then I build the module C then it generate the build 4.0.0-00005.Now the question comes how could I build the module B which is having the dependency on module A and C.In my opinion I need to define the version of module A and C explicitly in the dependency section.
<dependency>
<groupId>com.xyz.engine</groupId>
<artifactId>A</artifactId>
<version>4.0.0-00005</version>
</dependency>
From my module POM I am calling my parent POM and In jenkins job I am giving
versions:set -DnewVersion=4.0.0-${BUILD_NUMBER} for versioning purpose if I explicity define the version of A module then it is also passing the same value to the Parent POM and searching for it which is not avilable.Below is my module POM file
<?xml version="1.0"?>
<project
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.truvenhealth.analyticsengine</groupId>
<artifactId>AnalyticsEngine</artifactId>
<version>4.0.0-00002</version>
</parent>
<artifactId>LicenseVerifier</artifactId>
<name>LicenseVerifier</name>
<packaging>jar</packaging>
<dependencies>
<!-- Modules dependencies -->
<dependency>
<groupId>com.xyz.engine</groupId>
<artifactId>Common</artifactId>
<version>4.0.0-00007</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-aop</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-expression</artifactId>
</dependency>
<!-- External dependencies -->
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-collections4</artifactId>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
</dependency>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjtools</artifactId>
<version>1.6.2</version>
</dependency>
<dependency>
<groupId>com.verhas</groupId>
<artifactId>license3j</artifactId>
<version>1.0.4</version>
</dependency>
</dependencies>
<build>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>false</filtering>
</resource>
</resources>
<plugins>
<!-- Plugin configurations inherited from the parent POM -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.projectlombok</groupId>
<artifactId>lombok-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
it is taking the same value for Parent POM which I assigned to Common module .I am keeping the Parent POM in separate repository it should not take the same value it should only take that value which I am defining for the Parent POM and it should download it from their and provide all the values to module POM and the build should be created for module LicenseVerifier with different version.
If you have a multi module build which looks like this:
root (pom.xml parent of all modules)
+---- module-a (pom.xml)
+---- module-b (pom.xml)
+---- module-c (pom.xml)
+---- module-d (pom.xml)
To build a module separately you can do this via Maven like this:
mvn -pl module-a clean package
This will build the module-a only and get the dependencies of other modules from the remote repository. Or you can enhance that like this:
mvn -pl module-a -amd clean package
where the option -amd means --also-make-dependents. If a developer needs a particular state you can do this by a mvn install first and afterwards only build the module you would like to build.
A very important thing in relationship with multi module builds is to have the same version for all modules and the parent. So dependencies between those modules is no problem.
Starting with Maven 3.2.1 you can define the version via properties.
A simple change to prevent Maven from emitting warnings about versions
with property expressions. Allowed property expressions in versions
include ${revision}, ${changelist}, and ${sha1}. These properties can
be set externally, but eventually a mechanism will be created in Maven
where these properties can be injected in a standard way. For example
you may want to glean the current Git revision and inject that value
into ${sha1}. This is by no means a complete solution for continuous
delivery but is a step in the right direction.
Furthermore during development i would prefer the SNAPSHOT versions which the cleanup in the repository manager simpler. So in essence i don't any need to separate the modules which logicaly belong together.
Apart from that if you use the same version within your multimodule build you can use things like this: ${project.version} to define the version of a dependency which is part of the reactor.

How can I run Selenium Webdiver test cases(Maven Project) in virtual server space through Jenkins with Headless browser?

I have one project which is based on maven.It is run correctly in local machine with mvn clean install exec:java command.
This is my Pom.xml to run maven project.
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>AutomationMaven</groupId>
<artifactId>AutomationMaven</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>AutomationMaven</name>
<url>http://maven.apache.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.10</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>2.43.1</version>
</dependency>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>6.8.8</version>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.17</version>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.6</version>
</dependency>
<dependency>
<groupId>javax.mail</groupId>
<artifactId>mail</artifactId>
<version>1.4.4</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-server</artifactId>
<version>2.43.1</version>
</dependency>
</dependencies>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.2</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
<encoding>${project.build.sourceEncoding}</encoding>
<showDeprecation>true</showDeprecation>
<showWarnings>true</showWarnings>
<executable>${env.JAVA_HOME}/bin/javac</executable>
<fork>true</fork>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.2.1</version>
<configuration>
<mainClass>com.mainClass</mainClass>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>
I have already set up "GIT repository" for it which is align with "Jenkins Job".
I have made on job in "Jenkins" with this parameter
- JDK 7
- Xvfb setup(Need More Info about configuration)
- maven command = mvn clean install exec:java
I have different server for Run Maven Project (Selenium Test).
I have getting following Track trace (Error) while run project on Server :
org.openqa.selenium.NoSuchElementException: Unable to locate element: {"method":"id","selector":"mcHeaderLink"}
Command duration or timeout: 30.03 seconds
For documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html
Build info: version: '2.43.1', revision: '5163bceef1bc36d43f3dc0b83c88998168a363a0', time: '2014-09-10 09:43:55'
System info: host: 'ip-10-120-0-202', ip: '10.120.0.202', os.name: 'Linux', os.arch: 'amd64', os.version: '3.2.0-58-virtual', java.version: '1.7.0_72'
Session ID: 6c37455f-1dbe-4a8f-acd4-a2b21ae6ec00
Driver info: org.openqa.selenium.firefox.FirefoxDriver
Capabilities [{platform=LINUX, acceptSslCerts=true, javascriptEnabled=true, cssSelectorsEnabled=true, databaseEnabled=true, browserName=firefox, handlesAlerts=true, browserConnectionEnabled=true, webStorageEnabled=true, nativeEvents=false, rotatable=false, locationContextEnabled=true, applicationCacheEnabled=true, takesScreenshot=true, version=26.0}]
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:204)
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:156)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:599)
at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:352)
at org.openqa.selenium.remote.RemoteWebDriver.findElementById(RemoteWebDriver.java:393)
at org.openqa.selenium.By$ById.findElement(By.java:214)
at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:344)
at org.openqa.selenium.support.pagefactory.DefaultElementLocator.findElement(DefaultElementLocator.java:59)
at org.openqa.selenium.support.pagefactory.internal.LocatingElementHandler.invoke(LocatingElementHandler.java:37)
at com.sun.proxy.$Proxy22.click(Unknown Source)
There is another way that can help you.
But you require a dedicated server space and a display for running your selenium script. Display is required for javascript operations.
You have to configure jenkins job with your repository first.
Once you get repository you have to run that project with the help of mvn exec:java.
Please confirm your JRE version in jenkins with maven-compiler-plugin. It should be same.
Once you are able to successfully run the jenkins job, you can check it in your jenkins console log.
Hard to say why it does not work, as you said nothing about your application. But "NoSuchElementException" suggests that the tests are running and just cannot find the required element.
Take a look at your application logfile and check if it is really running.
You may dump a screenshot to see your application state in case of error.
see Take a screenshot with Selenium WebDriver

Maven Release Plugin throws svn : '' is not a working copy

I have a mavenized project and when I try to do a release, I get the below error:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.4
.2:prepare (default-cli) on project SimpleWeb: Unable to check for local modific
ations
[ERROR] Provider message:
[ERROR] SVN status failed.
[ERROR] Command output:
[ERROR] svn: '' is not a working copy
I have the below questions:
How is the scm configuration is given in POM file
If the communication to scm should happen through https, how can we configure the certificate on the client side
The release should happen from branch or trunk
My scm configuration is as follows:
<scm>
<connection>scm:svn:https://domain.com/svn/New_FW/CI_POC/SimpleWeb/trunk</connection>
<developerConnection>scm:svn:https://domain.com/svn/New_FW/CI_POC/SimpleWeb/trunk</developerConnection>
<url>https://domain.com/svn/New_FW/CI_POC/SimpleWeb/trunk</url>
</scm>
My maven release plugin configuration is as follows:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-scm-plugin</artifactId>
<version>1.3</version>
<configuration>
<providerImplementations>
<svn>javasvn</svn>
</providerImplementations>
<username>${scm.username}</username>
<password>${scm.password}</password>
</configuration>
<dependencies>
<dependency>
<groupId>com.google.code.maven-scm-provider-svnjava</groupId>
<artifactId>maven-scm-provider-svnjava</artifactId>
<version>1.14</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>2.4.2</version>
<dependencies>
<dependency>
<groupId>com.google.code.maven-scm-provider-svnjava</groupId>
<artifactId>maven-scm-provider-svnjava</artifactId>
<version>1.6</version>
</dependency>
</dependencies>
<configuration>
<providerImplementations>
<svn>javasvn</svn>
</providerImplementations>
<tagBase>https://domain-inc.com/svn/New_FW/CI_POC/SimpleWeb/tags</tagBase>
<mavenExecutorId>forked-path</mavenExecutorId>
</configuration>
</plugin>
I am struck here and cant move ahead. Please help/guide me in resolving the issue. When I run the same by configuring the Maven Release Plugin in Jenkins I get a different error as: "svn: Authentication required". Why is this difference.
On Windows Jenkins slave I have same issue with multi maven project.
For fix it I added:
...
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
...
<configuration>
<commitByProject>true</commitByProject>
...
</configuration>
...

unable to convert my maven to eclipse

Please, I am new to maven and trying to build my first maven project. So, here are a few things I did:
from my command line into a directory called MavenProject I created:
mvn archetype:generate
and then choose a number to apply number, I entered 15 then;
Choose com.dyuproject.protostuff.archetype:basic-webapp version:
I chose version 1.0.7
groupId: com.henry
artifactId: HibernateTest
and the rest, I just entered..
and the project was created but then I typed in mvn eclipse:eclipse, I got an error that there was no pom.xml file even though I can see there is one in my mavenProject. so, I changed into the HibernateTest directory and in that directory, I tried the mvn eclipse:eclipse command again but this time, it gave the eorror:
Plugin com.dyuproject.protostuff:protostuff-maven-plugin:1.0.2-SNAPSHOT or one of its
dependencies could not be resolved: Failed to read artifact descriptor for
com.dyuproject.protostuff:protostuff-maven-plugin:jar:1.0.2-SNAPSHOT: Could not find artifact
com.dyuproject.protostuff:protostuff-maven-plugin:pom:1.0.2-SNAPSHOT
I tried to solve this by going to mvnrepository.com and found the protostuff maven and added the dependencies but still couldn't solve it. here is my pom.xml file:
pom.xml
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLS$
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_$
<parent>
<artifactId>Hibernate</artifactId>
<groupId>com.henry</groupId>
<version>1.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>com.henry</groupId>
<artifactId>Hibernate-model</artifactId>
<name>Hibernate :: model</name>
<packaging>jar</packaging>
<build>
<defaultGoal>install</defaultGoal>
<plugins>
<plugin>
<groupId>com.dyuproject.protostuff</groupId>
<artifactId>protostuff-maven-plugin</artifactId>
<version>${protostuff.version}</version>
<configuration>
<protoModules>
<protoModule>
<source>src/main/resources/com/henry/model/model.proto</source>
<outputDir>src/main/java</outputDir>
<output>java_bean</output>
<encoding>UTF-8</encoding>
<options>
<property>
<name>generate_field_map</name>
</property>
<property>
<name>separate_schema</name>
</property>
<property>
<name>builder_pattern</name>
</property>
<property>
<name>generate_helper_methods</name>
</property>
</options>
</protoModule>
</protoModules>
</configuration>
<executions>
<execution>
<id>generate-sources</id>
<phase>generate-sources</phase>
<goals>
<goal>compile</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>com.dyuproject.protostuff</groupId>
<artifactId>protostuff-core</artifactId>
</dependency>
<dependency>
<groupId>com.dyuproject.protostuff</groupId>
<artifactId>protostuff-maven-plugin</artifactId>
<version>1.0.7</version>
</dependency>
<dependency>
<groupId>com.dyuproject.protostuff</groupId>
<artifactId>protostuff-codegen</artifactId>
<version>1.0.7</version>
</dependency>
<dependency>
<groupId>com.dyuproject.protostuff</groupId>
<artifactId>protostuff-core</artifactId>
</dependency>
<dependency>
<groupId>com.dyuproject.protostuff</groupId>
<artifactId>protostuff-maven-plugin</artifactId>
<version>1.0.7</version>
</dependency>
<dependency>
<groupId>com.dyuproject.protostuff</groupId>
<artifactId>protostuff-codegen</artifactId>
<version>1.0.7</version>
</dependency>
<dependency>
<groupId>com.dyuproject.protostuff</groupId>
<artifactId>protostuff-compiler</artifactId>
<version>1.0.7</version>
</dependency>
</dependencies>
</project>
Any help will be appreciated. Sorry am a newbie :)
First try to build the project on the command line: mvn install. That should succeed.
But it looks like it won't, as it is looking for a SNAPSHOT dependency version of ${protostuff.version}. When I look in the Maven central repository, there's really only release versions (as it should be). Somehow you have to fix that, probably in your parent project.
The POM file should be in the root of the project and called pom.xml. Where you find the POM file called pom.xml is the root of the project :)
Only use eclipse:eclipse as a last resort. If you have free choice of Eclipse, and you have no wizardry in your Maven projects, you should be able to use the m2e (m2eclipse) Eclipse plugin.
That's an Eclipse plugin, not a Maven plugin, so no additional steps are needed on the command line. Just go into Eclipse, make sure the m2e plugin is installed. Then import your project (Import, "Existing Maven Projects").
All the files that Eclipse needs for its own bookkeeping should be created upon import and be based on the POM file. I.e. .classpath, .project and .settings (folder). If you have any of those prior to importing into Eclipse, you may be better off removing them (they may be remnants of your eclipse:eclipse attempts.

Resources