Open-MBEE / zzProjectWiki

[Deprecated]
1 stars 5 forks source link

Build Failure: mbee_util-2.1.0-SNAPSHOT.jar not exists #9

Open modulusx opened 8 years ago

modulusx commented 8 years ago

I'm following the ProjectWiki and have the 2.1 branch checked out, but when I run mvn package it is building a 2.2.0 version, which then fails the mvn install command because it built 2.2 instead of 2.1.

[openmbee@server util]$ git branch
* 2.1
 2.2

[openmbee@server util]$ git status
 # On branch 2.1
nothing to commit, working directory clean

[openmbee@server util]$ mvn package
…
[INFO] Building mbee_util 2.2.0

[openmbee@server util]$ mvn install:install-file -Dfile=target/mbee_util-2.1.0-SNAPSHOT.jar -DgroupId=gov.nasa.jpl.mbee.util -DartifactId=mbee_util -Dversion=2.1.0-SNAPSHOT -Dpackaging=jar
[INFO] Scanning for projects...
…
[INFO] Building mbee_util 2.2.0
…
[INFO] BUILD FAILURE
…
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-install-plugin:2.4:install-file (default-cli) on project mbee_util: The specified file '/home/openmbee/git/util/target/mbee_util-2.1.0-SNAPSHOT.jar' not exists -> [Help 1]

As you can see, 2.1 is missing, but 2.2 is being built and is there:

[openmbee@server util]$ ll /home/openmbee/git/util/target/
total 200
drwxrwxr-x. 3 openmbee openmbee     32 Dec  3 12:59 classes
drwxrwxr-x. 2 openmbee openmbee     27 Dec  3 12:59 maven-archiver
drwxrwxr-x. 3 openmbee openmbee     34 Dec  3 12:59 maven-status
-rw-rw-r--. 1 openmbee openmbee 116528 Dec  3 12:59 mbee_util-2.2.0.jar
-rw-rw-r--. 1 openmbee openmbee  84346 Dec  3 12:59 mbee_util-2.2.0-sources.jar

Am I missing something here?

Enquier commented 8 years ago

These instructions are now very out of date (for 2.1 only). I would recommend utilizing the 2.2 branches subsituting 2.2 where you can in these instructions and locating any missing resources you have from the 2.2 mvn-repo repository.

modulusx commented 8 years ago

Attempting to use 2.2 results in the following error when running mvn package on bae: europambee-build.jpl.nasa.gov: No address associated with hostname

$ mvn package
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for gov.nasa.jpl.mbee.bae:bae:jar:2.2.0-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for org.codehaus.mojo:build-helper-maven-plugin is missing. @ line 71, column 15
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-source-plugin is missing. @ line 59, column 10
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building bae 2.2.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
Downloading: http://europambee-build.jpl.nasa.gov:8082/artifactory/libs-snapshot-local/gov/nasa/jpl/mbee/util/mbee_util/2.2.0-SNAPSHOT/maven-metadata.xml
[WARNING] Could not transfer metadata gov.nasa.jpl.mbee.util:mbee_util:2.2.0-SNAPSHOT/maven-metadata.xml from/to artifactory-snapshot (http://europambee-build.jpl.nasa.gov:8082/artifactory/libs-snapshot-local): europambee-build.jpl.nasa.gov: No address associated with hostname
[WARNING] Failure to transfer gov.nasa.jpl.mbee.util:mbee_util:2.2.0-SNAPSHOT/maven-metadata.xml from http://europambee-build.jpl.nasa.gov:8082/artifactory/libs-snapshot-local was cached in the local repository, resolution will not be reattempted until the update interval of artifactory-snapshot has elapsed or updates are forced. Original error: Could not transfer metadata gov.nasa.jpl.mbee.util:mbee_util:2.2.0-SNAPSHOT/maven-metadata.xml from/to artifactory-snapshot (http://europambee-build.jpl.nasa.gov:8082/artifactory/libs-snapshot-local): europambee-build.jpl.nasa.gov: No address associated with hostname
Downloading: http://europambee-build.jpl.nasa.gov:8082/artifactory/libs-snapshot-local/gov/nasa/jpl/mbee/sysml/sysml/2.2.0-SNAPSHOT/maven-metadata.xml
[WARNING] Could not transfer metadata gov.nasa.jpl.mbee.sysml:sysml:2.2.0-SNAPSHOT/maven-metadata.xml from/to artifactory-snapshot (http://europambee-build.jpl.nasa.gov:8082/artifactory/libs-snapshot-local): europambee-build.jpl.nasa.gov
[WARNING] Failure to transfer gov.nasa.jpl.mbee.sysml:sysml:2.2.0-SNAPSHOT/maven-metadata.xml from http://europambee-build.jpl.nasa.gov:8082/artifactory/libs-snapshot-local was cached in the local repository, resolution will not be reattempted until the update interval of artifactory-snapshot has elapsed or updates are forced. Original error: Could not transfer metadata gov.nasa.jpl.mbee.sysml:sysml:2.2.0-SNAPSHOT/maven-metadata.xml from/to artifactory-snapshot (http://europambee-build.jpl.nasa.gov:8082/artifactory/libs-snapshot-local): europambee-build.jpl.nasa.gov
Enquier commented 8 years ago

If you have properly installed the dependencies to your local mvn repository then you will need to change the pom.xml "" to

local-repository local file://${user.home}/.m2/repository

or edit the existing repos to point at your artifact server (if you are using one).

On Wed, Feb 3, 2016 at 1:32 PM, Matt Kunkel notifications@github.com wrote:

Attempting to use 2.2 results in the following error when running mvn package on bae: europambee-build.jpl.nasa.gov http://europambee-build.jpl.nasa.gov: No address associated with hostname

$ mvn package [INFO] Scanning for projects... [WARNING] [WARNING] Some problems were encountered while building the effective model for gov.nasa.jpl.mbee.bae:bae:jar:2.2.0-SNAPSHOT [WARNING] 'build.plugins.plugin.version' for org.codehaus.mojo:build-helper-maven-plugin is missing. @ line 71, column 15 [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-source-plugin is missing. @ line 59, column 10 [WARNING] [WARNING] It is highly recommended to fix these problems because they threaten the stability of your build. [WARNING] [WARNING] For this reason, future Maven versions might no longer support building such malformed projects. [WARNING] [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building bae 2.2.0-SNAPSHOT [INFO] ------------------------------------------------------------------------ Downloading: http://europambee-build.jpl.nasa.gov:8082/artifactory/libs-snapshot-local/gov/nasa/jpl/mbee/util/mbee_util/2.2.0-SNAPSHOT/maven-metadata.xml [WARNING] Could not transfer metadata gov.nasa.jpl.mbee.util:mbee_util:2.2.0-SNAPSHOT/maven-metadata.xml from/to artifactory-snapshot (http://europambee-build.jpl.nasa.gov:8082/artifactory/libs-snapshot-local): europambee-build.jpl.nasa.gov: No address associated with hostname [WARNING] Failure to transfer gov.nasa.jpl.mbee.util:mbee_util:2.2.0-SNAPSHOT/maven-metadata.xml from http://europambee-build.jpl.nasa.gov:8082/artifactory/libs-snapshot-local was cached in the local repository, resolution will not be reattempted until the update interval of artifactory-snapshot has elapsed or updates are forced. Original error: Could not transfer metadata gov.nasa.jpl.mbee.util:mbee_util:2.2.0-SNAPSHOT/maven-metadata.xml from/to artifactory-snapshot (http://europambee-build.jpl.nasa.gov:8082/artifactory/libs-snapshot-local): europambee-build.jpl.nasa.gov: No address associated with hostname Downloading: http://europambee-build.jpl.nasa.gov:8082/artifactory/libs-snapshot-local/gov/nasa/jpl/mbee/sysml/sysml/2.2.0-SNAPSHOT/maven-metadata.xml [WARNING] Could not transfer metadata gov.nasa.jpl.mbee.sysml:sysml:2.2.0-SNAPSHOT/maven-metadata.xml from/to artifactory-snapshot (http://europambee-build.jpl.nasa.gov:8082/artifactory/libs-snapshot-local): europambee-build.jpl.nasa.gov [WARNING] Failure to transfer gov.nasa.jpl.mbee.sysml:sysml:2.2.0-SNAPSHOT/maven-metadata.xml from http://europambee-build.jpl.nasa.gov:8082/artifactory/libs-snapshot-local was cached in the local repository, resolution will not be reattempted until the update interval of artifactory-snapshot has elapsed or updates are forced. Original error: Could not transfer metadata gov.nasa.jpl.mbee.sysml:sysml:2.2.0-SNAPSHOT/maven-metadata.xml from/to artifactory-snapshot (http://europambee-build.jpl.nasa.gov:8082/artifactory/libs-snapshot-local): europambee-build.jpl.nasa.gov

— Reply to this email directly or view it on GitHub https://github.com/Open-MBEE/ProjectWiki/issues/9#issuecomment-179417821 .

-Chas

modulusx commented 8 years ago

I followed the wiki to clone the github repos as instructed by the project wiki (which I know is out of date and not maintained), so I probably haven't installed the required dependencies and don't know what they are or where to find out.

pom.xml is in the bae repo, so if its incorrect, shouldn't the repo be updated?

gpgreen commented 8 years ago

The maven build process will give you that error every time as long as you haven't edited the pom.xml to point to your repository. The error is not fatal however, as long as the dependencies are in your local maven artifact repository (on your build machine, ~/.m2/repo on unix). This repository is searched if the one in the pom file is unreachable.

You have to finish the following step in the wiki for all the required jars: Build Jar files in particular step v of this section is the one that copies the jar files to your local repo. I just use mvn:install, without doing all the rest of the switches as they are now correct in the individual pom files.

One thing that didn't work for me several weeks ago, is building the klang library from source. I took the binary from the other github project and installed it in my local maven repo to get around that. At some point the build process should get fixed so that won't be necessary

modulusx commented 8 years ago

Thanks but that doesn't seem to help either. The first fatal error appears to be related to junit

[ERROR] /home/aamrkunkel/bae/src/gov/nasa/jpl/ae/event/EffectInstance.java:[17,23] package junit.framework does not exist

junit is not listed in the pom.xml's dependencies, and not located in ~/.m2/repository

modulusx commented 8 years ago

I tried adding the junit dependency to pom.xml, but it installed to .m2/repository/junit/junit and mvn is looking for it in .m2/repository/org/junit. So I symlink'd it, and now I'm getting the following error

[ERROR] /home/aamrkunkel/bae/src/gov/nasa/jpl/ae/sysml/SystemModelToAeExpression.java:[410,26] method getTypeString in interface sysml.SystemModel<E,C,T,P,N,I,U,R,V,W,CT> cannot be applied to given types;
  required: capture#1 of ?,java.lang.Object
  found: java.lang.Object,<nulltype>
  reason: actual argument java.lang.Object cannot be converted to capture#1 of ? by method invocation conversion
gpgreen commented 8 years ago

I haven't seen any build errors related to junit. However the util project does need to have java 1.7 specified in the build, which will fix the type of errors that you just listed. See my pull request:

https://github.com/Open-MBEE/util/pull/3

crumgary commented 8 years ago

I'm also seeing same error modulusx mentioned: [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project bae: Compilation failure: Compilation failure: [ERROR] /home/gcrum/projects/openmbee_fork/bae/src/gov/nasa/jpl/ae/sysml/SystemModelToAeExpression.java:[410,26] method getTypeString in interface sysml.SystemModel<E,C,T,P,N,I,U,R,V,W,CT> cannot be applied to given types; [ERROR] required: capture#1 of ?,java.lang.Object [ERROR] found: java.lang.Object, [ERROR] reason: actual argument java.lang.Object cannot be converted to capture#1 of ? by method invocation conversion

I've forked util, sysml and bae and applied Open-MBEE/util#3 along with a couple other small fixes (had to change util version to include SNAPSHOT since sysml and bae expected that version)

I'm on a fresh CentOS7 virtualbox setup, to reproduce my build: git clone https://github.com/crumgary/util.git git clone https://github.com/crumgary/sysml.git git clone https://github.com/crumgary/bae.git

cd util mvn package; mvn install cd ../sysml mvn package; mvn install cd ../bae mvn package -e -X

Here is the build output: debuglog.txt

Any thoughts?

pykors commented 8 years ago

@modulusx or @crumgary - did you ever figure out how to get past the getTypeString compile error? I'm stuck at exactly the same point.

The only other piece of information I can add is that switching to Java 1.8 doesn't affect the problem.