Hi!
I have a maven 2 issue I have not seen earlier, hopefully some of you have:
First a bit of module structure. My module structure looks like this:
common
bm_shcemas
bm_businessinterface
common holds the mother pom of bm_schemas and bm_businessinteface.
bm_businessinterface has a compile dependency to the bm_schemas module. If I
clean install these two modules separately, first bm_schemas, then
bm_businessinterface. Everything runs smoothly, and both install just fine.
But if I try to clean install from the common directory, I get ClassNotFound
/ Package Not Found Errors in bm_businessinterface. It misses classes from
bm_schemas.
It looks like bm_schemas is built perfectly, and the jar copied to my m2
repo:
___________________
[INFO] Scanning for projects...
[INFO] Reactor build order:
[INFO] sb1-portal-modules-common-pom
[INFO] bm_schemas
[INFO] bm_businessinterface
[INFO]
------------------------------------------------------------------------
[INFO] Building sb1-portal-modules-common-pom
[INFO] task-segment: [clean, install]
[INFO]
------------------------------------------------------------------------
[INFO] [clean:clean]
[INFO] [site:attach-descriptor]
[INFO] [install:install]
[INFO] Installing C:\upgrade\portal\modules\common\pom.xml to C:\Documents
and
Settings\vidar.moe\.m2\repository\sb1-portal\sb1-portal-modules-common-pom\5
.0.0\sb1-portal-modules-common-pom-5.0.0.pom
[INFO] [dependency:copy {execution: copy-installed}]
[INFO] Configured Artifact:
sb1-portal:sb1-portal-modules-common-pom:5.0.0:pom
[INFO] Copying sb1-portal-modules-common-pom-5.0.0.pom to
C:\upgrade\portal\applications\sb1-portal-ear\EarContent\APP-INF\lib\sb1-por
tal-modules-common-pom-5.0.0.pom
[INFO]
------------------------------------------------------------------------
[INFO] Building bm_schemas
..
stage:
[delete] Deleting directory
C:\upgrade\portal\modules\common\bm_schemas\.staging
[mkdir] Created dir:
C:\upgrade\portal\modules\common\bm_schemas\.staging
[copy] Copying 3189 files to
C:\upgrade\portal\modules\common\bm_schemas\.staging
[copy] Copying 3101 files to
C:\upgrade\portal\modules\common\bm_schemas\.staging
archive:
[zip] Building zip:
C:\upgrade\portal\modules\common\bm_schemas\bm_schemas.jar
[INFO] Executed tasks
[INFO] [install:install]
[INFO] Installing
C:\upgrade\portal\modules\common\bm_schemas\.\bm_schemas.jar to C:\Documents
and
Settings\vidar.moe\.m2\repository\sb1-portal\bm_schemas\5.0.0\bm_schemas-5.0
.0.jar
[INFO] [dependency:copy {execution: copy-installed}]
[INFO] Configured Artifact: sb1-portal:bm_schemas:5.0.0:workshopjar
[INFO] Copying bm_schemas-5.0.0.jar to
C:\upgrade\portal\applications\sb1-portal-ear\EarContent\APP-INF\lib\bm_sche
mas-5.0.0.jar
[INFO]
------------------------------------------------------------------------
[INFO] Building bm_businessinterface
[INFO] task-segment: [clean, install]
[INFO]
------------------------------------------------------------------------
[INFO] [clean:clean]
[INFO] Deleting directory
C:\upgrade\portal\modules\common\bm_businessinterface\target
[INFO] [resources:resources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:compile]
[INFO] Compiling 22 source files to
C:\upgrade\portal\modules\common\bm_businessinterface\target\classes
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO]
------------------------------------------------------------------------
[INFO] Compilation failure
C:/upgrade/portal/modules/common/bm_businessinterface/src/main/java/sb1/biz/
bm/filetransfer/businessinterface/IFiletransfer.java:[11,46] package
com.edb.cps.webservices.common.transvo does not exist
C:/upgrade/portal/modules/common/bm_businessinterface/src/main/java/sb1/biz/
bm/filetransfer/businessinterface/IFiletransfer.java:[12,46] package
com.edb.cps.webservices.common.transvo does not exist
C:/upgrade/portal/modules/common/bm_businessinterface/src/main/java/sb1/biz/
bm/filetransfer/businessinterface/IFiletransfer.java:[13,58] package
com.edb.cps.webservices.filearchive.common.transvo does not exist
C:/upgrade/portal/modules/common/bm_businessinterface/src/main/java/sb1/biz/
bm/filetransfer/businessinterface/IFiletransfer.java:[14,58] package
com.edb.cps.webservices.filearchive.common.transvo does not exist
_______________
But as you can see, I get errors for the bm_businessinterface module.
If I now go into bm_businessinterface and clean install just this module, it
successfully installs:
_________________
C:\upgrade\portal\modules\common\bm_businessinterface>mvn clean install
[INFO] Scanning for projects...
[INFO]
------------------------------------------------------------------------
[INFO] Building bm_businessinterface
[INFO] task-segment: [clean, install]
[INFO]
------------------------------------------------------------------------
[INFO] [clean:clean]
[INFO] Deleting directory
C:\upgrade\portal\modules\common\bm_businessinterface\
target
[INFO] [resources:resources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:compile]
[INFO] Compiling 22 source files to
C:\upgrade\portal\modules\common\bm_business
interface\target\classes
[INFO] [resources:testResources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:testCompile]
[INFO] Nothing to compile - all classes are up to date
[INFO] [surefire:test]
[INFO] Surefire report directory:
C:\upgrade\portal\modules\common\bm_businessin
terface\target\surefire-reports
-------------------------------------------------------
T E S T S
-------------------------------------------------------
There are no tests to run.
Results :
Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
[INFO] [jar:jar]
[INFO] Building jar:
C:\upgrade\portal\modules\common\bm_businessinterface\targe
t\bm_businessinterface-5.0.0.jar
[INFO] [install:install]
[INFO] Installing
C:\upgrade\portal\modules\common\bm_businessinterface\target\b
m_businessinterface-5.0.0.jar to C:\Documents and
Settings\vidar.moe\.m2\reposit
ory\sb1-portal\bm_businessinterface\5.0.0\bm_businessinterface-5.0.0.jar
[INFO] [dependency:copy {execution: copy-installed}]
[INFO] Configured Artifact: sb1-portal:bm_businessinterface:5.0.0:jar
[INFO] Copying bm_businessinterface-5.0.0.jar to
C:\upgrade\portal\applications\
sb1-portal-ear\EarContent\APP-INF\lib\bm_businessinterface-5.0.0.jar
[INFO]
------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 11 seconds
[INFO] Finished at: Wed Oct 22 14:53:46 CEST 2008
[INFO] Final Memory: 28M/64M
[INFO]
------------------------------------------------------------------------
C:\upgrade\portal\modules\common\bm_businessinterface>
___________________
Does anyone have an idea of how I can work around this, or what might be
causing this behaviour?
I have tried forking the compile, but this did not seem to solve my problem.
I have also tried upgrading from 2.0.9 which I am currently using, to
2.1.0M1, but this also gives the exact same error.
I also found this posting:
http://www.mail-archive.com/[email protected]/msg64173.html
suggesting that a clean compile before the install would work, but
unfortunately it does not solve it for me, I get the exact same compile
errors.
I have attached the poms for the modules and this message as a word doc.
Thanks in advance,
Regards
Vidar Moe
<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">
<parent>
<groupId>sb1-portal</groupId>
<artifactId>sb1-portal-modules-pom</artifactId>
<version>5.0.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>sb1-portal</groupId>
<artifactId>sb1-portal-modules-common-pom</artifactId>
<packaging>pom</packaging>
<version>${sb1PortalVersion}</version>
<name>sb1-portal-modules-common-pom</name>
<description>
This module contains the code needed from both business and web
tier for the project.
</description>
<properties>
<earTargetLib>${earLib}</earTargetLib>
</properties>
<modules>
<module>bm_schemas</module>
<module>bm_businessinterface</module>
</modules>
</project>
<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">
<parent>
<groupId>sb1-portal</groupId>
<artifactId>sb1-portal-modules-common-pom</artifactId>
<version>5.0.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>sb1-portal</groupId>
<artifactId>bm_schemas</artifactId>
<packaging>workshopjar</packaging>
<version>${bmVersion}</version>
<name>bm_schemas</name>
<dependencies>
<!-- ant build contains dependencies -->
</dependencies>
<properties>
<stage.dir>.staging</stage.dir>
<archive.path>./</archive.path>
<workshop.lib.dir>${projectRoot}/workshop-lib</workshop.lib.dir>
<workspace.location>${projectRoot}/workspace.xml</workspace.location>
<earTargetLib>${earLib}</earTargetLib>
</properties>
<build>
<plugins>
<plugin>
<groupId>com.bea.workshop</groupId>
<artifactId>WorkshopMavenPlugin</artifactId>
<version>1.0</version>
<extensions>true</extensions> <!-- Tells where to look there for workshopear -->
<configuration>
<artifactName>${archive.path}/bm_schemas.jar</artifactName>
</configuration>
</plugin>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<phase>clean</phase>
<id>clean</id>
<configuration>
<tasks>
<ant target="clean" dir="${basedir}" antfile="build.xml">
<property name="java.home" value="${env.JAVA_HOME}" />
<property name="project.root" value="${projectRoot}" />
<property name="workspace" value="${workspace.location}" />
<property name="wl.home" value="${WL_HOME}" />
<property name="workshop.lib.dir" value="${workshop.lib.dir}" />
<!-- manually added if staging.dir is to be changed-->
<!-- <property name="staging.dir" value="${stage.dir}" /> -->
<!-- <property name="archive.dir" value="${archive.path}" /> -->
</ant>
</tasks>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
<execution>
<phase>compile</phase>
<id>compile</id>
<configuration>
<tasks>
<ant target="build" dir="${basedir}" antfile="build.xml">
<property name="java.home" value="${env.JAVA_HOME}" />
<property name="project.root" value="${projectRoot}" />
<property name="workspace" value="${workspace.location}" />
<property name="wl.home" value="${WL_HOME}" />
<property name="workshop.lib.dir" value="${workshop.lib.dir}" />
<property name="java.class.path" value="${java.home}/../lib/tools.jar" />
<!-- would be manually added by the user if they want to change the staging.dir-->
<!-- <property name="staging.dir" value="${stage.dir}" /> -->
<!-- <property name="archive.dir" value="${archive.path}" /> -->
</ant>
</tasks>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
<execution>
<phase>package</phase>
<id>package</id>
<configuration>
<tasks>
<ant target="archive" dir="${basedir}" antfile="build.xml">
<property name="java.home" value="${env.JAVA_HOME}" />
<property name="project.root" value="${projectRoot}" />
<property name="workspace" value="${workspace.location}" />
<property name="wl.home" value="${WL_HOME}" />
<property name="workshop.lib.dir" value="${workshop.lib.dir}" />
<!-- would be manually added by the user if they want to change the staging.dir-->
<!-- <property name="staging.dir" value="${stage.dir}" /> -->
<!-- <property name="archive.dir" value="${archive.path}" /> -->
</ant>
</tasks>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
<dependencies>
<!-- Needed to make javac available to Ant -->
<dependency>
<groupId>sun.jdk</groupId>
<artifactId>tools</artifactId>
<version>1.5.0</version>
<scope>system</scope>
<systemPath>${java.home}/../lib/tools.jar</systemPath>
</dependency>
<!-- Must point to a Weblogic installation that includes Workshop -->
<dependency>
<groupId>weblogic</groupId>
<artifactId>weblogic</artifactId>
<version>10.0.0</version>
<scope>system</scope>
<systemPath>${WL_HOME}/server/lib/weblogic.jar</systemPath>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
</project>
<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">
<parent>
<groupId>sb1-portal</groupId>
<artifactId>sb1-portal-modules-biz-pom</artifactId>
<version>5.0.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>sb1-portal</groupId>
<artifactId>bm_businessinterface</artifactId>
<packaging>jar</packaging>
<version>${bmVersion}</version>
<name>bm_businessinterface</name>
<description>Business interfaces for the BM services</description>
<properties>
<earTargetLib>${earLib}</earTargetLib>
</properties>
<dependencies>
<dependency>
<groupId>sb1-portal</groupId>
<artifactId>bm_common</artifactId>
<version>${bmVersion}</version>
</dependency>
<dependency>
<groupId>sb1-portal</groupId>
<artifactId>bm_schemas</artifactId>
<version>${bmVersion}</version>
</dependency>
</dependencies>
</project>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]