2013-09-25 4 views
2

Cela fait maintenant des heures que je m'attaque à cela.GWT Maven Project ne parvient pas à compiler - Aucun code source n'est disponible pour le type

Essayer de compiler un projet GWT Maven, obtenir l'erreur suivante au point de compilation GWT:

[INFO] Module com.ephesoft.dcma.gwt.login.Login
Compiler [INFO] Validation unités nouvellement compilées
[INFO] [ERREUR] Erreurs dans 'jar: fichier:/D: /workspace2/dcma-root/dcma-gwt/dcma-gwt-core/target/dcma-gwt-core-0.0.14- > SNAPSHOT.jar! /com/ephesoft/dcma/gwt/core/client/validator/ValidatorFactory.java '
[INFO] [ERROR] Ligne 47: Aucun code source n'est disponible pour le type com.ephesoft.dcma.core. common.DataType; avez-vous oublié d'hériter d'un module requis?
[INFO] [ERREUR] Erreurs dans 'jar: fichier:/D: /workspace2/dcma-root/dcma-gwt/dcma-gwt-core/target/dcma-gwt-core-0.0.14-SNAPSHOT.jar ! /com/ephesoft/dcma/gwt/core/client/ui/RotatableImage.java '
[INFO] [ERROR] Ligne 54: Aucun code source n'est disponible pour le type com.ephesoft.dcma.batch.schema.Direction; avez-vous oublié d'hériter d'un module requis?
[INFO] [ERREUR] Erreurs dans 'jar: fichier:/D: /workspace2/dcma-root/dcma-gwt/dcma-gwt-core/target/dcma-gwt-core-0.0.14-SNAPSHOT.jar ! /com/ephesoft/dcma/gwt/core/shared/comparator/DocumentTypeComparator.java »
...
...

et la liste est longue ...

c'est mon dossier webapp pom -
dcma-root \ dcma-webapp \ pom.xml:

<?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> 
    <packaging>war</packaging> 

    <parent> 
     <groupId>com.ephesoft.dcma</groupId> 
     <artifactId>dcma-gwt</artifactId> 
     <version>0.0.14-SNAPSHOT</version> 
     <relativePath>../dcma-gwt</relativePath> 
    </parent> 
    <artifactId>dcma-webapp</artifactId> 
    <name>DCMA: Web application Model</name> 
    <description>The DCMA web Application model.</description> 

    <dependencies> 
     <dependency> 
      <groupId>com.ephesoft.dcma</groupId> 
      <artifactId>dcma-gwt-home</artifactId> 
     </dependency> 
     <dependency> 
      <groupId>com.ephesoft.dcma</groupId> 
      <artifactId>dcma-gwt-login</artifactId> 
     </dependency> 
     <dependency> 
      <groupId>com.ephesoft.dcma</groupId> 
      <artifactId>dcma-gwt-review-validate</artifactId> 
     </dependency> 
     <dependency> 
      <groupId>com.ephesoft.dcma</groupId> 
      <artifactId>dcma-gwt-admin</artifactId> 
     </dependency> 
     <dependency> 
      <groupId>com.ephesoft.dcma</groupId> 
      <artifactId>dcma-folder-monitor</artifactId> 
     </dependency> 
     <dependency> 
      <groupId>com.ephesoft.dcma</groupId> 
      <artifactId>dcma-heart-beat</artifactId> 
     </dependency> 
     <dependency> 
      <groupId>com.ephesoft.dcma</groupId> 
      <artifactId>dcma-mail-import</artifactId> 
     </dependency> 
     <dependency> 
      <groupId>com.ephesoft.dcma</groupId> 
      <artifactId>dcma-gwt-batchInstance</artifactId> 
     </dependency> 
     <dependency> 
      <groupId>com.ephesoft.dcma</groupId> 
      <artifactId>dcma-gwt-reporting</artifactId> 
     </dependency>  
     <dependency> 
      <groupId>com.ephesoft.dcma</groupId> 
      <artifactId>dcma-gwt-upload-batch</artifactId> 
     </dependency> 
    </dependencies> 

    <build> 
     <plugins> 
      <plugin> 
       <groupId>org.apache.maven.plugins</groupId> 
       <artifactId>maven-eclipse-plugin</artifactId> 
       <version>2.8</version> 
       <configuration> 
        <additionalProjectnatures> 
         <projectnature>org.springframework.ide.eclipse.core.springnature</projectnature> 
         <projectnature>com.google.gwt.eclipse.core.gwtNature</projectnature> 
         <projectnature>com.google.appengine.eclipse.core.gaeNature</projectnature> 
        </additionalProjectnatures> 
        <additionalBuildcommands> 
         <buildcommand>org.springframework.ide.eclipse.core.springbuilder</buildcommand> 
         <buildcommand>com.google.gwt.eclipse.core.gwtProjectValidator</buildcommand> 
         <buildcommand>com.google.appengine.eclipse.core.enhancerbuilder</buildcommand> 
        </additionalBuildcommands> 
        <classpathContainers> 
         <classpathContainer>com.google.gwt.eclipse.core.GWT_CONTAINER</classpathContainer> 
        </classpathContainers> 
        <wtpversion>1.5</wtpversion> 
       </configuration> 
      </plugin> 
      <plugin> 
       <groupId>org.codehaus.mojo</groupId> 
       <artifactId>gwt-maven-plugin</artifactId> 
       <version>${gwt.maven.plugin.version}</version> 
       <executions> 
        <execution> 
         <configuration> 
          <modules> 
           <module>com.ephesoft.dcma.gwt.core.Core</module> 
           <module>com.ephesoft.dcma.batch.Batch</module> 
           <module>com.ephesoft.dcma.gwt.login.Login</module> 
           <module>com.ephesoft.dcma.gwt.admin.bm.BatchClassManagement</module> 
           <module>com.ephesoft.dcma.gwt.home.BatchList</module> 
           <module>com.ephesoft.dcma.gwt.rv.ReviewValidate</module> 
           <module>com.ephesoft.dcma.gwt.batchInstance.BatchInstance</module> 
           <module>com.ephesoft.dcma.gwt.reporting.Report</module> 
           <module>com.ephesoft.dcma.gwt.uploadbatch.UploadBatch</module> 
          </modules> 
          <localWorkers>2</localWorkers> 
          <extraJvmArgs>-Xmx768m</extraJvmArgs> 
          <sourcesOnPath>false</sourcesOnPath> 
          <force>true</force> 
         </configuration> 
         <goals> 
          <goal>compile</goal> 
         </goals> 
        </execution> 
       </executions> 
      </plugin> 
     </plugins> 
    </build> 

    <profiles> 
     <profile> 
      <id>stand-alone</id> 
      <build> 
       <plugins> 
        <plugin> 
         <groupId>org.codehaus.mojo</groupId> 
         <artifactId>exec-maven-plugin</artifactId> 
         <version>1.1.1</version> 
         <executions> 
          <execution> 
           <phase>test</phase> 
           <goals> 
            <goal>java</goal> 
           </goals> 
           <configuration> 
            <mainClass>com.ephesoft.dcma.webapp.DCMAExecuter</mainClass> 
            <arguments> 
             <argument>none</argument> 
            </arguments> 
           </configuration> 
          </execution> 
         </executions> 
        </plugin> 
       </plugins> 
      </build> 
     </profile> 
    </profiles> 
</project> 

dcma-root \ dcma-GWT \ dcma-GWT-login \ src \ main \ java \ com \ Ephesoft \ dcma \ GWT \ connexion \ Login.gwt.xml:

<?xml version="1.0" encoding="UTF-8"?> 
<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 1.6.4//EN" "http://google-web-toolkit.googlecode.com/svn/tags/1.6.4/distro-source/core/src/gwt-module.dtd"> 
<module rename-to='login'> 
    <inherits name='com.google.gwt.user.User' /> 
    <inherits name='com.ephesoft.dcma.gwt.core.Core' /> 

    <entry-point class='com.ephesoft.dcma.gwt.login.client.LoginEntryPoint' /> 

</module> 

DCMA-root \ DCMA-GWT \ DCMA-GWT-core \ src \ main \ java \ com \ Ephesoft \ DCMA \ GWT \ core \ Core.gwt.xml:

<?xml version="1.0" encoding="UTF-8"?> 
<module rename-to='core'> 
    <inherits name='com.google.gwt.user.User' /> 
    <source path='client' /> 
    <source path='shared' /> 
    <inherits name="com.googlecode.gwt.math.Math" /> 
    <inherits name="com.ephesoft.dcma.batch.Batch" /> 
    <inherits name="com.ephesoft.dcma.core.Common" /> 
    <inherits name="com.ephesoft.dcma.da.Property" /> 
    <inherits name="com.google.gwt.i18n.I18N" /> 

    <inherits name='com.google.gwt.user.theme.standard.Standard' /> 
    <stylesheet src='css/style.css' /> 



</module> 

DCMA-root \ DCMA -gwt \ dcma-gwt-noyau \ src \ main \ java \ com \ ephesoft \ dcma \ core \ Common.gwt.xml:Donc Connexion comprend Core, qui à son tour comprend commun, alors quel est le problème?

J'apprécierais l'aide la plus profondément !!!

+0

Comment est '' de Common.gwt.xml déclaré? –

+0

\t \t Mais c'est Common.gwt .xml de commun dcma-gwt-core. Les héritages dans Core.gwt.xml supposent inclure dcma.core.Common (contrairement à dcma-gwt-core). ou peut-être que j'ai tout faux? – sahar

Répondre

5

Si j'ai bien compris la question, vous avez besoin de compiler gwt-module qui en dépend une autre? Pour cette tâche, nous avons utilisé dans le module dépendu

<plugin> 
    <groupId>org.codehaus.mojo</groupId> 
    <artifactId>gwt-maven-plugin</artifactId> 
    <version>${gwt.version}</version> 
    <executions> 
     <execution> 
     <goals> 
      <goal>compile</goal> 
     </goals> 
     </execution> 
    </executions> 
    <configuration> 
     <extraJvmArgs>-Xmx1024M</extraJvmArgs> 
     <localWorkers>3</localWorkers> 
     <optimizationLevel>${gwt.optimize}</optimizationLevel> 
     <style>OBF' -XenableClosureCompiler '-XenableClosureCompiler</style> 
     <workDir>${project.build.directory}/gwt/temp</workDir> 
     <deploy>${project.build.directory}/WEB-INF/deploy</deploy> 
     <modules> 
     <module>${module}</module> 
     </modules> 
     <hostedWebapp>${webappDirectory}</hostedWebapp> 
     <logLevel>WARN</logLevel> 
     <compileSourcesArtifacts> 
     <compileSourcesArtifact>groupId:artifactId</compileSourcesArtifact> 
     </compileSourcesArtifacts> 
    </configuration> 
    </plugin> 

<compileSourcesArtifact>groupId:artifactId</compileSourcesArtifact> ressemble <compileSourcesArtifact>com.google.gwt:gwt-user</compileSourcesArtifact> et dans le module de base

<plugin> 
    <groupId>org.apache.maven.plugins</groupId> 
    <artifactId>maven-source-plugin</artifactId> 
    <executions> 
     <execution> 
     <id>attach-sources</id> 
     <phase>package</phase> 
     <goals> 
      <goal>jar</goal> 
     </goals> 
     </execution> 
    </executions> 
    </plugin> 
+0

ça a marché !! J'ai presque abandonné vraiment! avec quelques modifications cependant - la version gwt-maven-plugin devait être 2.5.1, ce qui à son tour, j'ai dû changer la version de gwt aussi à 2.5.1 (sinon ArrayIndexOutOfBoundsException se produit). aussi, il s'agit d'éléments "compileSourcesArtifact" à l'intérieur de "compileSourcesArtifacts". Merci beaucoup! – sahar

Questions connexes