History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: APF-795
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: David L. Whitehurst
Reporter: Laurent Dejoux
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
AppFuse

Generated classes have wrong import path

Created: 05/Jun/07 05:10 AM   Updated: 27/Aug/07 07:40 PM
Component/s: Tools - AppGen
Affects Version/s: 2.0-M5
Fix Version/s: 2.0-RC1

Environment: Basic Struts


 Description  « Hide
When I generate a new entity all those classes don't compile because import path are wrong :
- com.mycompany.myproject.service.MyEntityManager
- com.mycompany.myproject.service.impl.MyEntityManagerImpl
- com.mycompany.myproject.dao.MyEntityDao
- com.mycompany.myproject.dao.hibernate.MyEntityDaoHibernate
- com.mycompany.myproject.webapp.action.MyEntityAction
and
- com.mycompany.myproject.dao.MyEntityDaoTest
- com.mycompany.myproject.service.impl.MyEntityManagerImplTest
- com.mycompany.myproject.webapp.action.MyEntityActionTest

Example, code generated for MyEntityDao.java

package com.mycompany.myproject.dao;
import com.mycompany.myproject.dao.GenericDao;
import com.mycompany.myproject.model.Projet;
/**
 * An interface that provides a data management interface to the Projet table.
 */
public interface ProjetDao extends GenericDao<Projet, Long> {
}

instead of :

package com.mycompany.myproject.dao;
import org.appfuse.dao.GenericDao;
import com.mycompany.myproject.model.Projet;
/**
 * An interface that provides a data management interface to the Projet table.
 */
public interface ProjetDao extends GenericDao<Projet, Long> {
}


 All   Comments   Change History   FishEye      Sort Order:
Matt Raible - 05/Jun/07 08:52 AM
If you configure your appfuse-maven-plugin as follows, it should fix this problem:

<plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>appfuse-maven-plugin</artifactId>
                <version>${appfuse.version}</version>
                <configuration>
                    <genericCore>${amp.genericCore}</genericCore>
                    <fullSource>${amp.fullSource}</fullSource>
                </configuration>
            </plugin>

Where amp.fullSource == true.

Matt

Matt Raible - 05/Jun/07 08:53 AM
The appfuse-maven-plugin's full-source command doesn't set amp.fullSource to true. Even though there's a warning at the end of the process, we should make the change for users by default.

Matt Raible - 13/Aug/07 11:17 PM
Please provide steps to reproduce. Did you run "appfuse:full-source" before trying to use AMP?

David L. Whitehurst - 27/Aug/07 07:40 PM
If amp.fullsource is set to false, it will be replaced and set to true by default when appfuse:full-source is called.