Looking for 2.0 Maven Repository Feedback

2.0 RC3 should be available on Maven.  If anyone who knows more about maven could make sure that the packaging and deployment seem seem to be correct and working, could you check it out and let me know?

Nathan

Just performed an SVN update, but am seeing the following:

    Scanning for projects... [ERROR] The build could not read 1 project -> [Help 1] [ERROR]  The project org.liquibase:liquibase:2.0-rc4-SNAPSHOT (C:\Workspace\liquibase\pom.xml) has 1 error [ERROR]    'profiles.profile[default].repositories.repository[sonatype-repositories].url' is missing. [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException

Commenting out the section allows it to build again - but then it’s failing on some of the tests:

Tests in error:
  validate(liquibase.change.core.AddNotNullConstraintChangeTest)
  validate(liquibase.change.core.DropNotNullConstraintChangeTest)
  validate(liquibase.change.core.AddLookupTableChangeTest)

They are all failing with Null Pointer Exceptions of the format:

    Test set: liquibase.change.core.AddNotNullConstraintChangeTest

Tests run: 6, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.031 sec <<< FAILURE!
getRefactoringName(liquibase.change.core.AddNotNullConstraintChangeTest)  Time elapsed: 0 sec
generateStatement(liquibase.change.core.AddNotNullConstraintChangeTest)  Time elapsed: 0 sec
getConfirmationMessage(liquibase.change.core.AddNotNullConstraintChangeTest)  Time elapsed: 0 sec
generateCheckSum(liquibase.change.core.AddNotNullConstraintChangeTest)  Time elapsed: 0 sec
isSupported(liquibase.change.core.AddNotNullConstraintChangeTest)  Time elapsed: 0.015 sec
validate(liquibase.change.core.AddNotNullConstraintChangeTest)  Time elapsed: 0.016 sec  <<< ERROR!
java.lang.NullPointerException
at liquibase.database.AbstractDatabase.getDatabaseMajorVersion(AbstractDatabase.java:129)
at liquibase.sqlgenerator.core.SetNullableGenerator.validate(SetNullableGenerator.java:38)
at liquibase.sqlgenerator.core.SetNullableGenerator.validate(SetNullableGenerator.java:19)
at liquibase.sqlgenerator.SqlGeneratorChain.validate(SqlGeneratorChain.java:46)
at liquibase.sqlgenerator.SqlGeneratorFactory.validate(SqlGeneratorFactory.java:160)
at liquibase.change.AbstractChange.validate(AbstractChange.java:92)
at liquibase.change.AbstractChangeTest.validate(AbstractChangeTest.java:279)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

Ben

PS - this is in the current trunk

My goal with the profile block was because if the checksums failed, sonatype would not let me deploy it, which was causing problems for me.  It turned out to be a maven issue, and upgrading to 2.2.1 fixed it, so I probably don’t need it anymore and removed it.

I also fixed the tests, thanks for noticing that.  I’m not sure why my release didn’t fail with them.

Can you tell how the repository looks?  Did they make it correctly to the central maven repository correctly?

Nathan

Thanks. I’m afraid I’m not a maven pro so can’t comment.

Ben

Personally I not yet publish any artifact to the central repository. I’m the “client” of the maven artifacts only and can not say how it could be handled right in context of the maven repository layout.

What I can state, there are no liquibase artifact at central maven repository. Therefore we have to specify in my project super-pom a reference to the sonatype’s repository. Reading http://maven.apache.org/pom.html#Repositories, it should looks like

    ...
    <repositories>
    	<repository>
    		<releases>
    			<enabled>false</enabled>
    			<updatePolicy>always</updatePolicy>
    			<checksumPolicy>warn</checksumPolicy>
    		</releases>
    		<snapshots>
    			<enabled>true</enabled>
    			<updatePolicy>never</updatePolicy>
    			<checksumPolicy>fail</checksumPolicy>
    		</snapshots>
    		<id>codehausSnapshots</id>
    		<name>Codehaus Snapshots</name>
    

               https://oss.sonatype.org/service/local/staging/deploy/maven2
    default





    true
    always
    warn


    false
    never
    fail

    codehausSnapshots
    Codehaus Snapshots
               https://oss.sonatype.org/service/local/staging/deploy/maven2
    default



Work with release version is broken because of authorization issues.

    [INFO] Scanning for projects... [INFO]                                                                         [INFO] ------------------------------------------------------------------------ [INFO] Building Update Mischung db 2.0-SNAPSHOT [INFO] ------------------------------------------------------------------------ [WARNING] Unable to get artifact org.liquibase:liquibase-maven-plugin:maven-plugin:2.0-rc3 from repository codehausSnapshots (https://oss.sonatype.org/service/local/staging/deploy/maven2): Authorization failed: Access denied to: https://oss.sonatype.org/service/local/staging/deploy/maven2/org/liquibase/liquibase-maven-plugin/2.0-rc3/liquibase-maven-plugin-2.0-rc3.jar [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 1.813s [INFO] Finished at: Fri Jul 30 13:54:40 CEST 2010 [INFO] Final Memory: 3M/15M [INFO] ------------------------------------------------------------------------ [ERROR] Plugin org.liquibase:liquibase-maven-plugin:2.0-rc3 or one of its dependencies could not be resolved: Authorization failed: Access denied to: https://oss.sonatype.org/service/local/staging/deploy/maven2/org/liquibase/liquibase-maven-plugin/2.0-rc3/liquibase-maven-plugin-2.0-rc3.jar  org.liquibase:liquibase-maven-plugin:maven-plugin:2.0-rc3

    from the specified remote repositories:
     codehausSnapshots (https://oss.sonatype.org/service/local/staging/deploy/maven2, releases=true, snapshots=false),
     central (http://repo1.maven.org/maven2, releases=true, snapshots=false)
    -> [Help 1]
    [ERROR]
    [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
    [ERROR] Re-run Maven using the -X switch to enable full debug logging.
    [ERROR]
    [ERROR] For more information about the errors and possible solutions, please read the following articles:
    [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException

Trying access to snapshot repository (note swaped boolean flags for releases and snapshot attributes):

    false always warn true never fail codehausSnapshots Codehaus Snapshots            https://oss.sonatype.org/content/repositories/snapshots default false always warn true never fail codehausSnapshots Codehaus Snapshots            https://oss.sonatype.org/content/repositories/snapshots default

… getting another type of failure:

    C:\dev\reckitt\MischungAppl\trunk\mischung-dbupdate\mischung>mvn compile
    [INFO] Scanning for projects…
    [INFO]
    [INFO] ------------------------------------------------------------------------
    [INFO] Building Update Mischung db 2.0-SNAPSHOT
    [INFO] ------------------------------------------------------------------------
    [INFO] snapshot org.liquibase:liquibase-maven-plugin:2.0-rc4-SNAPSHOT: checking for updates from codehausSnapshots
    Downloading: https://oss.sonatype.org/content/repositories/snapshots/org/liquibase/liquibase-maven-plugin/2.0-rc4-SNAPSHOT/liquibase-maven-plugin-2.0-rc4-20100726.063607-2.jar
    Downloaded: https://oss.sonatype.org/content/repositories/snapshots/org/liquibase/liquibase-maven-plugin/2.0-rc4-SNAPSHOT/liquibase-maven-plugin-2.0-rc4-20100726.063607-2.jar (37 KB at 18.1 KB/sec)
    [INFO]
    [INFO] — maven-resources-plugin:2.4.2:resources (default-resources) @ mischung —
    [WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
    [INFO] Copying 88 resources
    [INFO]
    [INFO] — maven-compiler-plugin:2.3:compile (default-compile) @ mischung —
    [INFO] Nothing to compile - all classes are up to date
    [INFO]
    [INFO] — liquibase-maven-plugin:2.0-rc4-SNAPSHOT:updateSQL (generate-step) @ mischung —
    Downloading: https://oss.sonatype.org/content/repositories/snapshots/org/liquibase/liquibase-maven-plugin/2.0-rc4-SNAPSHOT/liquibase-maven-plugin-2.0-rc4-20100726.063607-2.pom
    Downloaded: https://oss.sonatype.org/content/repositories/snapshots/org/liquibase/liquibase-maven-plugin/2.0-rc4-SNAPSHOT/liquibase-maven-plugin-2.0-rc4-20100726.063607-2.pom (2 KB at 1.9 KB/sec)
    [INFO] snapshot org.liquibase:liquibase:2.0-rc4-SNAPSHOT: checking for updates from codehausSnapshots
    Downloading: https://oss.sonatype.org/content/repositories/snapshots/org/liquibase/liquibase/2.0-rc4-SNAPSHOT/liquibase-2.0-rc4-SNAPSHOT.pom
    [INFO] ------------------------------------------------------------------------
    [INFO] BUILD FAILURE
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time: 17.703s
    [INFO] Finished at: Fri Jul 30 14:01:59 CEST 2010
    [INFO] Final Memory: 4M/15M
    [INFO] ------------------------------------------------------------------------
    [ERROR] Failed to execute goal org.liquibase:liquibase-maven-plugin:2.0-rc4-SNAPSHOT:updateSQL (generate-step) on project mischung: Execution generate-step of goal org.
    liquibase:liquibase-maven-plugin:2.0-rc4-SNAPSHOT:updateSQL failed: Plugin org.liquibase:liquibase-maven-plugin:2.0-rc4-SNAPSHOT or one of its dependencies could not be
    resolved: Unable to get dependency information for org.liquibase:liquibase-maven-plugin:maven-plugin:2.0-rc4-SNAPSHOT: Failed to process POM for org.liquibase:liquibas
    e-maven-plugin:maven-plugin:2.0-rc4-SNAPSHOT: Non-resolvable parent POM org.liquibase:liquibase:2.0-rc4-SNAPSHOT for org.liquibase:liquibase-maven-plugin:2.0-rc4-SNAPSH
    OT: Failed to resolve POM for org.liquibase:liquibase:2.0-rc4-SNAPSHOT due to Missing:

  1. org.liquibase:liquibase:pom:2.0-rc4-SNAPSHOT

1 required artifact is missing.

for artifact:
 org.liquibase:liquibase:pom:2.0-rc4-SNAPSHOT

from the specified remote repositories:
 codehausSnapshots (https://oss.sonatype.org/content/repositories/snapshots, releases=false, snapshots=true),
 central (http://repo1.maven.org/maven2, releases=true, snapshots=false)
-> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException

Looks like parent POM artifact (org.liquibase:liquibase:pom:2.0-rc4-SNAPSHOT) should also be deployed to the server.

2.0-rc3 doesn’t work from central repository because it’s missing reference (to parent) “org.liquibase:liquibase:2.0-rc3” which is not deployed anywhere that I can find.

Could someone fix this please?
Thanks.
-v

I see that now too.  There should be a new RC4 build today or tomorrow that will include it.

Nathan

Originally posted by: Nathan
Can you tell how the repository looks?  Did they make it correctly to the central maven repository correctly? Nathan

look at you .m2 local repository layout.
Usually it’s located on ~/.m2/repository or %USERPROFILE%.m2\repository.
then org/liqubase/
then →
liquibase-integration-tests
liquibase-core
liquibase
liquibase-maven-plugin
contrib

on the servers exists only
liquibase-core and liquibase-maven-plugin

folder liquibase is missing.

in this folder should be placed ‘2.0-rc3’ folder with pom.xml as a “parent” pom for other two artifacts. Note artifact org.liquibase:liquibase-integration-tests has a relative huge size. I’m not recommending load it on the sonatype repository.