Thursday, January 4, 2007

Started Task #2

I'm going to download and install Maven. I don't think I've worked with software proj management tool before.. so this should be challenging.

11 comments:

PD said...

Downloaded and installed Maven successfully.

PD said...

I am having a problem doing the build. Here's what I did:
- I started the hsqldb server
- I tried to do the build in the schemacrawler directory, using mvn site. I got these warnings..

[WARNING] Unable to get resource from repository codehaus.org (http://repository
.codehaus.org)
Downloading: http://repo1.maven.org/maven2/net/sourceforge/findbugs/bcel/5.1/bce
l-5.1.pom
212b downloaded
Downloading: http://repository.codehaus.org/asm/asm/3.0_RC1/asm-3.0_RC1.jar
[WARNING] Unable to get resource from repository codehaus.org (http://repository
.codehaus.org)
Downloading: http://repo1.maven.org/maven2/asm/asm/3.0_RC1/asm-3.0_RC1.jar
41K downloaded
Downloading: http://repository.codehaus.org/net/sourceforge/findbugs/bcel/5.1/bc
el-5.1.jar
[WARNING] Unable to get resource from repository codehaus.org (http://repository
.codehaus.org)
Downloading: http://repo1.maven.org/maven2/net/sourceforge/findbugs/bcel/5.1/bce
l-5.1.jar
518K downloaded
Downloading: http://repository.codehaus.org/net/sourceforge/findbugs/findbugs/1.
1.1/findbugs-1.1.1.jar
[WARNING] Unable to get resource from repository codehaus.org (http://repository
.codehaus.org)
Downloading: http://repo1.maven.org/maven2/net/sourceforge/findbugs/findbugs/1.1
.1/findbugs-1.1.1.jar
1209K downloaded
Downloading: http://repository.codehaus.org/net/sourceforge/findbugs/coreplugin/
1.1.1/coreplugin-1.1.1.jar
[WARNING] Unable to get resource from repository codehaus.org (http://repository
.codehaus.org)
Downloading: http://repo1.maven.org/maven2/net/sourceforge/findbugs/coreplugin/1
.1.1/coreplugin-1.1.1.jar
517K downloaded
Downloading: http://repository.codehaus.org/dom4j/dom4j/1.3/dom4j-1.3.jar
[WARNING] Unable to get resource from repository codehaus.org (http://repository
.codehaus.org)

PD said...

I also got this message at the end:

[WARNING] Unable to get resource from repository central (http://repo1.maven.org
/maven2)
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Failed to resolve artifact.

Missing:
----------
1) schemacrawler:dbconnector:jar:4.1

Try downloading the file manually from the project website.

Then, install it using the command:
mvn install:install-file -DgroupId=schemacrawler -DartifactId=dbconnector
\
-Dversion=4.1 -Dpackaging=jar -Dfile=/path/to/file

Path to dependency:
1) schemacrawler:schemacrawler:jar:4.1
2) schemacrawler:dbconnector:jar:4.1

----------
1 required artifact is missing.

for artifact:
schemacrawler:schemacrawler:jar:4.1

from the specified remote repositories:
central (http://repo1.maven.org/maven2)


[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1 minute 39 seconds
[INFO] Finished at: Fri Jan 05 14:04:37 EST 2007
[INFO] Final Memory: 24M/43M
[INFO] ------------------------------------------------------------------------

PD said...

Do I need to build a dbconnector jar before I build schemacrawler?

Sualeh Fatehi said...

1. You will need to run maven a few times over for all the jars get downloaded. Maven does have issues downloading jars.

2. You can compile all subprojects at once, in which case the interdependencies will be taken care of. That is, rnu Maven from the top level directory.

PD said...

I ran mvn from the top level, i.e dbconnector, schemacrawler etc are sub directories in this directory. It gives me a bunch of errors actually, and I don't know where to even start resolving them.. Here's one of the messages:

The following classes needed for analysis were missing:
sf.util.Entities$ArrayEntityMap
junit.framework.TestCase
sf.util.Entities$EntityMap
junit.framework.Assert
sf.util.CommandLineParser$BaseOption
sf.util.Entities$MapIntMap

I'm assuming these are your classes.. Where can I find them?

Another error (occurs many times):

[ERROR] ResourceManager : unable to find resource 'VM_global_library.vm' in any
resource loader.

PD said...

And I didn't understand what you meant by running maven a few times.. what does that mean?

Sualeh Fatehi said...

1. Make sure that you have all the code for SchemaCrawler. If required, delete all the downloaded code, and check it out agian from Subversion.

2. Make sure that you can get Maven to do a clean compile. Try:
mvn clean compile
If this gives errors, try it over again, until Maven can download all of the jars that it needs.

PD said...

Weird.. After trying several times yesterday with not success, today when I compiled, it said Build Successful.. I didn't change anything.

PD said...

I am going to download and set up Eclipse.

Sualeh Fatehi said...

Maven is funny that way. The good news is that once you have the Maven build going, it usually works after that.

Glad that you have started with the Eclipse task.