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

Key: TRAILS-3
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Kalle Korhonen
Reporter: Ray Krueger
Votes: 1
Watchers: 2
Operations

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

trails-archetype generates a ${basedir} directory

Created: 13/Sep/06 06:16 AM   Updated: 30/Sep/07 06:44 PM
Component/s: None
Affects Version/s: None
Fix Version/s: 1.1.0

Time Tracking:
Not Specified

File Attachments: 1. Text File basedir-bug-2007-05-06.txt (1 kb)
2. Text File basedir-bug.txt (1 kb)

Environment: maven 2.0.4


 Description  « Hide
Executing the following command:

mvn archetype:create -DarchetypeGroupId=org.trailsframework
-DarchetypeArtifactId=trails-archetype
-DremoteRepositories=http://snapshots.repository.codehaus.org/
-DarchetypeVersion=1.0-SNAPSHOT
-DgroupId=com.trailstest
-DartifactId=trailstest

Results in the following directory structure:

C:\source\trailstest
+---${basedir}
| +---src
| | ---main
| | ---resources
| ---target
| ---generated-sources
| ---resources
---src
+---main
| +---java
| | ---com
| | ---trailstest
| +---resources
| ---webapp
| +---images
| +---style
| ---WEB-INF
---test
---java
---com
---trailstest

I am unsure of the fix, but apparently someone needs to set ${basedir} in the archetype somewhere.



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Ray Krueger - 13/Sep/06 06:21 AM
I forgot the noformat markup above...
C:\source\trailstest
+---${basedir}
|   +---src
|   |   \---main
|   |       \---resources
|   \---target
|       \---generated-sources
|           \---resources
\---src
    +---main
    |   +---java
    |   |   \---com
    |   |       \---trailstest
    |   +---resources
    |   \---webapp
    |       +---images
    |       +---style
    |       \---WEB-INF
    \---test
        \---java
            \---com
                \---trailstest


Jim Caprioli - 12/Jan/07 04:34 PM
What should the value of ${basedir} be? If that's known it would not be a showstopper. ( Is trails dead? )

Archimedes Trajano - 05/Feb/07 01:45 PM
I notice the same problem too. From the way it looks, it think it is safe to delete the ${basedir} folder, but I am not sure why it even has it.

I tried removing the folder since it does not have any files anyway, and so far it just works. Maybe someone just forgot to remove some empty folders in the archetype.

I just ran jetty6:run loaded up http://localhost:8080/ and the sample app is up and running.


Alejandro Scandroli - 12/Feb/07 03:53 PM
Yes it is safe to delete the ${basedir}folder.
I still don't know if it's a Trails bug or a maven bug.
The only way I found to remove it, is to remove the apt plugin and the resources definition from the archetype's pom.xml, and we don't want to do that.

Pablo Gra\~na - 05/May/07 10:58 PM
I have been testing a littlle bit this issue, and AFAIK it is the resources definition from the archetype's pom.xml. A simple work around was to remove the ${basedir} from the maven-apt-plugin and change the target to target/classes/hibernate.cfg.xml. This makes the target/generated-sources/resources unnecessary in the resources section of the pom. I did a quick test and it worked fine. I still have to test a multi module application.

I attached the output of svn diff.


Pablo Gra\~na - 06/May/07 02:34 PM
I testing in a multi module build, and it complained when building from the top level pom. You cannot get rid of ${basedir} in maven-apt-plugin. I added it back and it worked. Attached is the svn diff output.

Alejandro Scandroli - 07/May/07 03:26 PM
Gracias Pablo for taking a look at it. I hope we can soon get rid of the maven-apt-plugin in favor of a Tapestry5 or Tapernate approach.

Kalle Korhonen - 08/Sep/07 12:34 PM
Well I spent some time on the issue. It's the not-to-be-evaluated ${basedir} definitions in the resources section that cause the issue, and I didn't notice any problems if I removed those but left the ${basedir} definitions in the apt plugin parameters in place, whether in a single or multi-module build. If anybody knows otherwise, please state so, otherwise I'll make the changes and close the issue.

Kalle Korhonen - 08/Sep/07 04:17 PM
Fixed as suggested