DPascalBernard / maven-alfresco-archetypes

Automatically exported from code.google.com/p/maven-alfresco-archetypes
0 stars 0 forks source link

The type org.alfresco.util.VersionNumber cannot be resolved. It is indirectly referenced from required .class files #64

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. mvn archetype:generate 
-DarchetypeCatalog=http://maven.alfresco.com/nexus/content/repositories/releases
/archetype-catalog.xml
2. chose AMP file
3. import into eclipse as existing maven project
4. quick-fix the issue with maven-nosnapshot-plugin / goal:strip with "execute: 
ignore"

What is the expected output? What do you see instead?
Eclipse project should have no java errors.

What version of the product are you using? On what operating system?
<groupId>com.sourcesense.alfresco</groupId>
<artifactId>maven-alfresco-amp-archetype</artifactId>
<version>3.9.0</version>
<description>Archetype for building Alfresco AMPs with Maven</description>
</archetype>

Please provide any additional information below.
I also find I couldn't use org.alfresco.service.namespace.QName (for example) 
because it doesn't exist

Original issue reported on code.google.com by daniele....@gmail.com on 8 Feb 2012 at 3:29

GoogleCodeExporter commented 9 years ago
after I generated the project didn't compile in Eclipse, the DemoComponent 
extended org.alfresco.repo.module.AbstractModuleComponent

compile error:
The type org.alfresco.util.VersionNumber cannot be resolved. It is indirectly 
referenced from required .class files

the discussion started out from the maven-alfresco ML: 
http://groups.google.com/group/maven-alfresco/browse_thread/thread/34315edf5b9d6
904

Original comment by daniele....@gmail.com on 8 Feb 2012 at 3:49

GoogleCodeExporter commented 9 years ago
This are now my dependency and the error above is gone...

I think that only one of this is needed for that error to go away but I didn't 
checked which one

        <dependency>
            <groupId>org.alfresco</groupId>
            <artifactId>alfresco-core</artifactId>
            <version>${alfresco.version}</version>
            <scope>provided</scope>
            <classifier>community</classifier>
        </dependency>
        <dependency>
            <groupId>org.alfresco</groupId>
            <artifactId>alfresco-datamodel</artifactId>
            <version>${alfresco.version}</version>
            <scope>provided</scope>
            <classifier>community</classifier>
        </dependency>
        <dependency>
            <groupId>org.alfresco</groupId>
            <artifactId>alfresco-deployment</artifactId>
            <version>${alfresco.version}</version>
            <scope>provided</scope>
            <classifier>community</classifier>
        </dependency>
        <dependency>
            <groupId>org.alfresco</groupId>
            <artifactId>alfresco-repository</artifactId>
            <version>${alfresco.version}</version>
            <scope>provided</scope>
            <classifier>community</classifier>
        </dependency>
        <dependency>
            <groupId>org.alfresco.cmis.client</groupId>
            <artifactId>alfresco-opencmis-extension</artifactId>
            <version>0.2</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-context</artifactId>
            <version>${spring.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework.extensions.surf</groupId>
            <artifactId>spring-surf</artifactId>
            <version>1.0.0</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework.extensions.surf</groupId>
            <artifactId>spring-webscripts</artifactId>
            <version>1.0.0</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>javax.transaction</groupId>
            <artifactId>jta</artifactId>
            <version>1.1</version>
        </dependency>

        <dependency>
            <groupId>org.json</groupId>
            <artifactId>json</artifactId>
            <version>20090211</version>
            <scope>provided</scope>
        </dependency>

Original comment by daniele....@gmail.com on 10 Feb 2012 at 9:12

GoogleCodeExporter commented 9 years ago
The missing class org.alfresco.util.VersionNumber is part of the alfresco-core 
jar. So the missing dependency is:

                <dependency>
            <groupId>org.alfresco</groupId>
            <artifactId>alfresco-core</artifactId>
            <version>${alfresco.version}</version>
            <scope>provided</scope>
            <classifier>community</classifier>
        </dependency>

Original comment by dev.la...@gmail.com on 17 Feb 2012 at 1:07

GoogleCodeExporter commented 9 years ago
i can verify that adding the alfresco-core dependency did cause eclipse to stop 
displaying the problem

Original comment by danlangf...@gmail.com on 13 Mar 2012 at 10:26

GoogleCodeExporter commented 9 years ago
Fixed on trunk by adding alfresco-core as provided dependency - 
http://code.google.com/p/maven-alfresco-archetypes/source/detail?r=374

Original comment by mauri...@session.it on 4 Apr 2012 at 8:02

GoogleCodeExporter commented 9 years ago

Original comment by mauri...@session.it on 6 Apr 2012 at 6:26