cassandra-migration
cassandra-migration copied to clipboard
no main manifest attribute, in target/cassandra-migration-1.0.jar
Hi, We’re working with Cassandra in a project, And I’m trying to use cassandra-migration library for migrations using CQL files.
I couldn’t understand how I run the migrations from command line.
I created a pom.xml
with dependency to cassandra-migration.
And a db/migrations
folder with one CQL file.
Then I run mvn install
And java -jar \ -Dcassandra.migration.keyspace.name=audit \ target/cassandra-migration-1.0.jar migrate
But I get: no main manifest attribute, in target/cassandra-migration-1.0.jar
Is there someone who can help me get it running?
Thanks a lot!
That's my pom.xml file (then I just run mvn install):
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd http://www.w3.org/2001/XMLSchema-instance ">
<modelVersion>4.0.0</modelVersion>
<groupId>com.lifion</groupId>
<version>1.0</version>
<artifactId>cassandra-migration</artifactId>
<name>Cassandra Migration</name>
<dependencies>
<dependency>
<groupId>com.contrastsecurity</groupId>
<artifactId>cassandra-migration</artifactId>
<version>0.6</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<!-- Build an executable JAR -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.4</version>
<configuration>
<archive>
<manifest>
<addClasspath>true</addClasspath>
<classpathPrefix>lib/</classpathPrefix>
<mainClass>com.contrastsecurity.cassandra.migration.CassandraMigration</mainClass>
</manifest>
</archive>
</configuration>
</plugin>
</plugins>
</build>
</project>