add-jdbc-driver:
Code: |
appServerType = tomcat6 appServerDir = /usr/local/apache-tomcat-6.0 dbType = postgresql dbUsername = pgsql dbPassword = pgsql dbHost = localhost js.dbName = jasperserver maven = /usr/local/share/java/maven2/bin/mvn js-path = /usr/local/workspace/ports-svn/databases/jasperserver/work/jasperreports-server-4.7.0-src/jasperserver js-pro-path = /usr/local/workspace/ports-svn/databases/jasperserver/work/jasperreports-server-4.7.0-src/jasperserver repo-path = /usr/local/workspace/ports-svn/databases/jasperserver/work/jasperreports-server-4.7.0-src/jasperserver-repo |
Post Edited by jgh at 08/22/2012 23:57
Post Edited by jgh at 08/29/2012 00:01
14 Answers:
Do you download and extract jasperreports-server-cp-4.7.0-maven-repository.zip into folder $HOME/.m2 ?
Hi Jason,
It looks like you are running in maven offline mode. And the build is not finding the maven-install-plugin.
I assume that you have taken the jasperreports-server-cp-4.7.0-maven-repository.zip and unpacked that and you are using it for your .m2/repository (ie maven local repository).
1) Can you run in "on-line" mode for the "add-jdbc-driver" command and get the maven plugin?
2) Actually, you should not need to run the "add-jdbc-driver" command. The build steps from the JRS Source Build Guild
(<js-install>/docs/JasperReports-Server-CP-Source-Build-Guide.pdf) are the following:
- Edit and put into place a buildomatic/default_master.properties
- ./js-ant build-ce (build the source code)
- ./js-ant create-load-js-db-ce (create jasperserver database, load core bootstrap data)
- ./js-ant deploy-webapp-ce (deploy to your app server)
Does this help?
Thanks,
-Tony
Well the target I run is build-ce, then I deploy. And I am getting this:
build-ce:
(echo) maven.home = /usr/local/share/java/maven2
(java) (INFO) Scanning for projects...
(java) (INFO) Reactor build order:
(java) (INFO) Jasper Server
(java) (INFO) Jasper Server API
(java) (INFO) Jasper Server API - Common
(java) (INFO) Jasper Server API - Metadata Interfaces
(java) (INFO) Jasper Server API - Engine
(java) (INFO) Jasper Server API Implementations - All
(java) (INFO) Jasper Server API Implementations - Common
(java) (INFO) JasperServer Core Utilities
(java) (INFO) Jasper Server API Implementations - Metadata
(java) (INFO) Jasper Server API Implementations - Engine
(java) (INFO) Jasper Server Hibernate Mappings
(java) (INFO) Jasper Server Common WebServices
(java) (INFO) JasperServer Jar for Webapp
(java) (INFO) JasperServer Search
(java) (INFO) JasperServer remote services
(java) (INFO) JasperServer JAX-RS services
(java) (INFO) JasperServer server Jar for WebServices
(java) (INFO) JasperServer server Jar for REST services
(java) (INFO) JasperServer Export Import Tool
(java) (INFO) Jasper Server API
(java) (INFO) JasperServer WAR
(java) (INFO) JasperServer Export Import Tool
(java) (INFO) Jasper Server Integration Tests
(java) (INFO) ------------------------------------------------------------------------
(java) (INFO) Building Jasper Server
(java) (INFO) task-segment: [clean, package, package, install]
(java) (INFO) ------------------------------------------------------------------------
(java) Downloading: file:///var/tmp/org/apache/maven/plugins/maven-clean-plugin/2.2/maven-clean-plugin-2.2.pom
(java) (INFO) Unable to find resource 'org.apache.maven.plugins:maven-clean-plugin:pom:2.2' in repository js-repo-svn (file:///var/tmp)
(java) Downloading: http://jasperforge.org/svn/repos/maven2/org/apache/maven/plugins/maven-clean-plugin/2.2/maven-clean-plugin-2.2.pom
(java) (INFO) Unable to find resource 'org.apache.maven.plugins:maven-clean-plugin:pom:2.2' in repository JasperForge Maven Repository (http://jasperforge.org/svn/repos/maven2)
(java) Downloading: http://dist.codehaus.org//org/apache/maven/plugins/maven-clean-plugin/2.2/maven-clean-plugin-2.2.pom
(java) (INFO) Unable to find resource 'org.apache.maven.plugins:maven-cle
It doesn't see to want to find the maven repo. Utterly confused.
I am still having issues, and not able to figure out what is going on. The repository is in this location after downloaded and extracted:
/usr/local/workspace/ports-svn/databases/jasperserver/work/.m2/repository
I'm not certain why nothing is being found.
init-source-paths:
(echo)
(echo) Property values (dev.xml: init-source-paths):
(echo) Source Paths:
(echo) js-path = /usr/local/workspace/ports-svn/databases/jasperserver/work/jasperreports-server-4.7.0-src/jasperserver
(echo) js-pro-path = /usr/local/workspace/ports-svn/databases/jasperserver/work/jasperreports-server-4.7.0-src/jasperserver
(echo) repo-path = /usr/local/workspace/ports-svn/databases/jasperserver/work/.m2/repository
(echo) Other Paths:
(echo) maven-localrepo-path = /usr/local/workspace/ports-svn/databases/jasperserver/work/.m2/repository
(echo)
set-ce-webapp-name:
(copy) Copying 1 file to /usr/local/workspace/ports-svn/databases/jasperserver/work/jasperreports-server-4.7.0-src/jasperserver/buildomatic/build_conf/default
build-ce:
(echo) maven.home = /usr/local/share/java/maven2
(java) (INFO) Scanning for projects...
(java) (INFO) Reactor build order:
(java) (INFO) Jasper Server
(java) (INFO) Jasper Server API
(java) (INFO) Jasper Server API - Common
(java) (INFO) Jasper Server API - Metadata Interfaces
(java) (INFO) Jasper Server API - Engine
(java) (INFO) Jasper Server API Implementations - All
(java) (INFO) Jasper Server API Implementations - Common
(java) (INFO) JasperServer Core Utilities
(java) (INFO) Jasper Server API Implementations - Metadata
(java) (INFO) Jasper Server API Implementations - Engine
(java) (INFO) Jasper Server Hibernate Mappings
(java) (INFO) Jasper Server Common WebServices
(java) (INFO) JasperServer Jar for Webapp
(java) (INFO) JasperServer Search
(java) (INFO) JasperServer remote services
(java) (INFO) JasperServer JAX-RS services
(java) (INFO) JasperServer server Jar for WebServices
(java) (INFO) JasperServer server Jar for REST services
(java) (INFO) JasperServer Export Import Tool
(java) (INFO) Jasper Server API
(java) (INFO) JasperServer WAR
(java) (INFO) JasperServer Export Import Tool
(java) (INFO) Jasper Server Integration Tests
(java) (INFO) ------------------------------------------------------------------------
(java) (INFO) Building Jasper Server
(java) (INFO) task-segment: [clean, package, package, install]
(java) (INFO) ------------------------------------------------------------------------
(java) Downloading: file:///usr/local/workspace/ports-svn/databases/jasperserver/work/.m2/repository/org/apache/maven/plugins/maven-clean-plugin/2.2/maven-clean-plugin-2.2.pom
(java) (INFO) Unable to find resource 'org.apache.maven.plugins:maven-clean-plugin:pom:2.2' in repository js-repo-svn (file:///usr/local/workspace/ports-svn/databases/jasperserver/work/.m2/repository)
(java) Downloading: http://jasperforge.org/svn/repos/maven2/org/apache/maven/plugins/maven-clean-plugin/2.2/maven-clean-plugin-2.2.pom
(java) (INFO) Unable to find resource 'org.apache.maven.plugins:maven-clean-plugin:pom:2.2' in repository JasperForge Maven Repository (http://jasperforge.org/svn/repos/maven2)
Hi Jason,
The "repo-path" should point to the jasperserver-repo folder.
This is one of the folders included in the jasperreports-server-cp-4.7.0-src.zip package.
The jasperreports-server-cp-4.7.0-maven-repository.zip is not required for building the JRS source code. I have been including it as a convenience (but maybe this package is actually causing confusion instead!).
So, clipped from the error message above, if you change the repo-path, hopefully all would work:
[echo] Source Paths:
[echo] js-path = /usr/local/workspace/ports-svn/databases/jasperserver/work/jasperreports-server-4.7.0-src/jasperserver
[echo] js-pro-path = /usr/local/workspace/ports-svn/databases/jasperserver/work/jasperreports-server-4.7.0-src/jasperserver
[echo] repo-path = /usr/local/workspace/ports-svn/databases/jasperserver/work/.m2/repository
>>> repo-path = /usr/local/workspace/ports-svn/databases/jasperserver/work/jasperreports-server-4.7.0-src/jasperserver-repo
Also, if it doesn't work. Could you attach this file:
<path>/jasperreports-server-4.7.0-src/jasperserver/buildomatic/build_conf/default/maven_settings.xml
It should have entries like:
<repository>
<id>Repo1 Maven</id>
<url>http://repo1.maven.org/maven2/</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
<releases>
<enabled>true</enabled>
</releases>
</repository>
Or I suppose there could be an actual problem with the maven remote repositories where the maven-clean-plugin is missing. These kinds of things were problems years ago but I haven't seen such an issue for a long-time.
But I just checked on repo1.maven.org and the path to that plugin jar is valid.
init-source-paths:
Based on our offline conversation, I think the mystery is solved. If the JasperReports Server is run in "offline" mode it is definitely not guaranteed to have every 3rd party dependency resolved.
So, it is best to build in normal "online" mode and then the software can be built in offline mode.
The jasperreports-server-cp-<ver>-maven-repository.zip is not guaranteed to have every possible dependency because the Maven tool itself needs to download the plugins that it uses and other lower level dependencies. And simply having a particular maven version or a a different platform such as Windows instead of linux can cause maven to download a slightly different set of plugins.
The bottom line is that if Maven is used as the build tool, maven assumes that it can download what it needs to complete the source code build.
I agree. I was able to update the software in offline mode by building my own repository, and was able to quantify it against tomcat6 with postgresql or mysql. I assume it will work with tomcat5 or tomcat7 with no additional changes.
The only issue I am looking to answer at this point is what the legalities of distributing the repository I have created which the software will be built against, and do I need to include a disclaimer at this point.
Any thoughts or ideas, would be great to this point.