aspose file tools*
The moose likes Ant, Maven and Other Build Tools and the fly likes maven subversion Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "maven subversion" Watch "maven subversion" New topic
Author

maven subversion

anjana jalodiya
Greenhorn

Joined: Mar 09, 2011
Posts: 14
after reading your instruction i have tried to run svn:scm://file:///E:/my-app-repos

but its not working error is
svn:scm not recognized as an internal or external command
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5845
    
    7

I think you mistakenly created a new post rather than replying to another post. Anyway, that text string appears to be a URI for a resource and should be passed to some program. The error you got is that Windows doesn't understand what you mean.


JBoss In Action
anjana jalodiya
Greenhorn

Joined: Mar 09, 2011
Posts: 14
Peter Johnson wrote:I think you mistakenly created a new post rather than replying to another post. Anyway, that text string appears to be a URI for a resource and should be passed to some program. The error you got is that Windows doesn't understand what you mean.


Actually sir,

i m doing work on maven and subversion
i have created a maven project now i want to point it to my repository(created by svn tortoise) so i want to take advantages of maven build with maintaining subversion of our project.

i read that for this i have to change in pom.xml file from this site


maven

but by following this site i m unable to performing release:prepare


anjana jalodiya
Greenhorn

Joined: Mar 09, 2011
Posts: 14
Peter Johnson wrote:I think you mistakenly created a new post rather than replying to another post. Anyway, that text string appears to be a URI for a resource and should be passed to some program. The error you got is that Windows doesn't understand what you mean.


Actually Sir

I was wanted to send my code but facing some problem to send it.......

i have posted my question in mailing list.......or i just want to take advantages of maven build with maintaining subversion of my project

firstly i have successfully followed this one sit

http://maven.apache.org/guides/getting-started/index.html

and then i following instruction of this site

please if you have any idea about it,please guide me

Regards
Anjana

http://wiki.gxdeveloperweb.com/confluence/display/GXDEV/Maven+and+Source+Control+Management+in+Subversion

but I am facing some problem in following these instruction


Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5845
    
    7

I am sorry, but I do not understand exactly what it is that you are trying to do. Here is what I do understand:

a) You have you source in Subversion and you do you builds with Maven.
b) You have configured your POM to reference the Subversion repository.
c) You are using the release:prepare goal

From my understanding, release:prepare will create an entry in the tags directory of the project, which marks the current trunk as being released. I assume that you want to do this only occasionally since mot every build is a release build.

It would help if you posted the pom.xml - just copy and past it into the post, and place the 'code' tags around it (select the pom.xml text in the editor window and click on the Post button). Also, post the full console output, starting from the command that you entered. Post this as text, not as a screen shot!
anjana jalodiya
Greenhorn

Joined: Mar 09, 2011
Posts: 14
Peter Johnson wrote:I am sorry, but I do not understand exactly what it is that you are trying to do. Here is what I do understand:

a) You have you source in Subversion and you do you builds with Maven.
b) You have configured your POM to reference the Subversion repository.
c) You are using the release:prepare goal

From my understanding, release:prepare will create an entry in the tags directory of the project, which marks the current trunk as being released. I assume that you want to do this only occasionally since mot every build is a release build.

It would help if you posted the pom.xml - just copy and past it into the post, and place the 'code' tags around it (select the pom.xml text in the editor window and click on the Post button). Also, post the full console output, starting from the command that you entered. Post this as text, not as a screen shot!


yes sir i m exactly want as you are assuming
I want build with maven maintaining subversion together

POM.xml file
<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>com.mycompany.app</groupId>
<artifactId>my-app</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>

<name>my-app</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>3.8.1</version>
<scope>test</scope>
</dependency>
</dependencies>

<scm>
<connection>scm:svn:svn+ssh://file:///E:/my-app-repos/trunk</connection>
<developerConnection>scm:svn:svn+ssh://file:///E:/my-app-repos/trunk</developerConnection>
<url>scm:svn:svn+ssh://file:///E:/my-app-repos/trunk</url>
</scm>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<configuration>
<tagBase>svn+ssh://file:///E:/my-app-reposs</tagBase>
</configuration>
</plugin>
</plugins>
</build>

</project>



And the operation that I have done on it through MS-Dos promt


C:\anu2\my-app>mvn compile
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building my-app 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.4.3:resources (default-resources) @ my-app -
--
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory C:\anu2\my-app\src\main\resources
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ my-app ---
[INFO] Nothing to compile - all classes are up to date
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.875s
[INFO] Finished at: Wed Mar 16 12:44:01 IST 2011
[INFO] Final Memory: 3M/15M
[INFO] ------------------------------------------------------------------------
C:\anu2\my-app>mvn test compile
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building my-app 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.4.3:resources (default-resources) @ my-app -
--
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory C:\anu2\my-app\src\main\resources
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ my-app ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-resources-plugin:2.4.3:testResources (default-testResources) @
my-app ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory C:\anu2\my-app\src\test\resources
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @ my-ap
p ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-surefire-plugin:2.7.2:test (default-test) @ my-app ---
[INFO] Surefire report directory: C:\anu2\my-app\target\surefire-reports

-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running com.mycompany.app.AppTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.015 sec

Results :

Tests run: 1, Failures: 0, Errors: 0, Skipped: 0

[INFO]
[INFO] --- maven-resources-plugin:2.4.3:resources (default-resources) @ my-app -
--
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory C:\anu2\my-app\src\main\resources
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ my-app ---
[INFO] Nothing to compile - all classes are up to date
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.734s
[INFO] Finished at: Wed Mar 16 12:44:12 IST 2011
[INFO] Final Memory: 4M/15M
[INFO] ------------------------------------------------------------------------
C:\anu2\my-app>mvn package
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building my-app 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.4.3:resources (default-resources) @ my-app -
--
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory C:\anu2\my-app\src\main\resources
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ my-app ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-resources-plugin:2.4.3:testResources (default-testResources) @
my-app ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory C:\anu2\my-app\src\test\resources
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @ my-ap
p ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-surefire-plugin:2.7.2:test (default-test) @ my-app ---
[INFO] Surefire report directory: C:\anu2\my-app\target\surefire-reports

-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running com.mycompany.app.AppTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.016 sec

Results :

Tests run: 1, Failures: 0, Errors: 0, Skipped: 0

[INFO]
[INFO] --- maven-jar-plugin:2.3.1:jar (default-jar) @ my-app ---
[INFO] Building jar: C:\anu2\my-app\target\my-app-1.0-SNAPSHOT.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.422s
[INFO] Finished at: Wed Mar 16 12:44:29 IST 2011
[INFO] Final Memory: 4M/15M
[INFO] ------------------------------------------------------------------------
C:\anu2\my-app>mvn install
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building my-app 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.4.3:resources (default-resources) @ my-app -
--
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory C:\anu2\my-app\src\main\resources
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ my-app ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-resources-plugin:2.4.3:testResources (default-testResources) @
my-app ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory C:\anu2\my-app\src\test\resources
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @ my-ap
p ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-surefire-plugin:2.7.2:test (default-test) @ my-app ---
[INFO] Surefire report directory: C:\anu2\my-app\target\surefire-reports

-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running com.mycompany.app.AppTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 sec

Results :

Tests run: 1, Failures: 0, Errors: 0, Skipped: 0

[INFO]
[INFO] --- maven-jar-plugin:2.3.1:jar (default-jar) @ my-app ---
[INFO]
[INFO] --- maven-install-plugin:2.3.1:install (default-install) @ my-app ---
[INFO] Installing C:\anu2\my-app\target\my-app-1.0-SNAPSHOT.jar to C:\Documents
and Settings\smart\.m2\repository\com\mycompany\app\my-app\1.0-SNAPSHOT\my-app-1
.0-SNAPSHOT.jar
[INFO] Installing C:\anu2\my-app\pom.xml to C:\Documents and Settings\smart\.m2\
repository\com\mycompany\app\my-app\1.0-SNAPSHOT\my-app-1.0-SNAPSHOT.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.406s
[INFO] Finished at: Wed Mar 16 12:44:42 IST 2011
[INFO] Final Memory: 4M/15M
[INFO] ------------------------------------------------------------------------
C:\anu2\my-app>mvn release:prepare
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building my-app 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-release-plugin:2.0:prepare (default-cli) @ my-app ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.265s
[INFO] Finished at: Wed Mar 16 12:44:58 IST 2011
[INFO] Final Memory: 3M/15M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.0
:prepare (default-cli) on project my-app: Execution default-cli of goal org.apac
he.maven.plugins:maven-release-plugin:2.0:prepare failed: For input string: "" -
> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
ch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please rea
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutio
nException
C:\anu2\my-app>m
[/code]

Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5845
    
    7

Have you tried following this advice:

Re-run Maven using the -X switch to enable full debug logging.


Also, have you tried using the subversion url with the svn command? Did that work? You should ensure that the url works with svn before trying it with mvn.
anjana jalodiya
Greenhorn

Joined: Mar 09, 2011
Posts: 14
Peter Johnson wrote:Have you tried following this advice:

Re-run Maven using the -X switch to enable full debug logging.


Also, have you tried using the subversion url with the svn command? Did that work? You should ensure that the url works with svn before trying it with mvn.


hows can we perform the following

Re-run Maven using the -X switch to enable full debug logging

and how can we check our sebversion url through svn command

as i am using svn tortoise I have check it through repository browser
file:///E:/my-app-repos/trunk
this url is right
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5845
    
    7

So when you fixed the Subversion URL in Maven to match the one you used in Tortoise, what happened?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: maven subversion