problems with Weld archetype or Maven repo?
asookazian Jan 29, 2010 11:37 PMI'm following these instructions:
http://seamframework.org/Documentation/WeldQuickstartForMavenUsers
I have the Maven project generated by m2eclipse plugin in Eclipse workspace for weld-jsf-jee.
I am getting this:
C:\Documents and Settings\asookazian\workspace\weld-archetype\full>mvn package j boss:hard-deploy [INFO] Scanning for projects... [INFO] ------------------------------------------------------------------------ [ERROR] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Required goal not found: jboss:hard-deploy in org.codehaus.mojo:jboss-mav en-plugin:1.3.1 [INFO] ------------------------------------------------------------------------ [INFO] For more information, run Maven with the -e switch [INFO] ------------------------------------------------------------------------ [INFO] Total time: < 1 second [INFO] Finished at: Fri Jan 29 14:24:48 PST 2010 [INFO] Final Memory: 4M/7M [INFO] ------------------------------------------------------------------------
I have archetype-catalog.xml here: C:\Documents and Settings\asookazian\.m2
and this in C:\java\apache-maven-2.2.1\conf\settings.xml:
<profiles> <profile> <id>environment</id> <activation> <activeByDefault>true</activeByDefault> </activation> <properties> <jboss.home>/java/jboss-6.0.0.M1</jboss.home> </properties> </profile> </profiles>
Here is the full pom.xml for my project:
<?xml version="1.0" encoding="UTF-8"?> <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/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>org.example</groupId> <artifactId>full</artifactId> <packaging>war</packaging> <name>full</name> <version>1.0.0-SNAPSHOT</version> <properties> <!-- Explicitly declaring the source encoding eliminates the following message: [WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent! --> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <!-- To set the jboss.home environment variable the Maven way, set the jboss.home property in an active profile in the Maven 2 settings.xml file --> <jboss.home>${env.JBOSS_HOME}</jboss.home> <jboss.domain>default</jboss.domain> <!-- The version of Weld extensions in use --> <weld.extensions.version>1.0.0-CR2</weld.extensions.version> </properties> <repositories> <!-- Several key Java EE APIs and RIs are missing from the Maven Central Repository --> <!-- The goal is to eventually eliminate the reliance on the JBoss repository --> <repository> <id>repository.jboss.org</id> <name>JBoss Repository</name> <url>http://repository.jboss.org/maven2</url> </repository> </repositories> <dependencyManagement> <dependencies> <!-- Import scope will provide versions for dependencies below. --> <dependency> <groupId>org.jboss.weld</groupId> <artifactId>weld-extensions-bom</artifactId> <version>${weld.extensions.version}</version> <type>pom</type> <scope>import</scope> </dependency> </dependencies> </dependencyManagement> <dependencies> <!-- CDI (JSR-299) --> <dependency> <groupId>javax.enterprise</groupId> <artifactId>cdi-api</artifactId> <scope>provided</scope> </dependency> <!-- EJB --> <dependency> <groupId>org.jboss.ejb3</groupId> <artifactId>jboss-ejb3-api</artifactId> <scope>provided</scope> <version>3.1.0</version> </dependency> <!-- Common annotations (e.g., @PostConstruct, @PreDestroy, @Generated, @Resource) --> <dependency> <groupId>javax.annotation</groupId> <artifactId>jsr250-api</artifactId> <scope>provided</scope> </dependency> <!-- Bean Validation (JSR-303) --> <dependency> <groupId>javax.validation</groupId> <artifactId>validation-api</artifactId> <scope>provided</scope> </dependency> <!-- Bean Validation Implementation --> <!-- Provides portable constraints such as @NotEmpty, @Email and @Url --> <!-- Hibernate Validator is only the JSR-303 implementation at the moment, so we can assume it's provided --> <dependency> <groupId>org.hibernate</groupId> <artifactId>hibernate-validator</artifactId> <version>4.0.0.GA</version> <scope>provided</scope> </dependency> <!-- JSF --> <dependency> <groupId>javax.faces</groupId> <artifactId>jsf-api</artifactId> <scope>provided</scope> </dependency> <!-- JPA --> <dependency> <groupId>javax.persistence</groupId> <artifactId>persistence-api</artifactId> <scope>provided</scope> </dependency> <!-- Optional, but highly recommended. --> <dependency> <groupId>org.testng</groupId> <artifactId>testng</artifactId> <version>5.10</version> <scope>test</scope> <classifier>jdk15</classifier> </dependency> <!-- Needed on JBoss AS as EL is out of date --> <dependency> <groupId>org.glassfish.web</groupId> <artifactId>el-impl</artifactId> <scope>runtime</scope> <!-- FIXME this version should be in the Weld API BOM --> <version>2.1.2-b04</version> <exclusions> <exclusion> <groupId>javax.el</groupId> <artifactId>el-api</artifactId> </exclusion> </exclusions> </dependency> </dependencies> <build> <finalName>${artifactId}</finalName> <plugins> <!-- Compiler plugin enforces Java 1.6 compatiblity --> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <configuration> <source>1.6</source> <target>1.6</target> </configuration> </plugin> <!-- Eclipse plugin can force download of source and JavaDoc jars --> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-eclipse-plugin</artifactId> <configuration> <wtpversion>2.0</wtpversion> <!-- <downloadSources>true</downloadSources> <downloadJavadocs>true</downloadJavadocs> --> </configuration> </plugin> <!-- Configure the JBoss AS Maven deploy plugin --> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>jboss-maven-plugin</artifactId> <configuration> <jbossHome>${jboss.home}</jbossHome> <serverName>${jboss.domain}</serverName> <fileNames> <fileName>${project.build.directory}/${build.finalName}.war</fileName> </fileNames> </configuration> </plugin> </plugins> </build> </project>
JBOSS_HOME = C:\java\jboss-6.0.0.M1
What am I missing?