[SOLVED] trouble building from source (offline maven), 4.7.0

 add-jdbc-driver:

     (echo) maven.home = /usr/local/share/java/maven2
     (java) (INFO) 
     (java) NOTE: Maven is executing in offline mode. Any artifacts not already in your local
     (java) repository will be inaccessible.
     (java) 
     (java) (INFO) Scanning for projects...
     (java) (INFO) Searching repository for plugin with prefix: 'install'.
     (java) (INFO) ------------------------------------------------------------------------
     (java) [ERROR] BUILD ERROR
     (java) (INFO) ------------------------------------------------------------------------
     (java) (INFO) Error building POM (may not be this project's POM).
     (java) 
     (java) 
     (java) Project ID: org.apache.maven.plugins:maven-install-plugin
     (java) 
     (java) Reason: POM 'org.apache.maven.plugins:maven-install-plugin' not found in repository: System is offline.
     (java) 
     (java)   org.apache.maven.plugins:maven-install-plugin:pom:2.2
     (java) 
     (java) 
     (java)  for project org.apache.maven.plugins:maven-install-plugin
     (java) 
     (java) 
     (java) (INFO) ------------------------------------------------------------------------
     (java) (INFO) For more information, run Maven with the -e switch
     (java) (INFO) ------------------------------------------------------------------------
     (java) (INFO) Total time:
     (java) (INFO) Finished at: Fri Aug 17 17:08:41 PDT 2012
     (java) (INFO) Final Memory: 2M/122M
     (java) (INFO) ------------------------------------------------------------------------
 
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

jgh's picture
jgh
2255
Joined: Aug 27 2010 - 4:24pm
Last seen: 9 years 6 months ago

14 Answers:

http://sourceforge.net/projects/jasperserver/files/JasperServer/JasperReports%20Server%204.7.0/jasperreports-server-cp-4.7.0-maven-repository.zip/download

Do you download and extract jasperreports-server-cp-4.7.0-maven-repository.zip into folder $HOME/.m2 ?
Ching Ice-creaming's picture
Joined: Oct 22 2011 - 7:32pm
Last seen: 9 years 11 months ago
Yes. I believe I couldn't even get to this stage had I not, but either way I have done that. I am the maintainer of the FreeBSD port, and am a bit baffled by this, but then again there does seem to be some issues with each update that need to be worked out.
jgh's picture
jgh
2255
Joined: Aug 27 2010 - 4:24pm
Last seen: 9 years 6 months ago

 Here is a versbose log of the add-jdbc-driver target.



Post Edited by jgh at 08/20/2012 17:42
jgh's picture
jgh
2255
Joined: Aug 27 2010 - 4:24pm
Last seen: 9 years 6 months ago

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

tkavanagh's picture
16446
Joined: Jul 7 2006 - 8:54am
Last seen: 9 years 4 weeks ago

 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.

jgh's picture
jgh
2255
Joined: Aug 27 2010 - 4:24pm
Last seen: 9 years 6 months ago

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)

 

 

jgh's picture
jgh
2255
Joined: Aug 27 2010 - 4:24pm
Last seen: 9 years 6 months ago

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>

 

 


tkavanagh's picture
16446
Joined: Jul 7 2006 - 8:54am
Last seen: 9 years 4 weeks ago

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.

tkavanagh's picture
16446
Joined: Jul 7 2006 - 8:54am
Last seen: 9 years 4 weeks ago

 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/jasperreports-server-4.7.0-src/jasperserver-repo
     [echo]   Other Paths: 
     [echo]     maven-localrepo-path = /usr/local/workspace/ports-svn/databases/jasperserver/work/.m2/repository
     [echo]  
 
 
Failed again...
jgh's picture
jgh
2255
Joined: Aug 27 2010 - 4:24pm
Last seen: 9 years 6 months ago

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.

 

tkavanagh's picture
16446
Joined: Jul 7 2006 - 8:54am
Last seen: 9 years 4 weeks ago

 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.

jgh's picture
jgh
2255
Joined: Aug 27 2010 - 4:24pm
Last seen: 9 years 6 months ago

Hi Jason, since JasperReports Server is GPLv3, it would be best to distribute under those same terms. And that would pretty much be it.

tkavanagh's picture
16446
Joined: Jul 7 2006 - 8:54am
Last seen: 9 years 4 weeks ago

 I was thinking of distributing this on SourceForge, or another mirror based solution. Would there be any issues with this?

jgh's picture
jgh
2255
Joined: Aug 27 2010 - 4:24pm
Last seen: 9 years 6 months ago
Great, thanks!
jgh's picture
jgh
2255
Joined: Aug 27 2010 - 4:24pm
Last seen: 9 years 6 months ago
Feedback