how to build svnimporter

jgeorgeson
Posts: 2
Joined: Wed May 14, 2008 9:11 pm

how to build svnimporter

Postby jgeorgeson » Tue Jun 17, 2008 8:20 pm

I've made some local customizations and would like to build them and run the customized version. However, it's not readily apparent to me how to do this. The build.bat file references an environment variable for the Maven executable to launch the build. It doesn't appear to be calling mvn, as that doesn't have a -p option. Trying to just run 'mvn pack' or 'mvn buildAll' results in errors

Code: Select all

[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Invalid task 'pack': you must specify a valid lifecycle phase, or a goal in the format plugin:goal or pluginGroupId:pluginArtifactId:pluginVersion:goal
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: < 1 second
[INFO] Finished at: Tue Jun 17 15:17:32 CDT 2008
[INFO] Final Memory: 1M/126M
[INFO] ------------------------------------------------------------------------


and running 'mvn plugin:pack' doesn't fare much better

Code: Select all

[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'plugin'.
[INFO] org.apache.maven.plugins: checking for updates from central
[WARNING] repository metadata for: 'org.apache.maven.plugins' could not be retrieved from repository: central
due to an error: Error transferring file
[INFO] Repository 'central' will be blacklisted
Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-plugin-plugin/2.4.1/maven-plugin-plu
gin-2.4.1.pom
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error building POM (may not be this project's POM).


Project ID: org.apache.maven.plugins:maven-plugin-plugin

Reason: POM 'org.apache.maven.plugins:maven-plugin-plugin' not found in repository: Unable to download the art
ifact from any repository

  org.apache.maven.plugins:maven-plugin-plugin:pom:2.4.1

from the specified remote repositories:
  central (http://repo1.maven.org/maven2)
 for project org.apache.maven.plugins:maven-plugin-plugin


[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 43 seconds
[INFO] Finished at: Tue Jun 17 15:14:26 CDT 2008
[INFO] Final Memory: 1M/4M
[INFO] ------------------------------------------------------------------------

DiePVCSDie
Posts: 5
Joined: Mon May 12, 2008 10:36 pm

Postby DiePVCSDie » Tue Jun 24, 2008 9:45 pm

I can't agree more. I'm an accomplished developer that has some free time I'd like to devote to enhancing the PVCS-import functionality, but I've spent about a total of 4 hours just trying to build this project.

Maven is just ridiculously cryptic. Where are the instructions? The only documentation is a mess of Maven-jargon and the configuration files are dispersed all over the place and not easily interpreted.

Can someone please post some good instructions on how to build this project?

Thank you!

Scott

elliotp
Posts: 3
Joined: Fri May 30, 2008 12:42 pm

Postby elliotp » Wed Jun 25, 2008 7:33 pm

I will preface this post by saying that I am not a Maven expert, but I was able to successfully build the trunk excluding the Star Team module. I am not using Star Team, so I simply deleted the org.polarion.svnimporter.stprovider folder. There may be more information on this elsewhere in this forum, but I didn't look.

I believe you may have been using Maven 2.x instead of Maven 1.x. Significant changes were made between Maven 1 and 2, so projects made with one are not compatible with the other. I was able to build using Maven 1.1, which can be found in the archives at maven.apache.org.

Once Maven 1.1 is installed, enter the build directory in the source tree and type 'maven buildAll'. Note that Maven 1 is invoked using 'maven' instead of 'mvn'. Also, I used 'buildAll' instead of 'pack' as the target, since 'pack' tries to build the documentation, and I did not have a JIMI plugin needed to perform that task.

After that, Maven downloaded all of the necessary plugins, built, and executed the JUnit tests.

Hopefully this helps.

DiePVCSDie
Posts: 5
Joined: Mon May 12, 2008 10:36 pm

Postby DiePVCSDie » Wed Jun 25, 2008 9:39 pm

Thanks for the reply elliot.

I actually do have Maven1 and was able to successfully execute the buildAll target after simply removing all the *provider directories I wasn't interested in. The result of this appears to be a bunch of 'target' directories under each '*.*.*' directory. In the target directories I viewed there were jar files, a directory with the compiled class files, and some testing-related stuff.

This is about as far as I got. What I couldn't determine was a way to create the packaged executable jar file to conduct my testing with. Know how to do this?

Thanks again

elliotp
Posts: 3
Joined: Fri May 30, 2008 12:42 pm

Postby elliotp » Thu Jun 26, 2008 12:19 pm

The distribution package can be created using the 'pack' maven target. This took a little bit of updating, since I am not building the Star Team package and I am not building the documentation.

All of the changes are isolated to the pack goal in the maven.xml file. Below is a list of the changes that I made.

- Remove "buildDoc" from the pack prerequisites list
- Remove any copy file lines relating to packages that were not built (i.e. stprovider in my case)
- Remove the two lines that package the documentation (a maven:get line and the next zip command)
- Remove the final checksum computation which is for the documentation

If you run "maven pack" from the build directory, dist and packed directories should then be created. "Dist" should have what you are looking for.


Return to “Polarion SVN Importer (Repository Converter)”

Who is online

Users browsing this forum: No registered users and 2 guests